Welcome Guest, Not a member yet? Register   Sign In
XML-RPC
#1

[eluser]NeilyM[/eluser]
Hi Guys

I'm about to dive in and develop a project using this great system.

One question though...

Does the XML-RPC functionality allow multiple requests to be sent and processed within one call or would I need to send multiple calls, each with its own request?

Thanks!

Cheers,

Neil
#2

[eluser]bretticus[/eluser]
Never used it before, but the paradigm for remote calls stipulates one call per remote function/method. You can certainly call the service multiple times in your origin script (just separate http requests to the service.) If there was a way to call multiple methods per http requests, how would you sort out the results? Perhaps you need a method that can do multiple things? If you have some insight here that I am totally missing, please enlighten me. Smile
#3

[eluser]NeilyM[/eluser]
Thanks.

I don't want to go down the road of issuing multiple HTTP requests because that REALLY slows things down.

One method that does multiple things would be a way forward but is not my ideal solution because it makes the solution more rigid.

Separating the results is easy - I actually wrote something myself that does this. Each request has a unique id and the responses contain the id so that you can separate them. That said, I don't want to pull in all this home-brew code if I can help it.

Cheers,

Neil
#4

[eluser]bretticus[/eluser]
[quote author="NeilyM" date="1266103590"]
Separating the results is easy - I actually wrote something myself that does this. Each request has a unique id and the responses contain the id so that you can separate them. That said, I don't want to pull in all this home-brew code if I can help it.[/quote]

In that case, I'd agree that you might be better off rolling your own. But what is to stop you from making one call to a method that can handle and return multiple requests (and using the XML-RPC class?) In other words, encapsulating the multiple request/response in one method call?
#5

[eluser]NeilyM[/eluser]
[quote author="bretticus" date="1266105868"]In other words, encapsulating the multiple request/response in one method call?[/quote]

I think that's what I'm going to do.

The reason I didn't want to go down this route is because I'm writing an API and I wanted to make it possible for users of the API to send multiple requests of their own choosing in one call, rather than being forced into using "multiple request/response" methods that I had pre-defined.

I hope that makes sense.

Cheers,

Neil
#6

[eluser]bretticus[/eluser]
Yeah, that totally makes sense. XML-RPC is not a protocol that promotes speed. Smile Too bad there's no easy way (that I can think of but then again, I've never used this before) to keep a persistent http connection open to your server per client (I think python has something like this. Not sure if a Webserver supports it as that may be a client-specific lib. Anyways...interesting research topic.)

Good luck!
#7

[eluser]NeilyM[/eluser]
Thank you for your feedback.

I'll have a think about the best way to do this over the next day or so.

Cheers,

Neil




Theme © iAndrew 2016 - Forum software by © MyBB