Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Akka messaging work

Tags:

akka

I don't have any Akka experience at all. I would like to know how Akka messaging work within JVM and also between JVMs.

  • Are messages within JVM some POJO like objects?
  • Is there any sort of JMS like server needed for inter JVM communication?
  • How does Akka abstract differences between these two types of messages?
  • Is serialization needed?
  • Can I use some other protocols (e.g. JMS, SOAP, ...) for inter JVM communication? For example Spring Integration or Apache Camel can handle any type of communication protocol.
like image 864
luboskrnac Avatar asked Sep 17 '14 08:09

luboskrnac


1 Answers

Most of these questions are answered in the section on remoting in the documentation:

http://doc.akka.io/docs/akka/2.3.6/scala/remoting.html

  • Messages within a JVM are whatever you want them to be so long as they are immutable.
  • Nothing is needed beyond two ActorSystems set up for remoting that can reach each other over the network. Akka does not use JMS.
  • Akka provides location transparency, the difference between local and remote communication is hidden from the user (that is, the end developer). See this section on location transparency: http://doc.akka.io/docs/akka/2.3.6/general/remoting.html
  • Yes. See the serialization section of the first link in this answer.
  • Akka can use ZeroMQ for remote communication between actors. Camel integration is available but not for inter-actor communication, it can be used to integrate other protocols using actors as producers or consumers.
like image 171
Ryan Avatar answered Sep 17 '22 13:09

Ryan