You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/10/13 00:55:05 UTC

[jira] [Closed] (TINKERPOP3-826) OneToManyBarrierStrategy

     [ https://issues.apache.org/jira/browse/TINKERPOP3-826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez closed TINKERPOP3-826.
-----------------------------------------
    Resolution: Won't Fix

I went down this path and it got exceedingly complicated. There are too many exceptions to the rule. I think when we have a stable/tiny instruction set for Gremlin, we can revisit this. For now will simply "not fix" and if we feel this would be good down the road, we can reopen.

> OneToManyBarrierStrategy
> ------------------------
>
>                 Key: TINKERPOP3-826
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-826
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.1-incubating
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.1.0-incubating
>
>
> Currently, for doing energy diffusions with Gremlin sacks, you do this:
> {code}
> gremlin> g.withSack(1.0).V(1).local(out('knows').barrier(normSack)).sack()
> ==>0.5
> ==>0.5
> {code}
> Why are we doing this? Because {{out('knows')}} is one-to-many and thus, after we split the traversers, we need to renormalize their sacks so you always have a constant total energy (i.e. 1.0).
> However, starts to look ugly if the traversal is complex. Perhaps we have {{OneToManyBarrierStrategy}} that can be activated which simply wraps all {{flatMaps}} into a {{local(....barrier(consumer))}}. If that strategy is activated, then the above diffusion would look like this:
> {code}
> gremlin> g.withSack(1.0).V(1).out('knows').sack()
> ==>0.5
> ==>0.5
> {code}



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