asp.net - Referencing same object in different sessions -


i'm building web based chess in asp.net , idea keep information table (position of pieces, who's turn it...) in session reference instance of game class stores needed information.

i don't know how make sessions of both players contains reference same object on server when 1 player moves, other has in session information move made.

is valid way since want avoid lots of db accessing?

things "who's turn it" needs kept @ application level. either use static variable, or use application collection. personally, use static collection of 'game' objects. you'll need keep thread-safty in mind, because sessions have access same collection.


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -