P
peelman
Hello,
I have written in Java using Eclipse, a turn-based game server. I
accept client connections from an applet and add players to games and
they play cards (poker). Wow, sounds great you must be thinking.
Anyway, for each connection I create 2 threads (one pipe for reading
and one for writing back to the client). Then for each game table I
create a thread too (every 10 players). Then I have a number of timer
threads in different parts of the system. So, I have a lot threads. I
am new to Java (only 3 months deep so far), and for this application I
want to be able to accomodate about 600 clients at once. I figure this
amounts to a maximimum of say 1500 threads.
Now, as a newbie perhaps that is ridiculous. Is this feasible, or is
this just too many threads? Is it just matter of beefing up the
hardware to deal with it or do I need to redesign a bit? In short, how
many is too many?
If I need to redesign then what would be sensible number of threads to
limit my design to?
Thanks in advance,
Neil
I have written in Java using Eclipse, a turn-based game server. I
accept client connections from an applet and add players to games and
they play cards (poker). Wow, sounds great you must be thinking.
Anyway, for each connection I create 2 threads (one pipe for reading
and one for writing back to the client). Then for each game table I
create a thread too (every 10 players). Then I have a number of timer
threads in different parts of the system. So, I have a lot threads. I
am new to Java (only 3 months deep so far), and for this application I
want to be able to accomodate about 600 clients at once. I figure this
amounts to a maximimum of say 1500 threads.
Now, as a newbie perhaps that is ridiculous. Is this feasible, or is
this just too many threads? Is it just matter of beefing up the
hardware to deal with it or do I need to redesign a bit? In short, how
many is too many?
If I need to redesign then what would be sensible number of threads to
limit my design to?
Thanks in advance,
Neil