Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > XML-RPC - instance

Reply
Thread Tools

XML-RPC - instance

 
 
Manuel Huesser
Guest
Posts: n/a
 
      05-25-2004
Currently it's possible to register a single functions or a an instance in
the standard XML-RPC library. Is there a possibility to refer to
a different instance, like in a session. Should be possible with HTTP/1.1,
but I haven't an idea.

If not with XML-RPC, are there other ways.

Thanks
 
Reply With Quote
 
 
 
 
Brian Quinlan
Guest
Posts: n/a
 
      05-25-2004
Manuel Huesser wrote:
> Currently it's possible to register a single functions or a an instance in
> the standard XML-RPC library. Is there a possibility to refer to
> a different instance, like in a session. Should be possible with HTTP/1.1,
> but I haven't an idea.


Could you be more specific? It is possible to do method dispatch pretty
much any way that you want; is that the functionality that you are
looking for?

Cheers,
Brian

 
Reply With Quote
 
 
 
 
Graham Dumpleton
Guest
Posts: n/a
 
      05-26-2004
Manuel Huesser <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Currently it's possible to register a single functions or a an instance in
> the standard XML-RPC library. Is there a possibility to refer to
> a different instance, like in a session. Should be possible with HTTP/1.1,
> but I haven't an idea.
>
> If not with XML-RPC, are there other ways.


With the simple XML-RPC server that is provided with Python, most people
probably do this by having each method which is to operate on an instance,
to require a first parameter which identifies the instance to use.

Another approach which can be used is not necessarily straight forward
with the simple XML-RPC server included with Python. That is, for
different instances of a service or object which you want to manipulate
being referenced under a different URL. You should be able to do it, but you
would have to override the method dispatch routines to look at the URL
and use it as the basis of selecting some different set of methods or objects
against which the request is executed.

I prefer the latter approach of using different URLs to identify different
fixed services or transient services related to a session. The approach
of using scoping within the method name to identify different services
under the one URL doesn't really cut it for complicated systems.

Although not using the standard Python XML-RPC server, and also not
pure Python for that matter, you might look at the following Python
Cookbook example for an example of how URLs can be used to identify
information pertaining to different sessions.

http://aspn.activestate.com/ASPN/Coo...n/Recipe/81613

The example uses different URLs for different database cursor instances.
The underlying framework is flexible enough that in this case the cursor
created for that specific session can be made to expire after a set period
of inactivity as well.

Echoing what another poster said, you would need to clarify perhaps
what you are trying to do.
 
Reply With Quote
 
Manuel Huesser
Guest
Posts: n/a
 
      05-26-2004
> Could you be more specific? It is possible to do method dispatch pretty
> much any way that you want; is that the functionality that you are
> looking for?


Yep there are classes where you can do that in any order, but there are
classes where you can't call methods in any order, too.

More specific?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Taglib problems - instead of a single instance per page, I have a single instance per application. chris brat Java 1 05-10-2006 11:16 AM
Problem when subclass instance changes base class instance variable Gerry Sutton Python 1 04-16-2005 06:06 AM
Accessing an instance via its memory address (instance at ...) Kent Johnson Python 4 11-13-2004 07:42 PM
converting base class instance to derived class instance Sridhar R Python 14 02-10-2004 02:47 PM
Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class. DJ Dev ASP .Net 3 02-08-2004 04:19 PM



Advertisments