What are the best use cases for Akka framework [closed]
Solution 1:
I have used it so far in two real projects very successfully. both are in the near real-time traffic information field (traffic as in cars on highways), distributed over several nodes, integrating messages between several parties, reliable backend systems. I'm not at liberty to give specifics on clients yet, when I do get the OK maybe it can be added as a reference.
Akka has really pulled through on those projects, even though we started when it was on version 0.7. (we are using scala by the way)
One of the big advantages is the ease at which you can compose a system out of actors and messages with almost no boilerplating, it scales extremely well without all the complexities of hand-rolled threading and you get asynchronous message passing between objects almost for free.
It is very good in modeling any type of asynchronous message handling. I would prefer to write any type of (web) services system in this style than any other style. (Have you ever tried to write an asynchronous web service (server side) with JAX-WS? that's a lot of plumbing). So I would say any system that does not want to hang on one of its components because everything is implicitly called using synchronous methods, and that one component is locking on something. It is very stable and the let-it-crash + supervisor solution to failure really works well. Everything is easy to setup programmatically and not hard to unit test.
Then there are the excellent add-on modules. The Camel module really plugs in well into Akka and enables such easy development of asynchronous services with configurable endpoints.
I'm very happy with the framework and it is becoming a defacto standard for the connected systems that we build.
Solution 2:
Disclaimer: I am the PO for Akka
Besides offering a concurrency smorgasbord that is much simpler to reason about and to get correct (actors, agents, dataflow concurrency) and with concurrency control in the form of STM.
Here are some use-cases you might consider:
- Transaction processing (online
gaming, finance, statistics,
betting, social media, telecom, ...)
- scale up, scale out, fault-tolerance / HA
- Service backend (any industry, any app)
- service REST, SOAP, cometd etc
- act as message hub / integration layer
- scale up, scale out, fault-tolerance / HA
- Snap-in concurrency/parallelism ( any app )
- Correct
- Simple to work with and understand
- Just add the jars to your existing JVM project (use Scala, Java, Groovy or JRuby)
- Batch processing ( any industry )
- Camel integration to hook up with batch data sources
- Actors divide and conquer the batch workloads
- Communications hub ( telecom, web media, mobile media )
- scale up, scale out, fault-tolerance / HA
- Game server (online gaming, betting)
- scale up, scale out, fault-tolerance / HA
- BI/datamining/general purpose crunching
- scale up, scale out, fault-tolerance / HA
- insert other nice use cases here