MemDB: Stock Game

This is a game which allows multiple users to connect the server using thier web browser (e.g. IE or Netscape). After you have downloaded the StockGame.zip, you can unzip it and run the StockGame.exe directly. This will start a server (which is a web server and uses port 9425 in your machine). This server uses MemDB Memory Database Engine to store records and MemWS web server to serve the client. After that, you can enter http://localhost:9425/StockGame.htm in your browser to connect to the server and invite people to join the game. Other people can enter the URL: (http://your_host:9425/StockGame.htm) where 'you_host' is your domain name or IP address of your machine. After enough players have joined, you can click here or enter URL: (http://localhost:9425/?page=reset&player=resetUser&minute=10) to your browser to reset the game. The 'minute' field is the time the game will take. Then all players can start to buy and sell stocks in order to get the highest score within this time limit. After the timeout, the game will be over and the one who has the highest score will be the winner.

A screen slot of the game playing in Internet Explorer 5.0

This program demonstrates how we implement the Web-To-Database application. There is no CGI program. Client (Browser) communicates directly to our server and our server and database are embedded in one application (StockGame.exe). As shown in the above screen, the client submits the buy and sell requests from the IE browser. The browser establishes a connection with the server and the server then communicates with the database directly to receive or store the transaction. The server replies the client and remains the connection in some time so that the client does not need to re-establish the connection for the other requests. For scaling up, we can also separate the database and web server to different applications and place them to different machines. Multiple and distributed servers can also be constructed.

Return to the Download page of MemDB