xmlrpc / SimpleXMLRPCServer and multi-threading

Discussion in 'Python' started by Marco Aschwanden, Dec 29, 2003.

  1. I would like to develop a server based on python's xmlrpc. But I
    realized that SimpleXMLRPCServer does not spawn a thread for each
    request.

    How could the SimpleXMLRPCServer be turned into a multi-threaded
    Server?
    Is there a reason why the SimpleXMLRPCServer is not multi-threaded?
    Is there a plan to make it multi-threaded?

    Thanks for any hints in advance,
    Cheers,
    Marco
    Marco Aschwanden, Dec 29, 2003
    #1
    1. Advertising

  2. Marco Aschwanden

    Guest

    On Mon, Dec 29, 2003 at 02:47:35AM -0800, Marco Aschwanden wrote:
    > I would like to develop a server based on python's xmlrpc. But I
    > realized that SimpleXMLRPCServer does not spawn a thread for each
    > request.
    >
    > How could the SimpleXMLRPCServer be turned into a multi-threaded
    > Server?
    > Is there a reason why the SimpleXMLRPCServer is not multi-threaded?
    > Is there a plan to make it multi-threaded?
    >
    > Thanks for any hints in advance,
    > Cheers,
    > Marco


    I had also faced the same problem some time ago. To use the SimpleXMLRPCServer as a multithreaded server, I just changed the SocketServer.TCPServer to SocketServer.ThreadingTCPServer in the definition of the SimpleXMLRPCServer class and it worked fine for me. But it was on Python 2.2 and I haven't tried on later versions.

    HTH,
    Vivek Kumar
    , Dec 29, 2003
    #2
    1. Advertising

  3. Marco Aschwanden wrote:
    > How could the SimpleXMLRPCServer be turned into a multi-threaded
    > Server?


    Look for ThreadingMixin in the SocketServer reference. You should be able to
    create a new class derived from both SimpleXMLRPCServer and ThreadingMixIn
    to achieve a thread-per-request server.

    --
    Shalabh
    Shalabh Chaturvedi, Dec 29, 2003
    #3
    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. Etienne Posthumus
    Replies:
    1
    Views:
    1,093
    Roger Binns
    Apr 1, 2004
  2. Replies:
    38
    Views:
    1,255
    Dennis Lee Bieber
    Feb 15, 2005
  3. Achim Domma

    SimpleXMLRPCServer and Threading

    Achim Domma, Mar 28, 2007, in forum: Python
    Replies:
    3
    Views:
    433
    Laszlo Nagy
    Mar 29, 2007
  4. Vyacheslav Maslov

    multi threaded SimpleXMLRPCServer

    Vyacheslav Maslov, May 14, 2007, in forum: Python
    Replies:
    2
    Views:
    573
    Stefan Behnel
    May 14, 2007
  5. akineko
    Replies:
    3
    Views:
    2,597
    Jesse Noller
    Jan 29, 2009
Loading...

Share This Page