[
https://issues.apache.org/jira/browse/TINKERPOP-1163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213152#comment-15213152
]
ASF GitHub Bot commented on TINKERPOP-1163:
-------------------------------------------
Github user okram commented on the pull request:
https://github.com/apache/incubator-tinkerpop/pull/278#issuecomment-201910150
You can see how computer-only strategies don't show up in OLTP.
```
gremlin> g = TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V().explain()
==>Traversal Explanation
===============================================================
Original Traversal [GraphStep(vertex,[])]
ConnectiveStrategy [D] [GraphStep(vertex,[])]
IdentityRemovalStrategy [O] [GraphStep(vertex,[])]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[])]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[])]
FilterRankingStrategy [O] [GraphStep(vertex,[])]
RangeByIsCountStrategy [O] [GraphStep(vertex,[])]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[])]
ProfileStrategy [F] [TinkerGraphStep(vertex,[])]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[])]
Final Traversal [TinkerGraphStep(vertex,[])]
gremlin> g = g.withComputer()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]
gremlin> g.V().explain()
==>Traversal Explanation
===========================================================================================================
Original Traversal [GraphStep(vertex,[])]
ConnectiveStrategy [D] [GraphStep(vertex,[])]
VertexProgramStrategy [D]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
OrderLimitStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
IdentityRemovalStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
MatchPredicateStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
IncidentToAdjacentStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
AdjacentToIncidentStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
FilterRankingStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
RangeByIsCountStrategy [O]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
TinkerGraphStepStrategy [P]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
ProfileStrategy [F]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
ComputerVerificationStrategy [V]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
StandardVerificationStrategy [V]
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
Final Traversal
[TraversalVertexProgramStep([GraphStep(vertex,[])]), ComputerResultStep]
gremlin>
```
> GraphComputer's can have TraversalStrategies.
> ---------------------------------------------
>
> Key: TINKERPOP-1163
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1163
> Project: TinkerPop
> Issue Type: Improvement
> Components: hadoop, process
> Affects Versions: 3.1.0-incubating
> Reporter: Marko A. Rodriguez
>
> @dkuppitz makes the joke that he can count the number of vertices in the
> Friendster adjacency list with "awk to the sed to the bash to the.." in < 1
> minute. SparkGraphComputer with four blades takes ~5 minutes.
> What's the dealio?
> Imagine a world where {{SparkGraphComputerStrategy}} exists. It analyzes
> traversals and does fast executions breaking away from the VertexProgram API
> and going strait to the native API of Spark. Check it:
> {code}
> g.V().count() -> inputRDD.count()
> {code}
> ...add a {{EmptyVertex.instance()}} manipulation to the respective
> InputFormats and you are just then skipping through bytes not manifesting
> objects at all. BAM. That would take 30 seconds on Friendster.
> {code}
> g.V().outE('knows').count() -->
> inputRDD.flatMapToPair{edgeComponents}.filter{knows}.count()
> {code}
> Blazing fast.
> ....for all those standard patterns, we just do a "native" execution for the
> respective GraphComputer engine. We sideStep object creation, iteration
> phases, views, map reduce jobs.... However, we have to be smart to update the
> {{Memory}} so it looks as if the real VertexProgram executed! ---
> {{iteration}}, {{runtime}}, {{~reducing}}, etc.
> Genius.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)