This project is a Java-based implementation of a distributed peer server for ZooKeeper, a coordination service for distributed applications. It handles network communication, state management, leader election, and fault tolerance through a heartbeat mechanism.
UDP Communication: Facilitates reliable message exchange between server nodes using UDP message sending and receiving. State Management: Manages server states (LOOKING, FOLLOWING, LEADING) and transitions based on the consensus protocol. Leader Election: Implements leader election algorithms to dynamically elect a leader among the peer servers. Heartbeat Mechanism: Monitors server availability and triggers leader elections in case of node failures, enhancing fault tolerance. Logging: Maintains detailed server logs using Java Logger and FileHandler for debugging and monitoring server activities.