A distributed unique global ID assignment solution
Distributed Systems – TD9 : The Contest
These are the subjects of the M1: Mid-term exam - Distributed System by Eddy Caron.
The goal is the same for each question, that is to optimize your algorithms both in number of messages and message size (a way to have the knowledge of all the platform in a data structure is irrelevant).
Considering a distributed system with a tree structure where each node has the same ID (the identity of the node like a number). Write two algorithms to ensure that each node has a unique ID.
Considering a distributed system with a general graph structure where each node has the same ID. Write two algorithms to ensure that each node has a unique ID.
Consider a distributed system with a general graph structure where each node has a random ID (probably a few nodes can have the same ID, but not all). Write an algorithm to ensure that each node has a unique ID even with many initiators.
A Distributed implementation of Disjoint Sets Union a.k.a Union-Find.
TODO:
go build
Before running the App replica, is necessary to config some attributes in the appconfig.json
file.
{
"MyIP": "localhost",
"Port": 9002,
"Initiator": true,
"Neighborhood": ["http://localhost:9000", "http://localhost:9001"]
}
Let’s play.
./distributed-union-find