Passive Replication Auction System

Overview

The Passive Replication Auction System project is a distributed system created using Java and Remove Method Invocation (RMI) registry, developed during my third year at Lancaster University. It is designed to provide a reliable and fault tolerant auction system platform where multiple clients can seamlessly interact with the auction system, even if server failures occur. This system consists of a stateless front end, passive replication with multiple auction server replicas and clients that interact with the front end.

System Architecture

The Passive Replication Auction System is a distributed system consisting of the following key components:

Stateless Front End

The stateless front end is responsible for communicating with the clients. It forwards all client requests to and from the designated primary replica without storing any auction data itself. The design ensures that the system remains simple for all clients, allowing them to interact with the auction platform without needing to be aware of the underlying replica management or which server is currently acting as the primary replica. Keeping the front end stateless ensures that it is lightweight and removes risks of data loss from failures at this layer.

Key functions of the front end are:

Replica Management and Passive Replication

The auction system uses multiple replica servers to maintain consistent auction state data. All replicas are synchronised with the primary replica, ensuring that they all hold the exact same auction data at all times. Each replica is updated with its count number of processed requests to easily ensure that all replicas are up to date. This synchronisation ensures that even if the primary replica fails, another replica can be promoted to primary replica without any loss of auction data. The use of passive replication helps the system recover from faults and provides a high availability to users.

The system includes a bash file that automates the setup of the auction system, by starting the RMI registry, front end and the replica servers. The script allows users to easily add new replicas, each in a separate process.

system architecture diagram
Diagram of the system architecture

Client Program Functionality

  1. User Registration: Clients can register with their email to get a unique user ID. This user ID is necessary for participating in auctions.
  2. Auction Creation: Registered users can create new auctions by specifying details such as the item name, description and reserve price.
  3. Bidding: Registered clients can place bids on active auctions. Bids are only accepted if they are higher than the current highest bid and meet the reserve price.
  4. Auction Listing: Clients can view all active auctions, including information such as the item ID, description and highest bid.
  5. Auction Closure: Only the auction creator can close the auction. If the reserve price is met, the item is sold to the highest bidder. The winning bidder’s information is stored and displayed upon closure.

Conclusion

Developing this Passive Replication Auction System project significantly deepened my understanding of distributed systems, particularly in the areas of fault tolerance and replication. Implementing passive replication in this project highlighted the importance of maintaining system state consistency and ensuring a seamless failover process in the event of server failures. This project also provided practical experience with Java RMI, allowing me to explore remote method invocations and the complexities of managing communication within a distributed system. Overall, this project provided a valuable opportunity to explore the intricacies of designing a reliable, scalable system and reinforced key concepts such as redundancy and fault recovery, which are essential for building real-world distributed applications.