Comms Protocol design dilemma

Dominic oblivious at web.de
Tue Apr 8 04:48:04 EDT 2003


> number generation involved, I can pretty much rule out asynchronous
> sockets. Is there any better strategy to tackle this problem?

Well asynchronous sockets are fine. I've written a load-test
client in Python which handles 1000 tcp connections simultaneously.
(1000 sockets is the per process limit for non root users)
I've used the python asyncore module. If you use asynchronous
sockets you need to keep your session state explicitly since
you do not have threads. You could use a finite-state-machine
or Python's generators. (See my previous mail on comp.lang.python,
Programming Erlang style in Python. You should certainly
check out the Erlang programming language homepage (for the concepts)
from Erricson since that language has been designed for servers which 
you intend to write.)

Ciao,
  Dominic





More information about the Python-list mailing list