Searching for Single Master Design Pattern
I have a project where I have multiple nodes providing services. One (and only one) of the nodes needs to act as a master to orchestrate certain functions for all remaining nodes. If the master node disappears I need the remaining nodes to detect and negotiate a new master. I'm searching for design patterns and/or algorithms that can guide my implementation.
The Windows 'Computer Browser Service' and Database architectures provide some analogs, and while I can find h开发者_运维问答igh-level descriptions of single-master design concepts they tend to be too vague. I need something a bit more detailed that can show me examples of the negotiations, hand shakes, etc... Code samples would be great, but sequence diagrams or anything similar would be good too.
Can anyone suggest anything?
Hopefully, someone else will be able to better answer this question (and I'll delete my answer), but when I first read your question, I immediately thought of the OTP concepts used in the Erlang programming community. Search for: OTP Erlang (OTP is so central to Erlang, you should find plenty of results)
Another thing you should take a look at is the Nagios monitoring system. I don't think Nagios was inspired by OTP, but I think you'll find that those guys came to several of the same conclusions and underlying principles that OTP uses.
精彩评论