I am working on a project to make a distributed network controller for OpenWRT.~~ I already have a design that has a master that serves as a the point communication~~ and truth but I am curious about algorithms that would work with a network that is spread out. It would need to not be to chatty and be aware of topology. Here is what I am thinking:
-
Each node should know which other nodes are closest. Data should flow from the closest nodes to the rest of the network. Each device will report its status to the closest nodes. It will relay data it receives to its neighbors.
-
Each node should be able to reach any other node
-
There could be a process of adapting by using random numbers. What I mean is that a node could periodically pick several random nodes out of a list of devices and then test latency, If the latency is smaller than the current list of close peers it will swap them.
-
The network should have a way to be quickly recovered by a admin
That’s all the thoughts I had. What I am looking for is existing research or projects that have algorithms I could use. I know things like Raft exist but Raft still has a master and is not suited for devices far apart. I know software like IPFS and I2P exist and that they are capable of organizing lots of devices on the internet in a decentralized way.
Anyone know of a consensus algorithm that will work in bad conditions and that can stay mostly reliable even if large portions of the network are down?
Update:
I don’t think I actually need consensus here. All I need is a way to calculate the number of hosts that need to receive and broadcast a change for the change to make it to 100% of the network. I now have a math problem.
Update 2: I am working on building a gossip protocol