Will Reactor provide remoting?

99封情书 提交于 2019-12-19 08:16:11

问题


I'm trying to find out whether we should use Akka or Reactor for our next project. One of the most important questions is if the future framework of choice will provide remoting. As i saw, Akka offers this just in the way we'd like to have it.

In the GitHub wiki, unfortunately the TCP-server/client sections are blank and i couldn't find other informations about that yet.

Will reactor provide remoting?


回答1:


I don't think Akka and Reactor are Apples to Apples. Reactor is purposely minimal, with only a couple external dependencies. It gives you a basic set of tools in which to write event-driven applications but it by design does not enforce a particular model. It would actually not take that long to implement a Dynamo system using Reactor components. Everything that would be needed is there and it would likely only take writing a tutorial on it to show how to wire things together.

The Dynamo model that Akka uses is a proven system. Basho has done a fantastic implementation of it in Riak. It's great to see Akka following their lead in that respect. If we were to implement a Reactor clustering system, it would likely be the Dynamo model. But since a Reactor is basically just event handlers and topic pub/sub, your Consumers can do any remote communication you want. They can integrate with HTTP, AMQP, Redis, whatever. There's no need to have special APIs for doing this sort of thing because they're just events. You can code up an AMQP client application in about 10 minutes and be publishing data from RabbitMQ into a Reactor application.

We might very well at some point have different implementations of clustering for different purposes. The Dynamo model might work well for some while others would want a simple Redis-based system. Or maybe one could leverage the components already in Reactor to work with the Java Chronicle to do disk-based clustering--something you can do right now just by wiring up the right Consumers. But those will be in external modules that could be added to Reactor. reactor-core itself will likely never have an opinionated clustering solution simply because it doesn't fit the purpose of those core components: a foundational framework for event-driven applications on the JVM.

(I'm working on the TcpClient/TcpServer wiki docs right now, so hopefully those will be filled in for the M2 of Reactor which will be happening very soon.)



来源:https://stackoverflow.com/questions/18286687/will-reactor-provide-remoting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!