This documentation provides guidelines on managing nodes within our distributed system. It covers the initial setup of nodes and the process of adding new nodes to the system. Proper management of nodes is crucial for seamless CRUD (Create, Read, Update, Delete) operations.
-
Starting Nodes Before performing any CRUD operations, it's essential to start all the nodes listed in the nodes dictionary within the Node class. Each node in the system needs to be initialized and running to handle requests and data replication.
Make sure that each node is alive ('isAlive': True)
-
Adding New Nodes to the system
- Modify the "nodes" Dictionary in the Node Class
- Modify the "nodes" Array in MessageHandler
- Start nodes
-
The way Client Connection Works
- Connect to a node.
- Send the "CLIENT_REQUEST_COORDINATOR_INFO" message. Wait for a response.
- Interpret the response:
- If the response indicates a different node as the coordinator, disconnect and connect to that node.
- If the response indicates the current node is the coordinator, continue with the current connection.