I am building a web service in java. The business logic has no concurrency requirements. It is a simple rest call where an input json is expected and after some processing an output json is thrown back. However the request can be in millions where I am planning to bring in a load balancer.
My question is I have read a few articles which say that using akka will make the development faster and give a performance boost as well. Is this true in case of an application which has no concurrency requirement?
Thanks in advance.
Even without concurrency requirements, Akka is a great framework to use. You can use actors to encapsulate single responsibilities, send them messages to react on it and respond with another message.
This has the benefit that you can model errors inside your domain, which means, sending an Message with the error back to the sender, which can then decide how to deal with it, e.g. retrying n times. So you get a good exception modelling with Akka.
Even better, whenever an Actor fails with an Exception, the parent Actor can than decide, what to do, e.g. restart the actor, propagate the error even higher in the hierarchy etc.
So in conclusion, Akka helps you to develop a solid reactive domain based on messages. It also makes it easy for you to make it concurrent later, or to pass messages to other actors as well, when you logic changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With