Project Group # 3 Gaurav S Kc (gskc@cs.columbia.edu) Tao Chao (tc171@columbia.edu) Alexander Haubold (ah297@columbia.edu) Axion User Agent Documentation -- About User Agent -- The User Agent is the client software in which users can register themselves, bid and post auctions. This program is written in c. -- Compiling Instructions -- Cd to directory and type 'make' NOTE: There are some problems compiling on the cunix machine, but it compiles fine on Clic linux and sun, and Mudd 251 Sun ultra 10. On linux the following line: CLIB=-lsocket -lnsl Should be changed to: CLIB=#-lsocket -lnsl -- Our Auxion System Background -- Our Auction System is divided into four components: User database/server, lookup server, auction servers and user agents. The user server authenticates user login and password, and accepts new user information from the lookup. The lookup server directs the user agents to the proper auction server based on the categories, and also acts as a middle man when registering user information. Each auction server holds one category of auctions. Therefore, the load are distributed among the different categories. Within each categories, there are several servers holding the same replicated information. This design is extensible because when scaling upwards, further servers can be added to specific categories and ASP is only in effect among servers within the same categories (less replication and space required than if all auction servers hold all of the auction data). -- User Agent Specifications -- Basically, the user agents has hardcoded ip of a lookup server. This way, when new servers are added, the user agent doesn't need to know because the lookup server can direct the user agent to those servers. Our packet structure is make up of a string. The string contains a command number followed by '|' delimiter. e.g. 'command # |data if needed|data if needed| so forth |' The socket layer is made of functions to open connection, send string, receive string and close connection. This way, we kept the socket layer really simple and usable by the server and user agent. The User Agent usually takes user inputs and put them into the proper string to be sent to either the lookup or auction servers, and then interpret the reply. Error checking is implemented to make sure both user inputs and replied responses are correct. The following three choices are available for the clients: - Register New User When registering new user, the user agent asks for all the necessary user information and then sends it to the lookup with the following string: "051|userid|name|address|password|Cr.Card#|DateIss|DateExp|Email|Phone|" The responses are: "054|" - uid taken "056|" - Missing Info "058|" - Okay, registered The user agent will display a confirmation or some error message if something unexpected happens. - Posting an auction The user agent will first ask for the category listings: "011|" The response is the category listings: "012|Cat-ID|Cat-Name|Cat-ID2|Cat-Name2|..." The user can input their choice and that is send to the lookup "021|Catid|" The auction server ip and port are received. "022|IP|Port|" The user then fills the auctioned item information to be sent to that particular auction server. "031|userid|password|name|catid|url|quantity|type|timeend|minbid|" The responses are: "032|" - Authentication failed "033|Auction id|" - Success The user agent will display a confirmation or some error message if something unexpected happens. - Bidding an auction The user agent will first ask for the category listings: "011|" The response is the category listings: "012|Cat-ID|Cat-Name|Cat-ID2|Cat-Name2|..." The user can input their choice and that is send to the lookup "021|Catid|" The auction server ip and port are received. "022|IP|Port|" The user enters a keyword to searched in both the name and description field. "041|Catid|SearchStr|" The reponse is the number of matches followed by their information. This is displayed on screen. "042|NR matches|auction id|home_server|name|min price|timeend|" The user can quit by typing "QUIT" or enter the auction id of one of the items being displayed. The auction id + home_server will be sent. "043|auction id|home_server|" More in-depth info on the item is received and displayed. "044|Name|Description|url|quantity|timeend|min bid|" The user can enter the quantity, price, user login and password. The bidding information is send to the auction server. "045|auction id|quantity|price|userid|password|home_server|" The following responses are received: "046|" - error in the bidding price, quantity, etc "047|" - successful "032|" - authentication failure The user agent will display a confirmation or some error message if something unexpected happens. -- Evolutionary Goals -- - The user agent can be hardcoded with several lookup server ip's in case if one lookup is down. - Better and more friendly user interface.