471,624 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Help with async xmlrpc design

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
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!

--
Presenting:
mediocre nebula.

Aug 17 '06 #1
0 1624

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by glin | last post: by
reply views Thread by Juan Carlos CORU—A | last post: by
2 posts views Thread by Tomislav Lepusic | last post: by
10 posts views Thread by Shawn Meyer | last post: by
4 posts views Thread by elyob | last post: by
3 posts views Thread by Manuel | last post: by
1 post views Thread by Sean Davis | last post: by
reply views Thread by Daniel Fetchinson | last post: by
1 post views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.