Given the ongoing promotion of scripts over bytecode in TinkerPop 4, I think 
now is a good time to review construction and configuration of traversal 
strategies from the GLVs. There was a brief exchange on this topic between 
Valentyn and Stephen in the bytecode removal PR 
(https://github.com/apache/tinkerpop/pull/2661#discussion_r1658803214) which I 
wanted to follow-up on and give my own thoughts.
My view is that the primary goals of any changes to strategy construction in 
TinkerPop 4 should be simplification for users, and consistency across gremlin 
language implementations (gremlin-lang vs gremlin-groovy) and GLVs.
I agree that all strategies should be added to the registry, and we should add 
feature tests for all strategies. I also agree with the suggestion to adapt 
TraversalStrategyProxy as a mechanism for the driver to construct and pass 
custom registered strategies, and that something equivalent to 
TraversalStrategyProxy should be introduced to all the GLVs. However, I 
currently disagree with deprecating the concrete strategy classes in the GLVs, 
as I believe they still serve a useful purpose as a discoverability aid in the 
drivers. Retaining the concrete classes will also keep the GLV traversal syntax 
closer to gremlin-lang and gremlin-groovy syntax. I can see how some may argue 
that the gained simplicity of having a single mechanism for strategy 
construction in the drivers outweighs the discoverability of the concrete 
classes. I would be interested to hear any opinions on this.
I’m considering renaming TraversalStrategyProxy as part of these changes. 
Please reach out if you have any suggestions here.
One final change I would like to propose is the removal of all usages of FQCN’s 
(fully qualified class names) for strategies in the GLVs in favour of simple 
strategy/class names. The FQCN ties gremlin too close to Java in my opinion, 
and the simple class names are sufficient as long as the strategy is registered 
for gremlin-lang or imported for gremlin-groovy.
Please let me know if you have any thoughts regarding strategies going forward. 
I plan to start adding the feature tests and fixing and related issues right 
away. Depending on feedback, I intend to begin adapting TraversalStrategyProxy 
as mentioned above and extending this capability to the GLVs in about a week.
Thanks,
Cole

Reply via email to