Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

How to do multi-threaded RPC::XML::Server

by zubster22 (Initiate)
on Apr 30, 2014 at 14:29 UTC ( #1084513=perlquestion: print w/ replies, xml ) Need Help??
zubster22 has asked for the wisdom of the Perl Monks concerning the following question:

Hey fun monks!

Our Perl XML-RPC server is starting to crawl under the volume of calls its getting. We want to incorporate thread pooling-- so the server doesn't have to wait on each call to finish. Even if there are other reasons for the slowness as well, we'd like to incorporate thread pooling or some forking mechanism to prevent future slowness.

Does anybody have any ideas of how to do forking/thread pooling with XML-RPC-- or where I could get more information?

Thanks!!!!!

Comment on How to do multi-threaded RPC::XML::Server
Re: How to do multi-threaded RPC::XML::Server
by trwww (Priest) on Apr 30, 2014 at 14:55 UTC

    Assuming you're using rjray's RPC-XML library, you can use the Apache::RPC::Server mod_perl handler that comes with it.

    If this isn't the RPC library you're using, you'll want to find similar support for your library, or build a comparable roll-your-own.

      Thanks!!!! You've given me the next step-- which I probably would have never found on my own.

      I'll tell you how it goes!!

        Thank you again for your very helpful post earlier!!!! I very much used it as a basis for what to do next.

        We finally got to implementing this.

        Here's an update:
        Our server is actually running rjay's RPC::XML::Server, which is a base class for his RPC-XML server tuned for mod_perl. Unfortunately, our server's running apache2 with mod_perl2. rjay's Apache::RPC::Server needs mod_perl 1.3, and Apache::RPC::Server doesn't support mod_perl2 yet.

        I also tried writing thread-pooling manually! I used ithreads with the module threads. I wrote a thread pooling script that worked really well as a separate script.

        Unfortunately, there was an incompatibility with the threads module and rjay's RPC::XML::Server server module. I kept getting a message about “use of inherited AUTOLOAD for non-method RPC::XML::Server::threads::create” or something like that. I tried editing POSIX.pm, XSLoader.pm, and a couple other modules in order to change some of their autoload code. Nothing that I've done up until this point worked.

        Maybe somebody here has an idea as to what I could do next?

        Thanks again!!!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1084513]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-08-21 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (144 votes), past polls