XML-RPC - instance

Discussion in 'Python' started by Manuel Huesser, May 25, 2004.

  1. 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
     
    Manuel Huesser, May 25, 2004
    #1
    1. Advertising

  2. 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
     
    Brian Quinlan, May 25, 2004
    #2
    1. Advertising

  3. Manuel Huesser <> wrote in message news:<>...
    > 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/Cookbook/Python/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.
     
    Graham Dumpleton, May 26, 2004
    #3
  4. > 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?
     
    Manuel Huesser, May 26, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Li Ma
    Replies:
    2
    Views:
    329
    Li Ma
    Jan 14, 2004
  2. Pere Montolio

    XML RPC to ONC XDR RPC

    Pere Montolio, Aug 11, 2004, in forum: XML
    Replies:
    0
    Views:
    734
    Pere Montolio
    Aug 11, 2004
  3. Ymtrader
    Replies:
    1
    Views:
    587
    Adam Tauno Williams
    Mar 15, 2011
  4. Shirish Joshi

    Ruby and Sun-RPC or ONC-RPC ?

    Shirish Joshi, Apr 7, 2004, in forum: Ruby
    Replies:
    0
    Views:
    203
    Shirish Joshi
    Apr 7, 2004
  5. Vladimir Konrad

    rpc (not xml-rpc)

    Vladimir Konrad, Sep 2, 2005, in forum: Ruby
    Replies:
    5
    Views:
    140
    Austin Ziegler
    Sep 3, 2005
Loading...

Share This Page