Is there a concept for shared sessions in ASP.NET?

I am working on a game in a web application (ASP.NET), which will consist of one page, and on this page there will be a playground similar to a monopoly. I am trying to determine what the best architectural approach will be. The main requirements that I have defined so far are:

  • Up to six users use a single game state object.
  • Users need to constantly (relatively) update the current state of the game, i.e. in turn, what the active user did just earned how much money each user makes, etc.

I was thinking about saving the state of the game in the database, but it seems that it is unnecessary to update the database when the game state object (say, in the cache) can be updated. For example, a stream might look like this:

  • Receive a data request from the user.
  • Search for data in the database. Create an object from this data.
  • Make sure that the user has permissions to execute the request based on the state of the game (i.e. make sure that it is really their turn or that you have enough money to buy this property).
  • Update game object.
  • Write the game object back to the database.
  • Repeat for each individual request.

Note that one server will serve several parallel games.

  • I thought about using AJAX for requests to an ASP.NET page.
  • I thought about using AJAX requests to a web service using silverlight.
  • WCF silverlight.

, . , , . - , ? , ! .

: - , ?

+3
3

, , , -, .

, . , , , , .

, , gamestate , (, , ... ).

- , , , , , , . , , , "" . , , , .

, . ( ).

, " " , ( ). , , , () ( , , ).

+3

ASP.Net , . , , , .

, . , .

+4

. . ASP.NET. sessionID, .

, , -. , , .. 6 - .

+1

Source: https://habr.com/ru/post/1698902/


All Articles