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

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

This is a very dangerous proposition as when bulking occurs is not quite 
obvious to users (even myself and I know this stuff). Thus, this is dangerous 
and can lead to misuse. The best idea in this ticket is the 
{{withBulk(unity)}}-model. However, this is discussed in another ticket so I 
will close this one.

> [Proposal] SetBulkStep (sideEffectStep)
> ---------------------------------------
>
>                 Key: TINKERPOP3-825
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-825
>             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
>
>
> I think we need to have
> {code}
> g.V...bulk(1)
> {code}
> which would be a {{SideEffectStep}} that simply sets the bulk to the provided 
> value. Why? If you are using Gremlin sacks to denote energy values then your 
> "bulk" is really in the sack, not in the bulk. However, when your computation 
> is complete and you get back your results, your results will have multiple of 
> the "same sack" for each bulk, where in fact, you want one sack cause you 
> want the bulk to be one.
> Example:
> So this is good. We split the sack value of 1.0 amongst the two people that 
> marko knows.
> {code}
> gremlin> 
> g.withSack(1.0d,sum).V(1).local(out('knows').barrier(normSack)).sack()
> ==>0.5
> ==>0.5
> {code}
> However, this is bad. When the two sacks merge, they are 1.0 (sum). However, 
> the bulk is now 2 as two traversers merged. Thus, the output is two 
> traversers (that are the same) with each having a sack of 1.0.
> {code}
> gremlin> 
> g.withSack(1.0d,sum).V(1).local(out('knows').barrier(normSack)).in('knows').barrier().sack()
> ==>1.0
> ==>1.0
> {code}
> Instead, we want this:
> {code}
> gremlin> 
> g.withSack(1.0d,sum).V(1).local(out('knows').barrier(normSack)).in('knows').barrier().sideEffect{it.setBulk(1)}.sack()
> ==>1.0
> {code}
> ...where that {{sideEffect}}-lambda would be {{bulk(1)}}.
> Its sort of confusing.... and perhaps I have convoluted sack and bulk where 
> perhaps bulk should be a "Number" and not just {{Long}}, but........ seems a 
> bit late for that now.



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

Reply via email to