You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This project focuses on skeleton implemention of the Bully Algorithm in Leader E
5
5
6
6
### Implementation
7
7
Major implementation contraints or strategies involve-
8
-
* Each node is aware of the other's node network information, i.e. IP address and port
8
+
* Each node is aware of the network information of other nodes, i.e. IP address and port.
9
9
* There is one file which needs to be built and the program needs to run on several terminal windows, each representing a node in the network. IP addresses is 127.0.0.1 and port numbers range from 3000-3004.
10
10
* For ease of implementation, 5 nodes are allowed by default. More nodes can be added with minimal changes in the code.
11
11
* By default, 5th node is the coordinator.
@@ -14,21 +14,21 @@ Major implementation contraints or strategies involve-
14
14
15
15
### Output interface
16
16
Output interface contains 3 major components-
17
-
1. Selecting id of the node
18
-
1. Give an option to state if the node just recovered from a crash
19
-
1. Communicate with the coordinator
17
+
1. Selecting id of the node.
18
+
1. Give an option to state if the node just recovered from a crash.
Handles election received from the nodes with lower id.by sending them OK message along with the node invoking election. Checks like `no_election_invoked: bool` are present to prevent multiple elections by a single host.
This function is used by the coodinator by calling this function as broadcast in other nodes to update the coordinator id as the last stage of the Bully Algorithm.
This function is called by the particpants to communicate to the coordinator and get response from the function. Fail in calling or getting response this function from coordinator triggers the election.
0 commit comments