You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2015/06/26 00:26:05 UTC
[jira] [Commented] (TINKERPOP3-734) Driver uses polling tying up
threads
[ https://issues.apache.org/jira/browse/TINKERPOP3-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602061#comment-14602061 ]
stephen mallette commented on TINKERPOP3-734:
---------------------------------------------
I'm making some changes here based on your thoughts. The work is being done in a branch until I'm comfortable with it. See:
https://github.com/apache/incubator-tinkerpop/tree/resultset-refactor
As it stands, I've changed {{all()}} on {{ResultSet}} - it now gets a callback when all the results have been streamed back to the client. No more polling there.
This change had the nice side-effect of bubbling up better errors to the client for certain situations. Got rid of some very generic exceptions in favor of some very succinct ones.
I'll look at {{one}} and other methods later.
> Driver uses polling tying up threads
> ------------------------------------
>
> Key: TINKERPOP3-734
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-734
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: driver
> Reporter: Adrian Gonzalez
> Assignee: stephen mallette
>
> The driver uses polling to return ResultSet.one() and for the CompletableFuture in ResultSet.all().
> Ideally polling should not be necessary when using Netty and CompletableFutures. This causes problems when trying to use it with a framework like [vert.x|http://vertx.io/].
> Could you consider an approach more similar to the Cassandra driver from datastax?
> https://github.com/datastax/java-driver
> See [Session.executeAsync()|https://github.com/datastax/java-driver/blob/2.1/driver-core/src/main/java/com/datastax/driver/core/Session.java#L166] which is equivalent to gremlin-driver Client.submitAsync().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)