upvote
It's been a while, but I used to work at WhatsApp and we used Erlang distribution heavily. I understand the clusters have gotten really huge since I left.

It's super handy. There's no security barrier between nodes. It's a headache if your network is unreliable.

For a chat app, messaging someone becomes a series of steps:

a) look up if they're online (send a message to the presence database service)

b) if you got a process id back, that's the process connected to the user, so send it the message. The process could be on the same machine or not, but the sending api is the same. This is the special part: few other environments make arbitrary messaging between processes/threads/tasks/whathaveyou so pervasive.

c) if you don't get a process id back, the user is offline; send the message to the offline database.

reply
Also interested in hearing about this! I built an elixir k8s control plane recently and kept expecting to reach for it but it never really made sense when it was controlling golang daemonsets.

My usecase is less independent though, that control plane is orchestrating like Lambda/fly.io style workloads on top of firecracker: https://jomcgi.dev/ember

reply
I've worked a little bit with distributed Elixir using `Horde.DynamicSupervisor` on Kubernetes. Apparently there's other options like 'swarm' and DynamicSupervisor [1]. It'd be great for clear analysis of the benefits these kinds of abstractions bring vs non-BEAM approaches.

[1] https://www.youtube.com/watch?v=nZmDEUeHeVI

reply
Elixir/Erlang works very well in a semi-embedded environment where you need a higher level command and control component that behaves in a deterministic way and is pretty robust.

I was involved, years ago, in using Erlang on these devices: https://www.icare-world.com/us/product/icare-eidon/

It was a lot of fun and there were some very interesting challenges for everyone involved.

reply