Remote Objects via CGI?

Diez B. Roggisch deets at nospam.web.de
Wed Nov 1 10:45:13 EST 2006


kpd wrote:

> Three are lots of good looking remote-object implementations for Python
> such as Pyro, Rpyc, and PyInvoke.    All of these require a deamon
> running to serve the remote objects.
> 
> Has anyone seen a method of doing this using CGI or FastCGI instead of
> a deamon?   I'm not worried about performance for this application, but
> I do have constraints on long-running processes.

This is pretty much a contradiction to what pyro (the others I don't know,
but I bet they are similar) does: serve requests from in-memory living
stateful objects.

CGI on the other hand will spawn a new process for each request, discarding
quite a few aspects. You'd have to re-instantiate the serving objects for
each request, if you want to keep the statefulness, you have to persist
state between requests and ensure there is some session state communicated.

All in all, it can't be done so easily as by only adapting an existing
RPC-solution, but you rather should roll out your own. Or stick with what
is available, like XMLRPC

Diez



More information about the Python-list mailing list