Poker game...

Hi,

I’m working on a (multiplayer) poker game which will be playable using a tv set-top-box (iptv solution). It’s basically a web frontend with all the logic on the backend. People will be able to play poker thru their TV with other people, who are also playing thru their TV.

What I am wondering about (and I DON’T have lots of web development/JEE experience with Java) is how I would implement the following:

When the user enters the poker game he should see a list of available poker tables. Just like if you were to walk into a casino you would see all the tables, and how many are playing at all the tables, and what tables have available seats. What I want to do is to make the server create tables when a lot of players are playing and many tables are full, but delete idling tables.

I don’t know how I would do that using a servlet based web, unless I would somehow run up some control-thread that controls all the table-threads? Or would I rather want to write some special server and run it up on some special port and communicate with it (from the web app) with soap/webservices?

I was thinking of using Spring+Jetty, just a regular MVC web using Spring’s IoC, but I am worried I need to write some special server for this.

Any help?

[quote]I don’t know how I would do that using a servlet based web, unless I would somehow run up some control-thread that controls all the table-threads? Or would I rather want to write some special server and run it up on some special port and communicate with it (from the web app) with soap/webservices?
[/quote]
That’s how I’ve always thought about doing something like that!

[quote]When the user enters the poker game he should see a list of available poker tables. Just like if you were to walk into a casino you would see all the tables, and how many are playing at all the tables, and what tables have available seats. What I want to do is to make the server create tables when a lot of players are playing and many tables are full, but delete idling tables.
[/quote]
database comes to mind… ;D

Actually now you say that, you could eliminate your server and have the players interaction trigger the server to perform a clean up of the lobby. I don’t know what sort of load that would put on the server if 50 people are all actively looking at rooms!

The load wouldn’t be that high: we are NOT talking about real-time. Regarding rooms etc: You can cache room information to reduce database load if necessary.

Yes, but you want the lists of rooms to be up to date in real time. Of course being several seconds out of date is not a problem; when playing on line poker it is more often than not that I enter a room with 8 people to find that it is now full with 10 people when I enter.

Exactly what I am talking about! A 5 seconds cache…

Well,

My thoughts were to have some BoardController (or whatever) thead that maintains a list of boards in some List. It periodically checks all the boards, how many players are in each, and from that information it can determine if it needs to remove boards or add new boards.
Not sure if keeping this information in a database is good.

Doing this for every user interaction seems like a overkill, especially if there are (let’s say) hundreds/thousands of players, and for every event they generate I need to check the boards? This means a huge needless overload on the server.