magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 2000 > 11 > Java@Work  

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" auctions—they 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 possible—the 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.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2