By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,474 Members | 3,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,474 IT Pros & Developers. It's quick & easy.

Help with async xmlrpc design

P: n/a
I have an xmlrpc client/server system that works fine, but I want to
improve performance on the client side.

Right now the system operates like this:

client makes request from server (by calling server.request() via xml-rpc)
server places "request" on queue and returns a unique ID to the calling
client repeatedly asks server if the request with the given ID is
complete via server.isComplete(<id>)
server eventually completes processing request
client eventually gets an affirmative from server.isComplete(<id>) and then
client pulls results from server via server.fetchResults(<id>)

originally the client only made one request at a time, and each one was
processed and results fetched in order.

I want to change this so that the client can send multiple requests to
the server and have them processed in the background.
There are a lot of different approaches to that process, and I'd like
advice on the best way to go about it.

I could simply place the request checking and results fetching into a
thread or thread-pool so that the client can submit requests to some
kind of queue and the thread will handle submitting the requests from
that queue, checking for completion and fetching results.

Unfortunately, that would mean lots of calls to the server asking if
each of the requests is complete yet (if I submit 100 requests, I'll be
repeatedly making 100 "are you done yet?" calls). I want to avoid that,
so I thought there would be some way to submit the request and then hold
open the connection to the server and wait on the completion, but still
allow the server to do work.

Any advice on how to avoid polling the server over and over for request
completion, but also allowing the client to submit multiple requests
without waiting for each one to finish before submitting the next?

Thanks in advance!

mediocre nebula.

Aug 17 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.