First of all I'm new to Orleans, but I've read some of the documentation already and I have to say the project looks very promising. I have a question in terms of how to update code of the grains on Silos in a production environment.
I know Erlang has an actor model and in Whatsapp they can perform onthefly updates of the code. Is that somethings possible currently on Orleans or do I have to stop silos and deploy the new code? If so can this be done programatically?
Thanks!
I don't think you can deploy code on the fly as you say. Grains are classes, and they may depend on other classes, and all these classes are found in DLLs. If you add a new class for instance, you have to deploy that DLL onto all your silos.
Note: I'm using "server" and "silo" interchangeably here.
What you can do to avoid downtime is deploy part of your servers, switch your traffic to them, and then deploy the remaining servers. Orleans deployments support a DeploymentId which is unique for the cluster. If you deploy your silos with a new DeploymentId, they will not join the old cluster.
The description in the previous paragraph might sound a little abstract, so let's take a practical example. You have 5 servers, all on the same cluster with DeploymentId 123, and a load balancer forwards traffic to each of them in round robin style.