avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Baldassari <jbaldass...@gmail.com>
Subject Re: asynchronous server
Date Mon, 27 Feb 2012 00:40:56 GMT
Hi Peter,

Yes, there is support in Avro for asynchronous RPCs, but it's currently
limited to Java and the Netty client/server implementation.  This was
implemented in AVRO-539 and first released in Avro 1.5.2.

Asynchronous RPCs are implemented using the Callback interface.  When Avro
generates the Java interface for your protocol in v1.5.2 or later you'll
see a sub-interface called Callback.  For example, if your protocol is
called Mail, you'll have a Java interface called Mail and a sub-interface
Mail.Callback which extends Mail and adds the callback-enabled RPCs.  This
is the interface you should use on the client side (when you create a
SpecificRequestor).  On the server side, nothing changes to enable
asynchronous RPCs.  The server (SpecificResponder) will implement Mail.

I would suggest taking a look at some examples to get started.  A good
place to start would be the Avro unit tests for the Callback APIs:


I also created a github project to demonstrate a real-world use case for
async RPCs using a real-time online auction:


Also see this recent Avro users thread which has some pointers about


Hopefully that will get you started, but please write back if you have any
problems getting it working.


On Sun, Feb 26, 2012 at 6:24 PM, Peter S <htims.rm.p@gmail.com> wrote:

> Hi all,
> I am new to avro. I am trying to writing an asynchronous server which will
> make other RPC calls. So I am wondering how can I do this. I found a
> related jira issue:
> https://issues.apache.org/jira/browse/AVRO-405
> But it seems only #1 is solved. Does Avro support #2 in this ticket now?
> Thanks!
> Regards,
> Peter

View raw message