views:

26

answers:

1

Hi,

I am going to start a new online trading simulation game.

Server Page:

A game will be loaded with an xml which contains the instruments for this game and each instrument initial and changing factor price(which determines the price for the next interval ex: 1 min).

User Page:

After the game is loaded successfully, Users can launch a page where they can buy/sell instruments. During this buy/selling process, the profit/loss should be shown to user in real time. A dropdown will be populated with the instruments, when selected, should show a real time graph of the price.

Design:

I want to use ASP.NET and silverlight to develop this application where an ajax request will be sent in configurable time to the server to get the latest details about the instruments. Then based on the response, the client browser will be updated with the latest prices. The instrument graph also will be updated in the same way.

So, I would like to know whether this is a right way of building this applicaiton.

Please give me your valuable suggestions.

Thanks, Mahesh

A: 
  • Use a database, not XML ;) Well, I do, but my application is no a game.
  • ASP.NET in process is bad for containing a simulated price system - you have little control over the life cycle, and two appdomains may run at the same time.

-> better start a service for hosting the market simulation. Here you can acutally make sure that you have ONE instance of your market running at the same time.

Besides that, things like fine.

TomTom
Thanks for the reply. If I understood your solution correctly, a service needs to be written to host the server. client web page needs to talk to the service by using remoting. Is my understanding correct???
Mahesh
Yes, although the usage of remoting may be a little very outdated. I am working on a similar system (just no game - real trading application) and I decided against remoting and for the use of WCF.
TomTom