What is the difference between actors (Akka) and agents (JADE) in distributed systems? [closed]

StackOverflow https://stackoverflow.com/questions/15295504

  •  18-03-2022
  •  | 
  •  

Question

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) ?

Was it helpful?

Solution

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 ;-)

OTHER TIPS

I know this question is a couple of years old but, for the sake of completeness (for those looking for information about this topic, like myself) I would like to add a point of view in a position kind of the opposite of Ronald (knowing better JADE than Akka). I'm not a contributor to JADE but worked with it (some years ago) and researched (a lot) about mobile software agents.

The software agents paradigm has been around for many years now, a good introduction to the topic is the paper of Jeffrey M. Bradshaw. It has much more concepts than plain actors.

I won't give an introduction to the paradigm (you can refer to the paper if you are interested) but comparing the frameworks without some knowledge about it seems unfair. Just to mention that JADE implements many (not all, since the last time I checked) of the concepts of the paradigm, not only the part that can be compared with actors, but also has concepts like BDI model, Ontologies, etc. Also JADE implements the FIPA specification which has several parts.

Like I said, it has been some years since I last checked the JADE implementation, so I won't do a point by point technology comparison. Like Ronald said, JADE doesn't implement concepts like reactive or elastically scale, but one has to take into account that those concepts are widely present today but weren't too popular many years ago (when JADE started). What I do want to clarify is that JADE does have fault tolerance, scalability and non-blocking way of working incorporated to it (maybe isn't clear in the website). The book Developing Multi-Agent Systems with JADE is a great introduction to the framework.

To sum up, if the actor model is enough for your requirements, I would go with Akka as it is cleaner (probably slimmer) and more modern than JADE. If you need/want some of the more advanced/specific functionalities related to (mobile) software agents, JADE is the more widely used framework+platform for that (or at least it was when I researched).

Just my two cents!

Again a year later....I can confirm fail-over is key to Jade, to mention a few of the mechanisms: backup platforms, the concept of virtual replicated agents, stateless mediator containers (deal with disconnection and ip change), persistent message delivery. Wade adds more to fault tolerance: http://jade.tilab.com/wade/doc/WADE-User-Guide.pdf.

Jade does not mostly target GUI development.

Another strong feature in Jade I would like to mention is that agents do not require open ports for bi-directional communication over the network, only the platform and backups need open ports.

Furthermore STM (finite state machine) is an important part in Jade, FIPA conversation models are implemented using STM. Jade agents do not so much send and receive messages but execute conversations in workflows.

Clustering is not available in Jade, though Wade provides configurable agent pools where a pool of distributed agents take care of a certain task.

As to Elastic scaling and Jade some research has been done, I don't know the status of that. Perhaps it is better to address elastic scaling at the jvm level.

A theme that needs attention in both Jade and Akka is security (identity, authentication, authorization) in a distributed message based solution.

Concluding this: Jade is far more powerful and feature rich then a first glance reveals. Jade needs modernization.

It would be interesting to investigate how Akka and Jade can mutually benefit, the AkkaAgent.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top