Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Async Callbacks using Netty

Copy link to this message
Re: Async Callbacks using Netty
avro just implements client-side async, not server-side async. am i right?

my avro idl file is like this:

protocol TestProtocol {
    int hello(string msg);

so when i implements the generated interface TestProtocol.Callback, my own
implementation of hello(CharSequence, org.apache.avro.ipc.Callback<Integer>)
does not has any effect. only the sync method hello(CharSequence) is called.

what i really want to do is described below.

i want to implements a 'msg transmitter' using avro async protocol.

an example request route is like this: client --> serverA --> serverB

if the client invoke 'sendMsg("hello world")', then serverC will receive the
message ("hello world"). serverA & serverB just forward this request to the
next destination of the request route.

i implements my own callback to accomplish this. callback of previous
request is kept until current callback returns. async method is used when
the request is forwarded to the next server.

but when client invoke sendMsg(msg, callback), i could see sync method is
called on the serverA, but not the async one. and then no request forward

View this message in context: http://apache-avro.679487.n3.nabble.com/Async-Callbacks-using-Netty-tp3705392p4025338.html
Sent from the Avro - Users mailing list archive at Nabble.com.