Z
zero
As a hypothetical question (not something I am working on, just something I
was thinking about last night), suppose you're implementing a simple
threaded server, for example a chat or game server. The server creates a
new thread for every user/client that connects to it. This thread then
handles all the incoming messages, and sends them to all other clients (for
example using a multicast address).
Now my question is, how many users - and hence how many threads - would you
allow at the same time? Do you select a limit based on the platform (eg
available memory, bandwidth), or are there other things to consider? Or,
would you not impose a limit at all, trusting that the system has enough
resources for your number of users (sounds like a bad plan IMO).
Looking forward to your replies,
zero
was thinking about last night), suppose you're implementing a simple
threaded server, for example a chat or game server. The server creates a
new thread for every user/client that connects to it. This thread then
handles all the incoming messages, and sends them to all other clients (for
example using a multicast address).
Now my question is, how many users - and hence how many threads - would you
allow at the same time? Do you select a limit based on the platform (eg
available memory, bandwidth), or are there other things to consider? Or,
would you not impose a limit at all, trusting that the system has enough
resources for your number of users (sounds like a bad plan IMO).
Looking forward to your replies,
zero