Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between Akka and Netty besides their choice of language (Scala vs Java)? [closed]

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.

like image 675
chrisapotek Avatar asked Aug 18 '14 14:08

chrisapotek


1 Answers

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.

like image 174
Chris K Avatar answered Oct 16 '22 09:10

Chris K