Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to create a room that should be like static on the server until server is down  RSS feed

 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on a chess game. I need to construct a game room where all the player are present and room chat is up. Also some tables where games are being played. Now my question is how to create this game room??
To me this room must need to be like static or global (if I am not mistaken) that is up when server starts and players can join this room and should be down when server is done. How can I implement such room that would stay up for infinite time.

Thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before thinking about how to implement it, I think you need to come up with a more full-fledged list of requirements: what are all the functionalities, and what are all the interactions, you would need to have for this. What are the persistent bits of data you'd need to store (maybe in a DB)? Are there user accounts? If so, how do those come about? Etc.
 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Before thinking about how to implement it, I think you need to come up with a more full-fledged list of requirements: what are all the functionalities, and what are all the interactions, you would need to have for this. What are the persistent bits of data you'd need to store (maybe in a DB)? Are there user accounts? If so, how do those come about? Etc.


Ulf Dittmer this is not my question. I have all that stuff. You know I have list of functionalities and stuff. But now I need to know how to create a game room that would stay up for as long as server is up. And there should be one instance of this room that should be accessed with every request. But how to create a game room like I asked?
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you picked out your technology stack? Do you havesome sort of design in place? The answer to the specific question you have entirely depends on your design.
 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayesh A Lalwani wrote:Have you picked out your technology stack? Do you havesome sort of design in place? The answer to the specific question you have entirely depends on your design.


I do not understand how this is related to design? I just need a way to create a room that would stay up so that I could continue.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
waqas imtiaz wrote:Ulf Dittmer this is not my question. I have all that stuff. You know I have list of functionalities and stuff. But now I need to know how to create a game room that would stay up for as long as server is up. And there should be one instance of this room that should be accessed with every request. But how to create a game room like I asked?

Well, then what are you asking? Web apps are generall designed to be up as long as the server is up, so I'm not sure what you're unsure about in that regard. And what do you mean by "one instance"? If you want only a single game room you'd only implement a single one. What do you have so far, and where specifically are you stuck making progress?
 
waqas imtiaz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I got it. I should implement game room using java bean with an application scope so that this game room is available to all of the users. I think I got it.

thanks everybody.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea how that follows from the previous discussion, but if you think your design can be implemented that way, why not.
 
John Schretz
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
waqas imtiaz wrote:I think I got it. I should implement game room using java bean with an application scope so that this game room is available to all of the users. I think I got it.

thanks everybody.


I would think you would run into concurrency issues here, i could be wrong though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!