Distributed database tailored for use in IoT projects. This is just a learning project for me. I work on it from time to time. My main goal is to get mor familiar with the challenges and patterns for building distributed systems.
Given: A node that's actively listening for Node advertisements of new nodes wanting to join the system When: A new message comes in from the Service Bus Then:
The receiving Node checks if the message is older than 10 seconds. If it is, it does nothing
The receiveing Node checks the identity of the advertising Node based on its identifier
If the active node picks up the message that was generated by itself, it does nothing
If the node advertisement comes from any other node than itself, the active Node needs to do the following tasks
Checks if the advertised node is already persisted. If yes, the current node writes to WAL with LogTYpe NodeUpdate and updates the Node
If advertised Node is not persisted, the active node writes to WAL with LogType NodeInserted and persists the new Node
While implementing this, we need to make sure that each Node persits data about existing Nodes in two different ways:
Nodes that sent advertising messages but that were not yet accepted in the system
Nodes that ar actively part of the system
In this issue we concentrate only on persisting nodes that sent an advertisement, therefore, we'll only look in the nodes that are not yet accepted and perform the mentioned actions on that data store.