Auction Time
By Al Williams
Like many people, I've been known to buy and sell things on eBay. Recently, my mother, a relative newcomer to the Web, wanted to buy a few items from the auction site, so I tried to explain the ins and outs of online bidding to her. One of the hardest things to explain to a novice is how people "snipe" auctionsthey wait until the last minute to place their bid so that no one has a chance to outbid them. In traditional auctions, of course, this isn't possiblethe auction won't close until everyone has had a chance to bid.
Some other auction sites get around this by automatically extending the end of the auction until bidding ceases. However, as my son Patrick points out, it still doesn't quite catch the flavor of a real auction. That got me thinking about implementing a better realtime auction. To solve the problem, I decided to create a live auction environment in which buyers bid against each other in real time, and where the auction doesn't close until everyone is finished bidding.
Because data is constantly changing in a realtime auction, the system requires a constant connection between the bidding applets and the auction server. To make this possible, I created a custom Java server that interacts with applets running in each buyer's Web browser. Each auction requires a separate server to create a socket and listen for connections. That means that each auction process will have to use a separate port number.
Most of the information about an auction is static (the description, the image, the starting bid) so I decided to use a JSP script to show this content.