You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/10 17:05:20 UTC

[jira] [Commented] (TINKERPOP-1492) RemoteStrategy or the RemoteConnection should append a lazy barrier().

    [ https://issues.apache.org/jira/browse/TINKERPOP-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15562827#comment-15562827 ] 

ASF GitHub Bot commented on TINKERPOP-1492:
-------------------------------------------

GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/453

    TINKERPOP-1492: RemoteStrategy or the RemoteConnection should append a lazy barrier().

    https://issues.apache.org/jira/browse/TINKERPOP-1492
    
    I think that `LazyBarrierStrategy` should add a `barrier()` to the end of a traversal if it believes it will reduce the number of traversers. This is particularly important for `withRemote()` as you can greatly reduce the network traffic. I don't have a good way of knowing if the traversal is being executed remote or not so this will lazy `barrier()` will be added regardless of remote'ing. 
    
    Please review and tell me if you disagree with where I am placing this optimization.
    
    VOTE +1.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1492

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/453.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #453
    
----
commit 7c026acb905b68bddf46f0f6bb8501471e347d67
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2016-10-10T16:50:54Z

    if the probability of bulking is high at the end step, a barrier(SIZE) is inserted.

----


> RemoteStrategy or the RemoteConnection should append a lazy barrier().
> ----------------------------------------------------------------------
>
>                 Key: TINKERPOP-1492
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1492
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: driver, process, server
>    Affects Versions: 3.2.2
>            Reporter: Marko A. Rodriguez
>
> I think that every remote traversal should have a {{barrier()}} appended to the end. Why? It is cheaper to bulk and send a bulk over the wire than to send multiple of the same traversers over the wire.
> In essence, the same optimization we reach for with bulking for execution should be used for bulking for serialization.
> The problem/question I have is, where should this optimization be inserted?
> 1. By GremlinServer (the remote connection) after received bytecode and creating a traversal?
> 2. By {{LazyBarrierStrategy}} that should just ALWAYS add a {{barrier()}} to the end of every traversal?
> 3. By {{RemoteStrategy}} by injecting {{barier()}}-bytecode right before sending the bytecode over the wire?
> I'm leaning on (2) given that its the natural way in which we currently do things.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)