State distribution across many machines

I am trying to write a tool that requires knowing the state of other machines in a cluster (local area network). This is for a network fault tolerance / high availability system similar to VRRP and corosync / openais, but I want to contain more information (for example, about real-time speed / performance), so devices can make more reasonable choices. This means using a protocol that is more complex than a predetermined mass-based mechanism: allowing all cluster machines to see each other's state, they can jointly agree on what is most suitable for the host device.

From my searches, I have not found any (C, C ++ or JavaME) libraries that offer a distributed state mechanism. Ideally, I am looking for something that periodically broadcasts / multicast mailings for each individual machine so that the machines participating in it can create a global status table and everyone can see who the master should be. The state in this case is arbitrary key / value pairs.

I would rather not invent any wheels, so I'm curious to know if anyone here can point me in the right direction?

+7
source share
3 answers

I am not sure if there is any application for your purpose or not. But I know that you can write a simple program with the MPI library and broadcast any information that you need.

all clients can send their state to the root directory of the node, and the root node can then broadcast the message.

which you need for this:

MPI_Bcast MPI_Send MPI_Recv 

There are many C ++ / MPI tutorials on the net, just google it!

+1
source

If I were you, I would explore memcached (memcached.org) or one of the nosql variants.

+2
source

It looks like Apache ZooKeeper might be a good match. It distributes a hierarchical keystore. To bring their review page :

ZooKeeper was designed to store coordination data: status information, configuration information, location information, etc.

Here is an example of a simple Leader Selection Regulation , although it will require some definition to determine it in order to determine a leader by some weighted criterion.

+2
source

All Articles