avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: what's the purpose of one-way, and why does it cause problems with python?
Date Mon, 01 Nov 2010 18:00:40 GMT
On 11/01/2010 10:50 AM, Doug Cutting wrote:
> we could fix this either by
> fixing Python to preserve this attribute in the protocol's JSON or for
> Java to ignore this attribute when using a stateless transport like HTTP.

A third short-term option might be to remove the one-way specification 
from the Flume protocols.

And, to answer the question in the subject, the one-way attribute 
declares that a message does not require any response.  A two-way 
void-returning message that declares no errors must still always return 
an empty response when it successfully completes, but a one-way message 
is permitted to never return a response.  Over HTTP, Avro maps requests 
one-to-one to HTTP requests, so every request also has an HTTP response 
and one-way is ignored.  But other transports might do this differently. 
  Java's SocketTransceiver and SocketServer implement one-way messages 
so that requests are truly fire-and-forget.  Control is returned to the 
caller as soon as a one-way request is written.

Doug

Mime
View raw message