You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Devin Smith <de...@deephaven.io> on 2021/07/13 14:37:58 UTC

[Java] Async Client Usage

Hi,

I'm currently in the process of doing some integration work with the
Java FlightClient/FlightStream. I'm hoping to consume FlightStream in
an asynchronous manner, but the current methods `FlightStream#next`
and `FlightStream#getRoot` are blocking.

Does it make sense to expose additional hooks to allow the user to get
the data in a non-blocking manner? If so, I'm happy to work up a PR if
nobody else is already working on it.

Thanks,
Devin Smith
Deephaven Data Labs

Re: [Java] Async Client Usage

Posted by David Li <li...@apache.org>.
Hey Devin,

I don't think anyone's actively working on this. I do agree async Flight APIs would be useful. Fortunately for us, gRPC Java is natively asynchronous underneath, so this should be reasonably straightforward. If you'd like to take this up, feel free to ping me on the PR for review (@lidavidm).

It might be cleaner/easier to expose separate async APIs, for what it's worth, so it might be worth sketching the APIs out in a draft PR or doc to share first. From what I recall, Arrow/Java doesn't have much in the way of existing async APIs, and we might want to make sure the APIs here align with Java conventions and possible future Arrow/Java async APIs.

Best,
David

On Tue, Jul 13, 2021, at 10:37, Devin Smith wrote:
> Hi,
> 
> I'm currently in the process of doing some integration work with the
> Java FlightClient/FlightStream. I'm hoping to consume FlightStream in
> an asynchronous manner, but the current methods `FlightStream#next`
> and `FlightStream#getRoot` are blocking.
> 
> Does it make sense to expose additional hooks to allow the user to get
> the data in a non-blocking manner? If so, I'm happy to work up a PR if
> nobody else is already working on it.
> 
> Thanks,
> Devin Smith
> Deephaven Data Labs
>