Request for suggesstions and comments

akameswaran at gmail.com akameswaran at gmail.com
Tue Jan 31 14:34:01 EST 2006


Hi, the advice is free, so tkae it for what it's worth.
Q. Is it possible to write an application for this
kind of server activity in Python? I mean whether
Python will be suitable for this kind of high activity
load, real time app?  - Absolutely, Look at Zope or Cheetah for
examples of fairly large
python based app servers.  That doesn't mean something written quickly
from scratch will work well.

Q. How much time it can take (approx.) to develop such
kind of server?
Very hard to say, I've written similar server code for a peer to peer
tool - haven't touched the server portion in a while - and I learned a
lot more about how python threads really work doing it.  complete
half-assed estimate - min 1 week, max 1 month.

Q. Do we need multi threading? If so, then whether the
Socket modules will be safe to use with multi
threading?
Q. What modules for networking (socket ?), database
access etc should I use?
This is an answer for both questions above, yes you'll need
multithreading.  Best idiom, each client gets a thread. and whatever
else you need(your pinger thread)  The socket modules are not entirely
thread safe.  I don't remember the problems, but they were there, and
relatively solvable, if I recall corretly, most issues were
non-critical in that they resulted in a bad shutdown, but didn't impact
the server while running..  As for modules, I worked most with
TCPSocketServer(?? is this the right name?  bad bad memory - don't have
the code here :)  But I think you for this it may be easier to use the
XMLRPC server.  A lot more is done for you than the more primative
SocketServers.  This is a particularly good route to go, if you know
XMLRPC already, or plan to add browser only clients in the future.

And on another note, welcome to Python - I switched from java, as my
most productive language, after visiting a client.  They needed a tool
built in a hurry.  Some ugly XML parsing that I knew would take about a
week to write.  Long story short, my first day with Python I wrote a
functional version of the XML code in 3 hours, and got a deliverable
version of the code written the next day.   And one more hint-  I just
switched from the TK based tKinter to wxPython - and I don't think I'm
going back.

Hope this helps.




More information about the Python-list mailing list