[erlang-questions] Masterless application design
Sun Nov 11 02:52:24 CET 2012
I don't completely understand your application, but it sounds like what you want is the gossip protocol. Gossip can solve some of the "masterless" issues. Google for "gossip protocol erlang" and you will lots of interesting, and possibly useful stuff.
On Nov 10, 2012, at 3:08 PM, Cristian Hancila <> wrote:
> Hello Erlangers,
> I'm fairly new to Erlang and I'm trying to brainstorm an architecture for an ideally masterless system, mainly how to achieve it on top of Erlang and OTP. The main components are 1..n nodes as public web based authentication services and 1..n nodes as the ultimate hosts of the client, over a long lived tcp connection. The web service nodes do registration and authentication, and decide which host the client will connect to. The authentication nodes need to be aware of all host nodes, and need to realize when new host nodes get added. The host nodes provide a notification mechanism for usage statistics, and each auth node registers for this notification in order to figure out some heuristics on deciding where to forward a client when they want to connect.
> My main issue is with figuring out if when a new node joins the cluster, does it/will it run the host_service application? If I can't make that guarantee then I would need to periodically scan all nodes an see if host_service is running on them. This seems like a bad design. Is there an OTP or standardized erlang pattern to achieve this?
> Right now the only idea I came up with is having an application running on all my nodes that specify the "feature" of the node, so when a node joins the cluster, the web service app checks the capabilities of the node, and either ignores or it grabs the host_service process, or if the host_service happens to be dead periodically checks until it's alive.
> Lastly I'm also debating if this complexity is worth the effort, it seems that using a global process as a host_service registry would be much easier.
> Thanks for any advice, and also keep in mind this is mostly a personal academic exercises in building distributed systems and learning Erlang.
> erlang-questions mailing list
More information about the erlang-questions