I am in the process of starting a new project (java-based). I need to build it as a modular, distributed and resilient architecture.
Therefore I would like to have the business processes to communicate among themselves, be interoperable, but also independent.
I am looking right now at two frameworks that, besides their difference in age, express 2 different views:
- Akka (http://akka.io)
- Reactor (https://github.com/reactor/reactor)
What I should consider when choosing one of the above frameworks?
As far as I understand till now, Akka is still somehow coupled (in a way that I have to 'choose' the actor I want to send the messages to), but very resilient. While Reactor is loose (as is based on event posting).
Can someone help me understand how make a proper decision?
UPDATE
After reviewing better the Event Bus of Akka, I believe in some way the features expressed by Reactor are already included in Akka.
For example the subscription and event publishing, documented on https://github.com/reactor/reactor#events-selectors-and-consumers, can be expressed in Akka as following:
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 now that the major differences between the two are:
- Akka, more mature, bound to Typesafe
- Reactor, early stage, bound to Spring
Is my interpretation correct? But what is conceptually the difference between the Actor in Akka and the Consumer in Reactor?