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/09/02 13:08:46 UTC

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

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

stephen mallette updated TINKERPOP3-826:
----------------------------------------
    Affects Version/s: 3.0.0-incubating

> 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.0-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)