avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1008) Allow IPC clients to perform the IPC handshake before the first RPC is invoked
Date Tue, 07 Feb 2012 19:31:01 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202661#comment-13202661

Doug Cutting commented on AVRO-1008:

We already support pre-forcing the handshake by calling getRemote().  However this currently
creates an error message on the server side each time it's done, which you address here. 
Also it would be good to make this more widely known, as it's useful.

Some comments & questions:
 - We should update the RPC specification to note that if the empty string is passed as the
message name during a handshake negotiation then it should be ignored.  Or we might say that
an empty message name is always to be ignored, to permit ping messages in any protocol at
any time.
 - The change to Responder might also check !wasConnected, unless we decide that pings are
 - What's the advantage of passing a boolean to the Requestor constructor to calling a method
like getRemote()?  We might instead add a new method ensureHandshake() or somesuch that does
nothing but call getRemote().
 - Why doesn't SpecificRequestor#getClient() just pass performHandshake to the requestor constructor,
so the only call to getRemote() is in the base Requestor class, avoiding the duplication of
that logic?
> Allow IPC clients to perform the IPC handshake before the first RPC is invoked
> ------------------------------------------------------------------------------
>                 Key: AVRO-1008
>                 URL: https://issues.apache.org/jira/browse/AVRO-1008
>             Project: Avro
>          Issue Type: Improvement
>    Affects Versions: 1.6.1
>            Reporter: James Baldassari
>            Assignee: James Baldassari
>              Labels: java
>         Attachments: AVRO-1008.patch
> Currently, the first RPC must complete before any subsequent RPCs may be invoked using
the same Transceiver instance.  The reason for this behavior is that the IPC client-server
handshake must be performed before any requests can be exchanged.  So while the first RPC
is being invoked, all other threads using the same Transceiver instance will block.  The goal
of this enhancement is to allow clients to perform a handshake with the server _before_ any
RPCs are invoked to avoid blocking any threads once the Transceiver is put into service.
> I have a patch for review that I think will enable clients to perform the handshake before
the first RPC is sent.  The changes consist of:
> * Modification to the Responder to handle a request that contains only a handshake (without
an RPC)
> * Addition of overridden SpecificRequestor.getClient(...) methods that take an boolean
indicating whether the handshake should be performed immediately upon initialization of the
> * Unit test which is essentially the same as the test I wrote for AVRO-1001, but it uses
a pre-RPC handshake rather than invoking the add(...) RPC to perform the handshake

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message