You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2012/12/19 18:33:14 UTC

[jira] [Commented] (AVRO-1008) Allow IPC clients to perform the IPC handshake before the first RPC is invoked

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

Doug Cutting commented on AVRO-1008:
------------------------------------

> Decide whether to change the RPC spec to make an empty message name reserved for use by Avro

The specification already prohibits empty names, so the empty name is already reserved.  But we should document in the spec that an empty message name might be used by clients to ping or force a handshake, that the server should not do anything crazy like exit when it receives one but should instead return a well-formed response, as most already do.

The patch includes two changes:
 - stopping the logging of an error on the server when an empty-message name is received
 - adding calls to getRemote() to constructors when a boolean parameter is true

Neither change is essential.  The desired functionality is already present.

I fully support the first change.

Stylistically I'd prefer we not add more logic to the constructors but perhaps rather just better document getRemote()'s ability to force a handshake.  If an application always desires to force a handshake when connections are created then it can add a method that does this.

I'll try to post a revised patch later today that includes the spec change.

                
> 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 Requestor
> * 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
For more information on JIRA, see: http://www.atlassian.com/software/jira