rajveersangha
05-11-2009, 10:15 AM
Okay here is a design issue I am stuck with:
I have written a Texas Holdem multiplayer server from scratch using Java NIO and JAXB. Its key features are:
1. Allows user to join and play simultaneously in multiple tables, although a limit of 5 tables has been set.
2. Various Login scenarios:
a. The user may have logged in at the main website (socket not established yet)
b. The user may choose to open the Game Lobby without logging in at the main website. In this case he is just given a guestId and not logged in.
c. The user may go ahead and open a Poker Table (still not logged in) and watch a game in progress.
d. If he wants to be a part of that table, he clicks a seat and a login pop-up appears. At the same time the seat is reserved for him so that nobody else can take it. If login is correct and buyIn is within limits, he is seated on that seat.
Now I want to port my application to ES and I am quite confused as to how to implement such a customised user login model on ES4.
I thought about logging in any user as a guest, then as he requests to sit in, I log him out first and then relogin as a registered user.
But this has potential problems:
1. His user variables might be lost.
2. Upon logout, the connection also resets as well (Is this a bug in ES????).
All in all, i am confused and not able to go ahead with ES. Anybody advice me on this. Do I have to change some of my app design?
I have written a Texas Holdem multiplayer server from scratch using Java NIO and JAXB. Its key features are:
1. Allows user to join and play simultaneously in multiple tables, although a limit of 5 tables has been set.
2. Various Login scenarios:
a. The user may have logged in at the main website (socket not established yet)
b. The user may choose to open the Game Lobby without logging in at the main website. In this case he is just given a guestId and not logged in.
c. The user may go ahead and open a Poker Table (still not logged in) and watch a game in progress.
d. If he wants to be a part of that table, he clicks a seat and a login pop-up appears. At the same time the seat is reserved for him so that nobody else can take it. If login is correct and buyIn is within limits, he is seated on that seat.
Now I want to port my application to ES and I am quite confused as to how to implement such a customised user login model on ES4.
I thought about logging in any user as a guest, then as he requests to sit in, I log him out first and then relogin as a registered user.
But this has potential problems:
1. His user variables might be lost.
2. Upon logout, the connection also resets as well (Is this a bug in ES????).
All in all, i am confused and not able to go ahead with ES. Anybody advice me on this. Do I have to change some of my app design?