Skip to content

bivek2003/Auction-House-System

Repository files navigation

CS351: Distributed Auction Project

Overview

This project simulates a distributed auction system with a central Bank, multiple Auction Houses, and Agents (both user-controlled and automated). Components communicate via sockets and can run on separate machines. The Bank tracks accounts and auction house registrations, while Agents bid on items hosted by Auction Houses. This project have been made by Bivek Sharma Panthi, Krishna Sedhain and Roman Balayar. The logic for agent, auction house and bank has been made by Krishna, Bivek and Roman respectively.

Features

Bank

The Bank service is the backbone of the system, providing secure account management and financial operations. It allows users to open and close accounts, register or deregister auction houses in its directory, and manage funds by blocking, unblocking, or transferring them when bids are placed or auctions conclude. Agents and auction houses can query their total and available balances at any time, and the Bank maintains an up-to-date list of all active auction houses for discovery.

Agent

The Agent acts as a client that participates in auctions by bidding on items listed by Auction Houses. It exists in two variants: user-controlled (manual bidding) and autobidding (automated bidding). Both variants share core functionality but differ in how bids are initiated and managed.

The User-Controlled Agent enables manual bidding via a JavaFX interface, allowing users to view auction houses, place bids on items, and track balances. It validates funds before submission, handles bid status updates (e.g., accepted, rejected), and blocks exit during active bids.

The Autobidding Agent automates bidding by randomly selecting items within its budget, placing bids slightly above current highs or minimums. It runs background processes without a UI, polls for auction updates continuously, and exits only when funds are exhausted or no auctions remain active. Multiple instances can simulate competitive bidding environments.

Auction House

Each Auction House is a standalone server that maintains a catalog of items, each governed by its own countdown timer. It accepts bids from connected agents—enforcing minimum bid increments and rejecting invalid or late offers—and notifies participants when they’ve been outbid, when they win an auction, or when an auction closes. The system persists every item’s status to a CSV file upon change, and a built‑in JavaFX Configuration & Monitoring GUI allows administrators to register multiple houses with the Bank and observe live auction activity, including open items, the most recently closed item, and each house’s active or inactive status.

Features to be Implemented in Future

  1. Send winning notifications or outbid alerts via email or desktop notifications for user-controlled agents.
  2. Allow agents to search or filter auction items by name, category, or price range to improve usability.
  3. Integrate basic authentication (username/password) for Agents and Auction Houses to enhance security and accountability.
  4. Add a detailed bid history view for agents and auction houses, along with persistent logs of all events for auditing and debugging.

How to Run

  1. Run the Bank.jar java -jar Bank.jar or run directly from the IDE BankServer.java
  2. Run the AuctionHouse.jar java -jar AuctionHouse.jar or run directly from IDE AuctionHouseConfigGUI.java and the BankIP should be your Lan IP address of the machine where your BankServer is running and Port is 5000. If you are running BankServer and AuctionHouseConfigGUI in same machine then you can just type localhost in BankIP option.
  3. Run the Agent.jar java -jar Agent.jar or run directly from IDE AgentGUI.java and the BankIP should be your Lan IP address as mentioned in AuctionHouse and Port should be 5000.
  4. (Optional Testing) You can run for your test case AutoBidding.jar java -jar AutoBidding.jaror run directly from IDE AutoBiddingAgent.jar and further prompt entry should be same as mentioned in AgentGUI and AuctionHouseConfigGUI.

Known Bugs

  1. When running AutoBidding Agent and if there are no items in AuctionHouse then it will show error of NullPointerException.
  2. Sometimes while adding more auctionhouse in AuctionHouseConfigGUI then the house order showing is GUI is incorrect.
  3. Sometimes it doesn't run on multiple device because it doesn't account for potential outgoing connection maybe due to device TCP port block or firewall block.

@authors Bivek Sharma Panthi, Krishna Sedhain and Roman Balayar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages