[Tutor] continuouse loop

Martin Walsh mwalsh at groktech.org
Sat Jul 19 22:22:51 CEST 2008

Monika Jisswel wrote:
> Thanks or your replies, in fact I need my server to recieve queries from
> some 40 clients, process the recieved text (some calculations) & send a
> response back to them, in my previouse application I used a database,
> (they entered thier queries into the db & my calculating script looks at
> new records in db every 2 minutes & inserts  the answers  into the db
> too so that the users could see them on thier interface. but now I need
> to move to a server/client design because at the time i had created this
> program I didn't have much time & I had to put it into production.

Assuming your 40 clients represent real human users, and not automated
processes, I almost always approach this kind of problem with a web
application, usually a cgi script or simple mod_python handler. That way
I can spend more time solving the problem at hand, and less on
client/server design details or client installation/upgrade scheduling.
But then browsers and web servers are very common in our environment.

> Right now I am working on some code using the SOCKET module as it was
> the only module that allows inter-process communication & was simple
> enough for me  to understand how it works.

In that case, you might want to have a look at the SocketServer module
also. http://www.python.org/doc/lib/module-SocketServer.html


More information about the Tutor mailing list