Re: Bidirectional RPC

Arne Kalaghan <[email protected]> Thu, 16 Jul 2009 09:24:10 +0000 (GMT)
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
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 option to have other languages available for the client implementation. Because of this freedom I am looking for a wide-spread tool like xmlrpc and no experiments like jabber-rpc.
If nobody can give some positive feedback how to tweak xmlrpc for bidirectional calls with the client (not the server) behind a firewall, or which other well established RPC allows such thing, I'll have to code my own mechanism.

Kind regards,
A. Kalaghan



________________________________
Von: John Wilson <[email protected]>
An: [email protected]
Gesendet: Mittwoch, den 15. Juli 2009, 19:50:21 Uhr
Betreff: 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/libxmlrp c_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

   


      


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/