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 2010/06/24 18:08:51 UTC

[jira] Created: (AVRO-585) add async RPC cllient

add async RPC cllient
---------------------

                 Key: AVRO-585
                 URL: https://issues.apache.org/jira/browse/AVRO-585
             Project: Avro
          Issue Type: New Feature
          Components: java
            Reporter: Doug Cutting


An async Java RPC client would be useful.  It could, for example, send out a set of requests to be computed in parallel, then gather and combine the results as they are returned.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-585) add async RPC cllient

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882207#action_12882207 ] 

Doug Cutting commented on AVRO-585:
-----------------------------------

Java Future's seem a good way to do this, Google's ListenableFuture in particular.

http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/util/concurrent/ListenableFuture.html

Here's a possible design:

Change Transceiver's primary method to:

ListenableFuture<List<ByteBuffer>> transceive(List<ByteBuffer>);

Change Responder's primary method to:

ListenableFuture<Object> respond(String messageName, Object parameters) throws Exception;

Re-define the old, synchronous, version in terms of this.

Have the compiler emit a second interface for each protocol, something like:

public interface Test$Future FutureProtocol {
  ListenableFuture<Utf8> echo(Utf8 greeting);
}

Add a method to SpecificRequestor to create a future-generating proxy with:

public FutureProtocol getFutureClient(Class<FutureClient>, Transceiver);


> add async RPC cllient
> ---------------------
>
>                 Key: AVRO-585
>                 URL: https://issues.apache.org/jira/browse/AVRO-585
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Doug Cutting
>
> An async Java RPC client would be useful.  It could, for example, send out a set of requests to be computed in parallel, then gather and combine the results as they are returned.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.