Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Support for Future of Future for Async Services #271

Closed
supercharger opened this issue Aug 26, 2015 · 2 comments
Closed

Support for Future of Future for Async Services #271

supercharger opened this issue Aug 26, 2015 · 2 comments

Comments

@supercharger
Copy link

Let's say a Client is calling ServiceA which is in turn calling ServiceB. The method calls in ServiceA and ServiceB are Async by using ListenableFutures.

In the ServiceA method call "doSomeWorkA", I don't want to wait on the Future returned by ServiceB, so It won't impact the throughput. Please note that I need to construct ProcessedResultA from ProcessedResultB

Can you help on how to do this.

@ThriftService
public interface ServiceA  {
    // Calls ServiceB
   @ThriftMethod
    public ListenableFuture<ProcessedResultA> doSomeWorkA(String input);
}

@ThriftService
public interface ServiceB {
   @ThriftMethod
    public ListenableFuture<ProcessedResultB> doSomeWorkB(String input);
}
@supercharger
Copy link
Author

I will try this, Thanks!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants