Auction House

Language: Java

Overview

Auction House was a school project all about networking and the client-server model. The actual project was to build a distributed auction house. There are three main components.

Bank

The Bank class is a simple server in this system. It gets started first and listens for clients to request bank accounts. It is vital in brokering sales of items that are bid on. Auction houses will open a bank account with the bank. Agents will open up a bank account with a balance. Either client can connect to the bank, but the bank needs to be running first, or the client will error out. An agent can bid on any items in the Auction House store. The auction house will check with the bank to see if the funds exist and if they do, it will put a hold on the bid amount. If the item is sold, the bank transfers the money out of the Agent's account and into the Auction House's bank account. It performs some other management, but I will let you read the GitHub readme to learn more and run the system.

Auction-House

The Auction House class acts as both a server and a client. It is a server to the Agent class, and it is a client to the Bank class. It will maintain a list of randomly generated items to be sold. It provides this list to clients who can request to bid on an item. It uses the bank to check for available funds and to lock them until the item is won. It will release the lock if the Agent gets outbid.

Agent

The agent class is simple. It opens up a bank account and connects to all the auction houses. It browses the items using a GUI and makes bids on the items in hopes of winning them.

Final Thoughts

This project was enjoyable! I think the most challenging part was working in a team. It is hit or miss if you get a reliable partner in a school setting. We learned how to use sockets for communication, but we were never taught how to use our application over the internet and not just a LAN. We were able to figure out how to perform port forwarding to test this with all the partners. It was magical and memorable!