You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2021/01/19 13:18:51 UTC

[GitHub] [tinkerpop] spmallette commented on pull request #1380: Use a List of strategies instead of Set

spmallette commented on pull request #1380:
URL: https://github.com/apache/tinkerpop/pull/1380#issuecomment-762833834


   Hello, this is a fairly serious change in our general semantics around traversal strategies. We recently had some discussion on this topic in the community (i.e. adding multiple strategies of the same type) and have done work on the `master` branch to codify the semantics such that you can only add one strategy of any particular type. I realize that hurts a use case like having multiple `SubgraphStrategy` or as you  suggest, usage of multiple `PartitionStrategy` implementations, but I don't think any strategy was designed with that use case in mind and as such is not tested or guaranteed to work in that fashion. 
   
   Personally, I think we should avoid further complicating strategies. They are already hard to write, prone to bugs that are difficult to uncover and often do more magic than they should maybe do. If we get into the business of allowing two of the same strategy to execute consecutively it feels like we're not making anything easier. 
   
   That said, I'd toyed with the idea of having a `Mergable` interface that could be added to strategies so that at least a strategy of the same type that was "mergable" had some explicit semantics by which they could be combined to one and then executed once on the traversal but it wasn't high enough on anyone's priority list to think through any further than that. It could be a possible idea for the future, but I haven't seen a lot of users (any users really) asking for this. In fact, the only reason it even came up earlier in our discussions was out of idle "what if" discussion with @vtslab on a semi-related issue he was working on. 
   
   Anyway, I just thought I'd fill you in on where things are with the sort of functionality you are proposing. Happy to hear any thoughts you might have on the matter.
   
   anyway


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org