[pygr-notify] Issue 37 in pygr: run XMLRPC server in a separate thread by default

codesite-noreply at google.com codesite-noreply at google.com
Tue Feb 17 13:29:08 PST 2009


Updates:
	Cc: istvan.albert marecki

Comment #5 on issue 37 by cjlee112: run XMLRPC server in a separate thread  
by default
http://code.google.com/p/pygr/issues/detail?id=37

@Istvan: I suggested using the screen program to reconnect to the Python  
interpreter
session running the XMLRPC server, as a general way of being able to manage  
the
server (make changes, add new data sources, etc.) while the server is  
running.

THE PROBLEM: Currently, the server always detaches itself from the console  
as a
background process, so even if you started it from an interactive Python  
interpreter,
you lose that connection and have no way of managing the server.  Since we  
also had
no secure XMLRPC command mechanism either, this left us with no way at all  
to manage
the server.  If you needed to make any change, no matter how trivial, you'd  
have to
kill the server and restart it with whatever changes you wanted.

While I like the idea of a general and secure XMLRPC command interface for  
managing
the server, I think this will take some time to design and develop.  We  
haven't even
had a discussion about what commands people would want.  At any rate, this  
seems to
fall into the category of pygr.Data reform, which is scheduled for the 1.0  
release...
some distance in the future.

By contrast, it would be trivial to make the following change for the 0.8  
release,
giving a secure, general way of managing the XMLRPC server:

- start the server in a separate thread, so that the original Python  
interpreter
remains responsive even while the server is running.  If the process is an
interactive interpreter, don't detach from the console.  This would allow  
the user to
continue to issue Python commands that could control / update the server in  
any
desired way.  Note that this isn't true multi-threading in the sense that  
Titus was
warning could cause trouble; it merely means retaining an interactive Python
interpreter command line once the XMLRPC server is started.

- Recommend that users initially launch this interactive session within the  
UNIX
program screen, so that they can detach and re-attach their terminal to this
interactive session whenever they like.  Screen makes this really  
convenient.

- only the original user who launched the interactive session can  
re-connect to it
using screen, so it remains secure.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings



More information about the pygr-notify mailing list