Is there any substantial difference in the concepts of Akka actors and Jade agents ?
From what I know both implement system distribution by creating independent entities (with chunks of system logic) which can communicate by sending messages between them.
Are there other factors making them different (like performance or intended purpose) ?
The distributed actor system enables actors to form a cluster, discover each other and communicate with one another without the need for low-level network programming that would otherwise be necessary.
Akka actors use java threads internally. More than a few thousand threads running simultaneously produces overhead on most desktop machines. Akka Actors simplifies this problem by providing awake-on-demand actors who do not occupy a thread unless they have some work to do.
Behind the scenes Akka.NET will run sets of actors on sets of real threads, where typically many actors share one thread, and subsequent invocations of one actor may end up being processed on different threads.
I didn’t know about JADE before, and I am the Akka tech lead, so take my response with a grain of salt.
Skimming their site (which is probably supposed to be viewed on a much smaller screen) it looks like their Agents do the serial message-processing part of actors, but they lack supervision and therefore fault-tolerance, and they seem to encourage either blocking or polling while Akka’s actors are fully event-driven and hence consume less resources (threads). Looking at the Programmer’s Guide it seems that the concept has been developed mostly for the use-case of GUI development, whereas Akka actors are not specific and can be used to model any kind of computation or interaction.
One very big difference I stumbled over in my superficial search is the size of the provided interface for Agents and Actors: it may be that Akka’s abstraction is simpler and therefore more powerful.
The capability to move agents between hosts looks interesting, we still have to implement that (see the roadmap).
If I am not missing something on the JADE side then Akka has far better support for reactive programming with its fully non-blocking actors, the ask pattern combined with composable Futures (i.e. not the blocking ones from java.util.concurrent but with transformation methods for asynchronous composition), STM support and more.
I don’t know how JADE does it, but in Akka you can elastically scale up and out your actors by merely changing the configuration, see routing.
Last but not least there is the cluster support in Akka for which I could not find a corresponding feature in JADE, but again I have not digged extremely deeply.
One thing I just noticed: Akka does not require a login for trying it out ;-)
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