I'm in the process of looking at a few web toolkits (Python) but the
application I'm developing is a little different than a normal
database driving application.
Currently we have a java 'console' that maintains a persistent
connection to a server (custom, binary protocol). I'm wanting to
provide a web front end to the server. I already have a python module
that implements a client (aka 'console').
So as each user starts a session I need to create a socket connection
to the server and maintain that connection until the session times
I've looked at a few options, first writing a daemon that accepted
xmlrpc commands from cgi scripts with the daemon holding the
connection but that seemed rather complex.
I'm currently playing with Twisted, while I am used to event driven
design (I use it over threads in network servers a lot) I am not
completely sold on Woven, nor do I expect some of the people I plan to
hand this off to to 'get it'.
I understand that Webware is threaded instead of forking. Will there
be any problems maintaining a socket connection throught a users
session? The 'client' module will be doing stuff like reads and
writes to the server even while the user is idle (before the session
is timed out). I guess this would be similar to writing a web based
front end to IRC.
I'm just starting to play with Webware but thought I'd toss this to
see what information can be gained. Currently I think I'm looking at
Webware or Twisted (already using Twisted for some parts, not sure if
I need it/want it for the web bits tho).
From: Ian Bicking <ianb@co...> - 2003-12-05 18:42:48
On Dec 4, 2003, at 12:24 AM, jbi130@... wrote:
> I understand that Webware is threaded instead of forking. Will there
> be any problems maintaining a socket connection throught a users
> session? The 'client' module will be doing stuff like reads and
> writes to the server even while the user is idle (before the session
> is timed out). I guess this would be similar to writing a web based
> front end to IRC.
You won't be able to put the socket in the actual session. See a
recent thread started by Eduardo Elgueta for a little discussion of
this (the thread has no subject, how annoying). It's not hard to hold
onto the socket. The threaded, persistent server will probably be
quite convenient for this kind of application, compared to a
multi-process or asynchronous setup.
Ian Bicking | ianb@... | http://blog.ianbicking.org