Search the web
Sign In
New User? Sign Up
xml-rpc · XML-RPC Discussion
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Bidirectional RPC   Message List  
Reply | Forward Message #6823 of 6840 |
Re: [xml-rpc] Bidirectional RPC


On 15 Jul 2009, at 15:45, akalaghan wrote:

> Hello,
> I found this very old post
http://tech.groups.yahoo.com/group/xml-rpc/message/2306
> , asking a similar question as I will do in a moment. The only reply
> mentions that there *is* a solution, but not how it looks like.
>
> I have a situation where clients (behind a firewall, blocking
> incoming connections) need to register with a server for the purpose
> of receiving notification of certain events.
>
> The asynchronous client documentation
http://xmlrpc-c.sourceforge.net/doc/libxmlrpc_client++.html#asynch
> together with the example code xmlrpc_asynch_client.c show, how I
> can register a one-time callback. But my understanding is that this
> only waits for the server side procedure to return, upon the return
> the callback is executed, and then the callback can't be executed
> again from the server side.
>
> How can I setup a client-server pair, where the server can execute
> the same client callback repeatedly? A workaround is of course to
> again register the client callback immediately whenever the client
> is calledback from the server. But this causes a large overhead.
>
> Is it possible to use xmlrpc for bidirectional communication, where
> both the client and server can initiate a RPC at any time?
> Preferably using only a single connection that is initially
> established from the client to the server (firewall!) without
> keeping a second connection open for RPCs initiated by the server?
> Theoretically I could come up with such a solution using the basic
> HTTP protocol after *lots* of programming efforts - it is definitely
> possible. But I'd prefer an xmlrpc solution, as I find that protocol
> much easier to apply.

One option is to use JABBER-RPC (http://xmpp.org/extensions/xep-0009.html
). this is XML-RPC using XMPP as a transport mechanism rather then
HTTP. You run a client and a server at both ends so you get full
bidirectional communications. Both ends can be behind firewalls.

There aren't that many implementations about. There's a Groovy
implementation which is a thin wrapper over a very lightweight Java
implementation. (Disclosure: I wrote it). Some time ago I tested it
over GoogleTalk and it worked OK, however I'm not sure what it's
status is today. The guys on the Groovy list are very helpful and may
be able to update you http://groovy.codehaus.org/.

John Wilson



Wed Jul 15, 2009 5:50 pm

tug123uk
Offline Offline
Send Email Send Email

Forward
Message #6823 of 6840 |
Expand Messages Author Sort by Date

Hello, I found this very old post http://tech.groups.yahoo.com/group/xml-rpc/message/2306, asking a similar question as I will do in a moment. The only reply...
akalaghan
Offline Send Email
Jul 15, 2009
3:00 pm

... One option is to use JABBER-RPC (http://xmpp.org/extensions/xep-0009.html ). this is XML-RPC using XMPP as a transport mechanism rather then HTTP. You run...
John Wilson
tug123uk
Offline Send Email
Jul 15, 2009
5:52 pm

Thank you for the reply. One of my requirements is to have at least C (or C++) and java implementations for both server and client side available. Plus the...
Arne Kalaghan
akalaghan
Offline Send Email
Jul 16, 2009
10:41 am

... Maybe jsonrpc might be better suited to your needs - it is less hardcoded to http and better suited to bidirectional communications. There are a lot of...
Gaetano Giunta
gaetanogiunt...
Offline Send Email
Jul 16, 2009
10:52 am

... Excellent. It seems that you saved me lots of work. For some reason I had jsonrpc in my mind as some derivative of xmlrpc, using a less structured format...
Arne Kalaghan
akalaghan
Offline Send Email
Jul 16, 2009
12:50 pm

... You could consider having a getNextEvents service available; clients would call it, and get back an array of the most recent events ready for delivery to...
Jay Carlson
nop@...
Send Email
Jul 16, 2009
11:02 am

... This is another option that I was considering. But it needs two connections per client/server pair, doesn't it? If the server is executing (=idling most of...
Arne Kalaghan
akalaghan
Offline Send Email
Jul 16, 2009
1:00 pm

... I think that once we've decided to use HTTP, we no longer care so much about connections; after all, the concept of a connection is lower in the protocol...
Jay Carlson
nop@...
Send Email
Jul 16, 2009
3:23 pm

... I don't know, yet. But I think that, depending on the server performance, every server will run into saturation at 10, 100 or 1000 simultaneous...
Arne Kalaghan
akalaghan
Offline Send Email
Jul 16, 2009
3:48 pm

... From: Arne Kalaghan <akalaghan@...> Subject: Re: [xml-rpc] Bidirectional RPC To: xml-rpc@yahoogroups.com Date: Thursday, July 16, 2009, 10:37 AM   ...
Jane Juza
flowerwriter
Offline Send Email
Sep 16, 2009
6:39 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help