Orion Mazzor
May 6th, 1999, 06:16 PM
Which is better suited to what? It makes sense that synchronous sockets need to be run using threads, and that asyncronous doesn't. But can a server setup with asynchronous sockets handle more connections/load then an a server with synchronous sockets? Consider the following situation:
[--snip---]
A server will handle a high volume of people that will be connected to the server over a long period of time. There isn't a lot of traffic that will be going back and forth, but there is the potential of a lot of traffic.
[--snip---]
The socket code could be setup to be synchronous, and each connection is sitting on it's on thread. Any packets that come in, are posted to a message que that the main thread reads from.
Or
The socket code could be setup to be asynchronous, and each connection sits in a list of connections. Any packets that come in, are posted to a message que that the main thread reads from.
What would be the best way of approaching this?
Thanks
Orion
[--snip---]
A server will handle a high volume of people that will be connected to the server over a long period of time. There isn't a lot of traffic that will be going back and forth, but there is the potential of a lot of traffic.
[--snip---]
The socket code could be setup to be synchronous, and each connection is sitting on it's on thread. Any packets that come in, are posted to a message que that the main thread reads from.
Or
The socket code could be setup to be asynchronous, and each connection sits in a list of connections. Any packets that come in, are posted to a message que that the main thread reads from.
What would be the best way of approaching this?
Thanks
Orion