[xSocket-develop] socket server design considerations
Status: Inactive
Brought to you by:
grro
|
From: Mike T. <mik...@ho...> - 2010-05-09 11:46:58
|
Hi Bit of a newbie to writing socket server code, but this library looks like it will do a lot of the donkey work, so I am going to give it a go. The requirement is fairly simple, allow connections from multiple clients, process the data they send (i.e. validate and send back an ack) and and write it to the database. I also need to poll the database for outgoing messages to any "online" clients. Would expect to need to support 100-250 clients concurrently. Should I handle the receive events in the onData event or is it best to pass the data to a worker thread (or pool of worker threads)? Any examples of this would be greatly appreciated. As for the outgoing messages, I am not too sure how to implement this. One worker thread that polls the database and if it manages to find data for a client, it sends it directly to the connection? Any guidelines would be appreciated. Cheers Mike _________________________________________________________________ http://clk.atdmt.com/UKM/go/195013117/direct/01/ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now |