Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hot deployment in akka

In these slides: http://www.slideshare.net/jboner/introducing-akka I've read that Akka supports hot deployment. The way I understand this term is I'll be able to make code changes without restarting my application and losing it's current state.

That's exactly what I may need for my scala/akka application. But how do I actually do a hot deployment? What tools and techniques should I use?

like image 602
src091 Avatar asked Nov 05 '14 19:11

src091


People also ask

What is cluster in Akka?

Akka Cluster provides a fault-tolerant decentralized peer-to-peer based Cluster Membership Service with no single point of failure or single point of bottleneck. It does this using gossip protocols and an automatic failure detector.

How can I send a message to Akka?

1) Akka Actor tell() Method It works on "fire-forget" approach. You can also use ! (bang) exclamation mark to send message. This is the preferred way of sending messages.

Is Akka fast?

Building application with Akka has several advantages like: High performance – Akka delivers up to 50 million messages per second on commodity hardware having ~2.5 million Actors per GB of RAM.


1 Answers

It isn't clear what state you want to maintain? The mailboxes of the actors? Configuration of remoting? All of that is non-trivial to reason about in normal circumstances not too mention hot swapping.

If you are thinking of something along the lines of OSGI hot deployment then no in general you cannot. You have a few options though.

You can change an actors behavior at runtime using a variety of methods the easiest would be become/unbecome. This is sometimes what is meant by hotswap.

A generic approach might be to deploy your new code to new nodes join a cluster and then kill off previous nodes.

like image 170
bearrito Avatar answered Oct 17 '22 11:10

bearrito