Talk:Chat server

From Rosetta Code

It seems to me that there is the possibility that a slow/faulty connection could delay anyone sending messages. Suppose there are 4 people on the server, A, B, C and D. If B's connection is screwy, then any time A, C or D attempt to send a message, the server will either block on the broadcast to B, or the message will not be sent completely. Looking at the Python implementation, I see that connection is set to non-blocking, so the default behavior is the latter (incomplete message). I don't know about the other implementations, but I think this behavior should be clarified. Should one bad connection be able to disable the communications for the whole server, and is one slow connection receiving incomplete messages acceptable?

The proper way to handle this would be have a thread or threads to handle broadcasting to ensure that messages sent are complete and that they don't delay normal input processing, but maybe this is beyond the scope of the problem? --Paul.miner 16:44, 15 January 2011 (UTC)

The solution should provide a usable implementation. What this implies may be always fuzzy, but implementors could describe possible limitations and explain their reasons. --Abu 07:17, 16 January 2011 (UTC)
Sounds good --Paul.miner 06:51, 17 January 2011 (UTC)