I am starting a new project (java-based). I need to build it as a modular, distributed and resilient architecture.
Therefore, I would like business processes to be interconnected, interoperable, but also independent.
I am looking right now at two frames that, in addition to their age difference, express two different opinions:
What should I consider when choosing one of the above structures?
As far as I understand so far, Akka is still somehow combined (in such a way that I need to "choose" the actor to whom I want to send messages), but is very stable. While the reactor is free (as based on the publication of events).
Can someone help me figure out how to make the right decision?
UPDATE
After a better review of Akka's Event Bus , I somehow believe expressed Reactor is already included in Akka.
For example, the publication of a subscription and events, documented by https://github.com/reactor/reactor#events-selectors-and-consumers , can be expressed in Akka as follows:
final ActorSystem system = ActorSystem.create("system"); final ActorRef actor = system.actorOf(new Props( new UntypedActorFactory() { @Override public Actor create() throws Exception { return new UntypedActor() { final LoggingAdapter log = Logging.getLogger( getContext().system(), this); @Override public void onReceive(Object message) throws Exception { if (message instanceof String) log.info("Received String message: {}", message); else unhandled(message); } }; } }), "actor"); system.eventStream().subscribe(actor, String.class); system.eventStream().publish("testing 1 2 3");
Therefore, it seems to me that the main differences between them:
- Akka, more mature, Typesafe addicted
- Reactor, Spring's Early Stage
Is my interpretation correct? But , what is conceptually different between the Actor in Akka and the Consumer in the Reactor ?
java spring reactor akka project-reactor
David Riccitelli May 16 '13 at 19:02 2013-05-16 19:02
source share