bakwc / PySyncObj

A library for replicating your python class between multiple servers, based on raft protocol
MIT License
702 stars 110 forks source link

Auto node discovery #185

Open MahmoodSeoud opened 4 months ago

MahmoodSeoud commented 4 months ago

Hi,

Does this library support auto-node discovery? Meaning that if I were to insert a node into a cluster, I only have to provide one other peer. if not, is there a good example of how to incorporate this?

bakwc commented 4 months ago

It does not have a discovery of new nodes. It has ability to add new nodes dynamically, but the nodes should be discover by some other process and after discovery attached to a cluster using one of the following approach:

1) Node could be added either from code 2) Or using syncobj_admin

One of the approach to implement discovery is sending a multicast UDP packet in your local network and wait until response received from a new node. It would be cool to have a feature like this inside PySyncObj library, so if you could implement it we will accept PR.