On 11/19/2010 12:49 AM, Stephen Gargan wrote:
In the java
versions of Requestor and Responder the negotiated protocol is stored
along with the connection. The connection is considered 'established'
and so long as it persists, neither side expects the handshake to
appear in any subsequent call between them.

The other substantial difference between socket-based RPC and http-based RPC is the handling of one-way messages.

With http, some response data is always written. The response data for a message that returns void still has, in addition to the handshake response, an error flag and potentially an error object. (This permitted one-way to be added without incompatibly changing the specification.)

With sockets, once a session has been established, a one-way message has no response data at all. So a client can return immediately after writing the request, in a "fire and forget" style.

This is described at:

http://avro.apache.org/docs/current/spec.html#Call+Format

HTTP is considered "stateless" and sockets are "stateful".

Doug

Reply via email to