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 <sp...@gmail.com> on 2019/07/08 20:16:47 UTC

[DISCUSS] traversal side-effect retrieval

Does anyone do this sort of thing with any regularity?

gremlin> t = g.V().aggregate('x').by('name')
==>v[1]
==>v[2]
==>v[3]
==>v[4]
==>v[5]
==>v[6]
gremlin> t.getSideEffects().get('x')
==>marko
==>vadas
==>lop
==>josh
==>ripple
==>peter

Specifically, i'm referring to the call to getSideEffects() after traversal
execution is complete. I'm wondering if 3.5.0 could see the demise of that
functionality.

I'd venture to say that this is a less known function and that it is not
widely used. I'd go a step further and say that I'm pretty sure that many
graph implementations don't even support it. As such it's surprising how
much extra code we have to keep it around in remoting to make that work.
It's also surprising that while it works I just noticed some things that
are "wrong" with how it works in terms of transactions and request
validation. Neither are easy fixes it seems and since we've talked about
not even having such functionality in TP4 I think we could consider all of
that reason to support it's removal. Not sure what we would do for embedded
functionality around this - perhaps just leave that alone? maybe there's a
way to "hide" it in the public API?

If you're wondering how you would get side-effects without getSideEffects()
- easy - just cap() them out as part of the traversal. For example:

gremlin> g.V().aggregate('x').by('name').union(cap('x'),fold())
==>[marko,vadas,lop,josh,ripple,peter]
==>[v[1],v[2],v[3],v[4],v[5],v[6]]

If there are no objections here, I'll look to post something on
gremlin-users as a next step to determining feelings on this one.

Thanks!

Re: [DISCUSS] traversal side-effect retrieval

Posted by Stephen Mallette <sp...@gmail.com>.
While there was a bit of discussion, there was no real objections to the
deprecation of Traversal.getSideEffects() from gremlin-users:

https://groups.google.com/d/msg/gremlin-users/HfEdOSv_4Us/K8mC5OaEAQAJ

Here's the ticket for deprecation:

https://issues.apache.org/jira/browse/TINKERPOP-2265



On Mon, Jul 8, 2019 at 4:16 PM Stephen Mallette <sp...@gmail.com>
wrote:

> Does anyone do this sort of thing with any regularity?
>
> gremlin> t = g.V().aggregate('x').by('name')
> ==>v[1]
> ==>v[2]
> ==>v[3]
> ==>v[4]
> ==>v[5]
> ==>v[6]
> gremlin> t.getSideEffects().get('x')
> ==>marko
> ==>vadas
> ==>lop
> ==>josh
> ==>ripple
> ==>peter
>
> Specifically, i'm referring to the call to getSideEffects() after
> traversal execution is complete. I'm wondering if 3.5.0 could see the
> demise of that functionality.
>
> I'd venture to say that this is a less known function and that it is not
> widely used. I'd go a step further and say that I'm pretty sure that many
> graph implementations don't even support it. As such it's surprising how
> much extra code we have to keep it around in remoting to make that work.
> It's also surprising that while it works I just noticed some things that
> are "wrong" with how it works in terms of transactions and request
> validation. Neither are easy fixes it seems and since we've talked about
> not even having such functionality in TP4 I think we could consider all of
> that reason to support it's removal. Not sure what we would do for embedded
> functionality around this - perhaps just leave that alone? maybe there's a
> way to "hide" it in the public API?
>
> If you're wondering how you would get side-effects without
> getSideEffects() - easy - just cap() them out as part of the traversal. For
> example:
>
> gremlin> g.V().aggregate('x').by('name').union(cap('x'),fold())
> ==>[marko,vadas,lop,josh,ripple,peter]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
>
> If there are no objections here, I'll look to post something on
> gremlin-users as a next step to determining feelings on this one.
>
> Thanks!
>
>