I have a stub that needs to do some database I/O and I wanted to make use 
of ListenableFuture from Guava, wondering what the best approach to doing 
that would be?
I ran into this explanation of the overall server 
architecture: https://groups.google.com/d/msg/grpc-io/LrnAbWFozb0/VYCVarkWBQAJ

It seems like the application executor I pass in would be where I would 
want to do this work, so, does that mean that within a stub I should call 
this?
https://guava.dev/releases/23.0/api/docs/com/google/common/util/concurrent/MoreExecutors.html#newDirectExecutorService--

assuming that directExecutor() within a stub execution gives me the 
application executor, would that be correct? Also assuming its OK to block 
there. For more context I intend to use 
https://github.com/brettwooldridge/HikariCP and 
https://github.com/impossibl/pgjdbc-ng to do the DB communication at stub 
execution time, in case there are other gotchas to be aware of.

Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/4162dc0c-c92a-4b41-8c19-722b0460f80f%40googlegroups.com.

Reply via email to