I would like to understand the differences between Akka and Netty. I understand you can use both from Scala and Java. I am more interested in knowing where Netty is better (if anywhere) and where Akka is better (if anywhere). Where do they overlap, in other words, in what areas can I use Akka and not Netty and vice-versa.
Akka is a concurrency framework built around the notion of actors and composable futures, Akka was inspired by Erlang which was built from the ground up around the Actor paradigm. It would usually be used to replace blocking locks such as synchronized, read write locks and the like with higher level asynchronous abstractions.
Netty is an asynchronous network library used to make Java NIO easier to use.
Notice that they both embrace asynchronous approaches, and that one could use the two together, or entirely separately.
Where there is an overlap is that Akka has an IO abstraction too, and Akka can be used to create computing clusters that pass messages between actors on different machines. From this point of view, Akka is a higher level abstraction that could (and does) make use of Netty under the hood.
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