tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twil...@apache.org
Subject svn commit: r1797712 [2/3] - in /tinkerpop/site: docs/ docs/3.1.7-SNAPSHOT/reference/ javadocs/ javadocs/3.1.7-SNAPSHOT/core/org/apache/tinkerpop/gremlin/process/computer/ javadocs/3.1.7-SNAPSHOT/core/org/apache/tinkerpop/gremlin/process/traversal/ jav...
Date Mon, 05 Jun 2017 22:14:57 GMT

Modified: tinkerpop/site/docs/3.1.7-SNAPSHOT/reference/index.html
URL: http://svn.apache.org/viewvc/tinkerpop/site/docs/3.1.7-SNAPSHOT/reference/index.html?rev=1797712&r1=1797711&r2=1797712&view=diff
==============================================================================
--- tinkerpop/site/docs/3.1.7-SNAPSHOT/reference/index.html (original)
+++ tinkerpop/site/docs/3.1.7-SNAPSHOT/reference/index.html Mon Jun  5 22:14:57 2017
@@ -858,11 +858,248 @@ span.line-numbers { border-right: 1px so
 <ul class="sectlevel2">
 <li><a href="#general-steps">General Steps</a></li>
 <li><a href="#addedge-step">AddEdge Step</a></li>
+<li><a href="#addvertex-step">AddVertex Step</a></li>
+<li><a href="#addproperty-step">AddProperty Step</a></li>
+<li><a href="#aggregate-step">Aggregate Step</a></li>
+<li><a href="#and-step">And Step</a></li>
+<li><a href="#as-step">As Step</a></li>
+<li><a href="#barrier-step">Barrier Step</a></li>
+<li><a href="#by-step">By Step</a></li>
+<li><a href="#cap-step">Cap Step</a></li>
+<li><a href="#coalesce-step">Coalesce Step</a></li>
+<li><a href="#count-step">Count Step</a></li>
+<li><a href="#choose-step">Choose Step</a></li>
+<li><a href="#coin-step">Coin Step</a></li>
+<li><a href="#constant-step">Constant Step</a></li>
+<li><a href="#cyclicpath-step">CyclicPath Step</a></li>
+<li><a href="#dedup-step">Dedup Step</a></li>
+<li><a href="#drop-step">Drop Step</a></li>
+<li><a href="#explain-step">Explain Step</a></li>
+<li><a href="#fold-step">Fold Step</a></li>
+<li><a href="#graph-step">Graph Step</a></li>
+<li><a href="#group-step">Group Step</a></li>
+<li><a href="#groupcount-step">GroupCount Step</a></li>
+<li><a href="#has-step">Has Step</a></li>
+<li><a href="#inject-step">Inject Step</a></li>
+<li><a href="#is-step">Is Step</a></li>
+<li><a href="#limit-step">Limit Step</a></li>
+<li><a href="#local-step">Local Step</a></li>
+<li><a href="#match-step">Match Step</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#using-where-with-match">Using Where with Match</a></li>
+</ul>
+</li>
+<li><a href="#max-step">Max Step</a></li>
+<li><a href="#mean-step">Mean Step</a></li>
+<li><a href="#min-step">Min Step</a></li>
+<li><a href="#or-step">Or Step</a></li>
+<li><a href="#order-step">Order Step</a></li>
+<li><a href="#path-step">Path Step</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#path-data-structure">Path Data Structure</a></li>
+</ul>
+</li>
+<li><a href="#profile-step">Profile Step</a></li>
+<li><a href="#range-step">Range Step</a></li>
+<li><a href="#repeat-step">Repeat Step</a></li>
+<li><a href="#sack-step">Sack Step</a></li>
+<li><a href="#sample-step">Sample Step</a></li>
+<li><a href="#select-step">Select Step</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#using-where-with-select">Using Where with Select</a></li>
+</ul>
+</li>
+<li><a href="#simplepath-step">SimplePath Step</a></li>
+<li><a href="#store-step">Store Step</a></li>
+<li><a href="#subgraph-step">Subgraph Step</a></li>
+<li><a href="#sum-step">Sum Step</a></li>
+<li><a href="#tail-step">Tail Step</a></li>
+<li><a href="#timelimit-step">TimeLimit Step</a></li>
+<li><a href="#tree-step">Tree Step</a></li>
+<li><a href="#unfold-step">Unfold Step</a></li>
+<li><a href="#union-step">Union Step</a></li>
+<li><a href="#valuemap-step">ValueMap Step</a></li>
+<li><a href="#vertex-steps">Vertex Steps</a></li>
+<li><a href="#where-step">Where Step</a></li>
+</ul>
+</li>
+<li><a href="#a-note-on-predicates">A Note on Predicates</a></li>
+<li><a href="#a-note-on-barrier-steps">A Note on Barrier Steps</a></li>
+<li><a href="#a-note-on-lambdas">A Note On Lambdas</a></li>
+<li><a href="#traversalstrategy">TraversalStrategy</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_elementidstrategy">ElementIdStrategy</a></li>
+<li><a href="#_eventstrategy">EventStrategy</a></li>
+<li><a href="#_partitionstrategy">PartitionStrategy</a></li>
+<li><a href="#_readonlystrategy">ReadOnlyStrategy</a></li>
+<li><a href="#_subgraphstrategy">SubgraphStrategy</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#graphcomputer">The GraphComputer</a></li>
+<li>
+<ul class="sectlevel1">
+<li><a href="#vertexprogram">VertexProgram</a></li>
+<li><a href="#mapreduce">MapReduce</a></li>
+<li><a href="#_a_collection_of_vertexprograms">A Collection of VertexPrograms</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#pagerankvertexprogram">PageRankVertexProgram</a></li>
+<li><a href="#peerpressurevertexprogram">PeerPressureVertexProgram</a></li>
+<li><a href="#bulkdumpervertexprogram">BulkDumperVertexProgram</a></li>
+<li><a href="#bulkloadervertexprogram">BulkLoaderVertexProgram</a></li>
+<li><a href="#traversalvertexprogram">TraversalVertexProgram</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#distributed-gremlin-gotchas">Distributed Gremlin Gotchas</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#gremlin-applications">Gremlin Applications</a></li>
+<li>
+<ul class="sectlevel1">
+<li><a href="#gremlin-console">Gremlin Console</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_console_commands">Console Commands</a></li>
+<li><a href="#_dependencies_and_plugin_usage">Dependencies and Plugin Usage</a></li>
+<li><a href="#_script_executor">Script Executor</a></li>
+</ul>
+</li>
+<li><a href="#gremlin-server">Gremlin Server</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#starting-gremlin-server">Starting Gremlin Server</a></li>
+<li><a href="#connecting-via-console">Connecting via Console</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#console-aliases">Aliases</a></li>
+<li><a href="#console-sessions">Sessions</a></li>
+<li><a href="#console-remote-console">Remote Console</a></li>
+</ul>
+</li>
+<li><a href="#connecting-via-java">Connecting via Java</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_configuration">Configuration</a></li>
+<li><a href="#_aliases">Aliases</a></li>
+<li><a href="#_serialization">Serialization</a></li>
+</ul>
+</li>
+<li><a href="#_connecting_via_rest">Connecting via REST</a></li>
+<li><a href="#_configuring_2">Configuring</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_security">Security</a></li>
+<li><a href="#_serialization_2">Serialization</a></li>
+<li><a href="#_metrics">Metrics</a></li>
+</ul>
+</li>
+<li><a href="#_best_practices">Best Practices</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_tuning">Tuning</a></li>
+<li><a href="#parameterized-scripts">Parameterized Scripts</a></li>
+<li><a href="#_cache_management">Cache Management</a></li>
+<li><a href="#sessions">Considering Sessions</a></li>
+<li><a href="#considering-transactions">Considering Transactions</a></li>
+<li><a href="#considering-state">Considering State</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#gremlin-plugins">Gremlin Plugins</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#credentials-plugin">Credentials Plugin</a></li>
+<li><a href="#gephi-plugin">Gephi Plugin</a></li>
+<li><a href="#server-plugin">Server Plugin</a></li>
+<li><a href="#sugar-plugin">Sugar Plugin</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#_graph_traversal_methods">Graph Traversal Methods</a></li>
+<li><a href="#_range_queries">Range Queries</a></li>
+<li><a href="#_logical_operators">Logical Operators</a></li>
+<li><a href="#_traverser_methods">Traverser Methods</a></li>
+</ul>
+</li>
+<li><a href="#utilities-plugin">Utilities Plugin</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#benchmarking-and-profiling">Benchmarking and Profiling</a></li>
+<li><a href="#describe-graph">Describe Graph</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#gremlin-archetypes">Gremlin Archetypes</a></li>
+</ul>
+</li>
+<li><a href="#implementations">Implementations</a></li>
+<li>
+<ul class="sectlevel1">
+<li><a href="#tinkergraph-gremlin">TinkerGraph-Gremlin</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_configuration_2">Configuration</a></li>
+</ul>
+</li>
+<li><a href="#neo4j-gremlin">Neo4j-Gremlin</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_indices">Indices</a></li>
+<li><a href="#_multi_meta_properties">Multi/Meta-Properties</a></li>
+<li><a href="#_cypher">Cypher</a></li>
+<li><a href="#_multi_label">Multi-Label</a></li>
+<li><a href="#_loading_with_bulkloadervertexprogram">Loading with BulkLoaderVertexProgram</a></li>
+<li><a href="#_high_availability_configuration">High Availability Configuration</a></li>
+</ul>
+</li>
+<li><a href="#hadoop-gremlin">Hadoop-Gremlin</a></li>
+<li>
+<ul class="sectlevel2">
+<li><a href="#_installing_hadoop_gremlin">Installing Hadoop-Gremlin</a></li>
+<li><a href="#_properties_files">Properties Files</a></li>
+<li><a href="#_oltp_hadoop_gremlin">OLTP Hadoop-Gremlin</a></li>
+<li><a href="#_olap_hadoop_gremlin">OLAP Hadoop-Gremlin</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#mapreducegraphcomputer">MapReduceGraphComputer</a></li>
+<li><a href="#sparkgraphcomputer">SparkGraphComputer</a></li>
+<li><a href="#giraphgraphcomputer">GiraphGraphComputer</a></li>
+</ul>
+</li>
+<li><a href="#_input_output_formats">Input/Output Formats</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#gryo-io-format">Gryo I/O Format</a></li>
+<li><a href="#graphson-io-format">GraphSON I/O Format</a></li>
+<li><a href="#script-io-format">Script I/O Format</a></li>
+</ul>
+</li>
+<li><a href="#_storage_systems">Storage Systems</a></li>
+<li>
+<ul class="sectlevel3">
+<li><a href="#interacting-with-hdfs">Interacting with HDFS</a></li>
+<li><a href="#interacting-with-spark">Interacting with Spark</a></li>
 </ul>
 </li>
+<li><a href="#_a_command_line_example">A Command Line Example</a></li>
 </ul>
 </li>
 </ul>
+</li>
+<li><a href="#conclusion">Conclusion</a></li>
+<li><a href="#acknowledgements">Acknowledgements</a></li>
+</ul>
 </div>
 </div>
 <div id="content">
@@ -1733,7 +1970,6 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">Transactions</span>: <span class="predefined-constant">false</span>
 &gt; VariableFeatures
 &gt;-- <span class="key">Variables</span>: <span class="predefined-constant">true</span>
-&gt;-- <span class="key">IntegerArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">BooleanValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">ByteValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleValues</span>: <span class="predefined-constant">true</span>
@@ -1749,12 +1985,13 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">ByteArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">FloatArrayValues</span>: <span class="predefined-constant">true</span>
+&gt;-- <span class="key">IntegerArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">LongArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">StringArrayValues</span>: <span class="predefined-constant">true</span>
 &gt; VertexFeatures
+&gt;-- <span class="key">MetaProperties</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">AddVertices</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveVertices</span>: <span class="predefined-constant">true</span>
-&gt;-- <span class="key">MetaProperties</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">MultiProperties</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">AddProperty</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveProperty</span>: <span class="predefined-constant">true</span>
@@ -1774,7 +2011,6 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">AnyIds</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">UserSuppliedIds</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="predefined-type">Properties</span>: <span class="predefined-constant">true</span>
-&gt;-- <span class="key">IntegerArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">BooleanValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">ByteValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleValues</span>: <span class="predefined-constant">true</span>
@@ -1790,11 +2026,12 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">ByteArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">FloatArrayValues</span>: <span class="predefined-constant">true</span>
+&gt;-- <span class="key">IntegerArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">LongArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">StringArrayValues</span>: <span class="predefined-constant">true</span>
 &gt; EdgeFeatures
-&gt;-- <span class="key">RemoveEdges</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">AddEdges</span>: <span class="predefined-constant">true</span>
+&gt;-- <span class="key">RemoveEdges</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">AddProperty</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">RemoveProperty</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">NumericIds</span>: <span class="predefined-constant">true</span>
@@ -1805,7 +2042,6 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">UserSuppliedIds</span>: <span class="predefined-constant">true</span>
 &gt; EdgePropertyFeatures
 &gt;-- <span class="predefined-type">Properties</span>: <span class="predefined-constant">true</span>
-&gt;-- <span class="key">IntegerArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">BooleanValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">ByteValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleValues</span>: <span class="predefined-constant">true</span>
@@ -1821,6 +2057,7 @@ gremlin&gt; graph.features()
 &gt;-- <span class="key">ByteArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">DoubleArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">FloatArrayValues</span>: <span class="predefined-constant">true</span>
+&gt;-- <span class="key">IntegerArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">LongArrayValues</span>: <span class="predefined-constant">true</span>
 &gt;-- <span class="key">StringArrayValues</span>: <span class="predefined-constant">true</span>
 </code></pre>
@@ -2686,9 +2923,9 @@ interpret the numeric values.  In coerci
 gremlin&gt; g = graph.traversal()
 ==&gt;graphtraversalsource[tinkergraph[<span class="key">vertices</span>:<span class="integer">6</span> <span class="key">edges</span>:<span class="integer">6</span>], standard]
 gremlin&gt; f = <span class="keyword">new</span> <span class="predefined-type">FileOutputStream</span>(<span class="string"><span class="delimiter">&quot;</span><span class="content">vertex-1.json</span><span class="delimiter">&quot;</span></span>)
-==&gt;java.io.FileOutputStream<span class="error">@</span><span class="integer">529140</span>a1
+==&gt;java.io.FileOutputStream<span class="error">@</span><span class="integer">69</span>bf5b07
 gremlin&gt; mapper = graph.io(graphson()).mapper().embedTypes(<span class="predefined-constant">true</span>).create()
-==&gt;org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper<span class="error">@</span><span class="integer">6038</span>ebf7
+==&gt;org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper<span class="error">@</span><span class="integer">313</span>afd47
 gremlin&gt; graph.io(graphson()).writer().mapper(mapper).create().writeVertex(f, g.V(<span class="integer">1</span>).next(), BOTH)
 ==&gt;<span class="predefined-constant">null</span>
 gremlin&gt; f.close()
@@ -3325,5471 +3562,8449 @@ gremlin&gt; g.V().match(
                  __.as(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).as(<span class="string"><span class="delimiter">'</span><span class="content">c</span><span class="delimiter">'</span></span>),
                  __.as(<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).as(<span class="string"><span class="delimiter">'</span><span class="content">c</span><span class="delimiter">'</span></span>)).
                addE(<span class="string"><span class="delimiter">'</span><span class="content">friendlyCollaborator</span><span class="delimiter">'</span></span>).from(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>).to(<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>).
-                 property(id,<span class="integer">13</span>).property(<span class="string"><span class="delimiter">'</span><span class="content">project</span><span class="delimiter">'</span></span>,select(<span class="string"><span class="delimiter">'</span><span class="content">c</span><span class="delimiter">'</span></span>).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>)) <span class="comment">//</span><b>(5)</b>
-gremlin&gt; elect the objects labeled <span class="string"><span class="delimiter">&quot;</span><span class="content">a</span><span class="delimiter">&quot;</span></span> and <span class="string"><span class="delimiter">&quot;</span><span class="content">b</span><span class="delimiter">&quot;</span></span> from the path.<span class="string"><span class="delimiter">'</span></span><span class="error">
-</span>gremlin&gt; ED<span class="string"><span class="delimiter">'</span></span><span class="error">
-</span>gremlin&gt; <span class="regexp"><span class="delimiter">/</span><span class="content">neo4j')</span></span><span class="error">
-</span>gremlin&gt; (count()) <span class="comment">//</span><b>(3)</b>
-gremlin&gt; <span class="string"><span class="delimiter">'</span></span><span class="error">
-</span>gremlin&gt; (<span class="integer">719</span>); <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>
-==&gt;
-gremlin&gt; pb(<span class="integer">720</span>); <span class="string"><span class="delimiter">'</span><span class="content">&lt;1&gt; Find vertices that created something and match them as </span><span class="char">\'</span><span class="content">creators</span><span class="char">\'</span><span class="content">, then find out what they created which is</span><span class="delimiter">'</span></span>
-==&gt;&lt;<span class="integer">1</span>&gt; Find vertices that created something and match them <span class="keyword">as</span> <span class="string"><span class="delimiter">'</span><span class="content">creators</span><span class="delimiter">'</span></span>, then find out what they created which is
-gremlin&gt; pb(<span class="integer">721</span>); <span class="string"><span class="delimiter">'</span><span class="content">named </span><span class="char">\'</span><span class="content">lop</span><span class="char">\'</span><span class="content"> and match these vertices as </span><span class="char">\'</span><span class="content">projects</span><span class="char">\'</span><span class="content">.</span><span class="delimiter">'</span></span>
-==&gt;named <span class="string"><span class="delimiter">'</span><span class="content">lop</span><span class="delimiter">'</span></span> and match these vertices <span class="keyword">as</span> <span class="string"><span class="delimiter">'</span><span class="content">projects</span><span class="delimiter">'</span></span>.
-gremlin&gt; pb(<span class="integer">722</span>); <span class="string"><span class="delimiter">'</span><span class="content">&lt;2&gt; Using these </span><span class="char">\'</span><span class="content">projects</span><span class="char">\'</span><span class="content"> vertices, find out their creators aged 29 and remember these as </span><span class="char">\'</span><span class="content">cocreators</span><span class="char">\'</span><span class="content">.</span><span class="delimiter">'</span></span>
-==&gt;&lt;<span class="integer">2</span>&gt; Using these <span class="string"><span class="delimiter">'</span><span class="content">projects</span><span class="delimiter">'</span></span> vertices, find out their creators aged <span class="integer">29</span> and remember these <span class="keyword">as</span> <span class="string"><span class="delimiter">'</span><span class="content">cocreators</span><span class="delimiter">'</span></span>.
-gremlin&gt; pb(<span class="integer">723</span>); <span class="string"><span class="delimiter">'</span><span class="content">&lt;3&gt; Return the name of both </span><span class="char">\'</span><span class="content">creators</span><span class="char">\'</span><span class="content"> and </span><span class="char">\'</span><span class="content">cocreators</span><span class="char">\'</span><span class="content">.</span><span class="delimiter">'</span></span>
-==&gt;&lt;<span class="integer">3</span>&gt; Return the name of both <span class="string"><span class="delimiter">'</span><span class="content">creators</span><span class="delimiter">'</span></span> and <span class="string"><span class="delimiter">'</span><span class="content">cocreators</span><span class="delimiter">'</span></span>.
-gremlin&gt; pb(<span class="integer">724</span>); <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>
-==&gt;
-gremlin&gt; pb(<span class="integer">725</span>); <span class="string"><span class="delimiter">'</span><span class="content">[[grateful-dead]]</span><span class="delimiter">'</span></span>
-==&gt;[[grateful-dead]]
-gremlin&gt; pb(<span class="integer">726</span>); <span class="string"><span class="delimiter">'</span><span class="content">.Grateful Dead</span><span class="delimiter">'</span></span>
-==&gt;.Grateful Dead
-gremlin&gt; pb(<span class="integer">727</span>); <span class="string"><span class="delimiter">'</span><span class="content">image::grateful-dead-schema.png[width=475]</span><span class="delimiter">'</span></span>
-==&gt;<span class="key">image</span>::grateful-dead-schema.png[width=<span class="integer">475</span>]
-gremlin&gt; pb(<span class="integer">728</span>); <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>
-==&gt;
-gremlin&gt; pb(<span class="integer">729</span>); <span class="string"><span class="delimiter">'</span><span class="content">`MatchStep` brings functionality similar to link:http://en.wikipedia.org/wiki/SPARQL[SPARQL] to Gremlin. Like SPARQL,</span><span class="delimiter">'</span></span>
-==&gt;<span class="error">`</span>MatchStep<span class="error">`</span> brings functionality similar to <span class="key">link</span>:<span class="key">http</span>:<span class="comment">//en.wikipedia.org/wiki/SPARQL[SPARQL] to Gremlin. Like SPARQL,</span>
-gremlin&gt; pb(<span class="integer">730</span>); <span class="string"><span class="delimiter">'</span><span class="content">MatchStep conjoins a set of patterns applied to a graph.  For example, the following traversal finds exactly those</span><span class="delimiter">'</span></span>
-==&gt;MatchStep conjoins a set of patterns applied to a graph.  For example, the following traversal finds exactly those
-gremlin&gt; pb(<span class="integer">731</span>); <span class="string"><span class="delimiter">'</span><span class="content">songs which Jerry Garcia has both sung and written (using the Grateful Dead graph distributed in the `data/` directory):</span><span class="delimiter">'</span></span>
-==&gt;songs which Jerry Garcia has both sung and written (using the Grateful Dead graph distributed <span class="keyword">in</span> the <span class="error">`</span>data/<span class="error">`</span> directory):
-gremlin&gt; pb(<span class="integer">732</span>); <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>
-==&gt;
-gremlin&gt; pb(<span class="integer">733</span>); <span class="string"><span class="delimiter">'</span><span class="content">[source,groovy]</span><span class="delimiter">'</span></span>
-==&gt;[source,groovy]</code></pre>
+                 property(id,<span class="integer">23</span>).property(<span class="string"><span class="delimiter">'</span><span class="content">project</span><span class="delimiter">'</span></span>,select(<span class="string"><span class="delimiter">'</span><span class="content">c</span><span class="delimiter">'</span></span>).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>)) <span class="comment">//</span><b>(5)</b>
+==&gt;e[<span class="integer">23</span>][<span class="integer">1</span>-friendlyCollaborator-&gt;<span class="integer">4</span>]
+gremlin&gt; g.E(<span class="integer">23</span>).valueMap()
+==&gt;[<span class="key">project</span>:lop]</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>gremlin&gt; graph.io(graphml()).readGraph(<em>data/grateful-dead.xml</em>)
-=&#8658;null
-gremlin&gt; g = graph.traversal(standard())
-=&#8658;graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard]
-gremlin&gt; g.V().match(
-                 <em>.as(<em>a</em>).has(<em>name</em>, <em>Garcia</em>),
-                 </em>.as(<em>a</em>).in(<em>writtenBy</em>).as(<em>b</em>),
-                 __.as(<em>a</em>).in(<em>sungBy</em>).as(<em>b</em>)).
-               select(<em>b</em>).values(<em>name</em>)
-=&#8658;CREAM PUFF WAR
-=&#8658;CRYPTICAL ENVELOPMENT</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>
-Among the features which differentiate `match()` from SPARQL are:
-
-[source,groovy]</pre>
+<div class="colist arabic">
+<ol>
+<li>
+<p>Add a co-developer edge with a year-property between marko and his collaborators.</p>
+</li>
+<li>
+<p>Add incoming createdBy edges from the josh-vertex to the lop- and ripple-vertices.</p>
+</li>
+<li>
+<p>Add an inverse createdBy edge for all created edges.</p>
+</li>
+<li>
+<p>The newly created edge is a traversable object.</p>
+</li>
+<li>
+<p>Two arbitrary bindings in a traversal can be joined <code>from()</code>&#8594;<code>to()</code>, where <code>id</code> can be provided for graphs that
+supports user provided ids.</p>
+</li>
+</ol>
 </div>
 </div>
+<div class="sect2">
+<h3 id="addvertex-step">AddVertex Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().match(
-                 <em>.as(<em>a</em>).out(<em>created</em>).has(<em>name</em>,<em>lop</em>).as(<em>b</em>), //// &lt;1&gt;
-                 </em>.as(<em>b</em>).in(<em>created</em>).has(<em>age</em>, 29).as(<em>c</em>),
-                 __.as(<em>c</em>).repeat(out()).times(2)). //// &lt;2&gt;
-               select(<em>c</em>).out(<em>knows</em>).dedup().values(<em>name</em>) //// &lt;3&gt;
-=&#8658;vadas
-=&#8658;josh</p>
+<p>The <code>addV()</code>-step is used to add vertices to the graph (<strong>map</strong>/<strong>sideEffect</strong>). For every incoming object, a vertex is
+created. Moreover, <code>GraphTraversalSource</code> maintains an <code>addV()</code> method.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-&lt;1&gt; *Patterns of arbitrary complexity*: `match()` is not restricted to triple patterns or property paths.
-&lt;2&gt; *Recursion support*: `match()` supports the branch-based steps within a pattern, including `repeat()`.
-&lt;3&gt; *Imperative/declarative hybrid*: Before and after a `match()`, it is possible to leverage classic Gremlin traversals.
-
-To extend point #3, it is possible to support going from imperative, to declarative, to imperative, ad infinitum.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.addV(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).property(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">stephen</span><span class="delimiter">'</span></span>)
+==&gt;v[<span class="integer">13</span>]
+gremlin&gt; g.V().values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>)
+==&gt;marko
+==&gt;vadas
+==&gt;lop
+==&gt;josh
+==&gt;ripple
+==&gt;peter
+==&gt;stephen
+gremlin&gt; g.V().outE(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>).addV().property(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">nothing</span><span class="delimiter">'</span></span>)
+==&gt;v[<span class="integer">15</span>]
+==&gt;v[<span class="integer">17</span>]
+gremlin&gt; g.V().has(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">nothing</span><span class="delimiter">'</span></span>)
+==&gt;v[<span class="integer">17</span>]
+==&gt;v[<span class="integer">15</span>]
+gremlin&gt; g.V().has(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">nothing</span><span class="delimiter">'</span></span>).bothE()</code></pre>
+</div>
 </div>
 </div>
+<div class="sect2">
+<h3 id="addproperty-step">AddProperty Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().match(
-                 <em>.as(<em>a</em>).out(<em>knows</em>).as(<em>b</em>),
-                 </em>.as(<em>b</em>).out(<em>created</em>).has(<em>name</em>,<em>lop</em>)).
-               select(<em>b</em>).out(<em>created</em>).
-                 match(
-                   <em>.as(<em>x</em>).in(<em>created</em>).as(<em>y</em>),
-                   </em>.as(<em>y</em>).out(<em>knows</em>).as(<em>z</em>)).
-               select(<em>z</em>).values(<em>name</em>)
-=&#8658;vadas
-=&#8658;josh</p>
+<p>The <code>property()</code>-step is used to add properties to the elements of the graph (<strong>sideEffect</strong>). Unlike <code>addV()</code> and
+<code>addE()</code>, <code>property()</code> is a full sideEffect step in that it does not return the property it created, but the element
+that streamed into it. Moreover, if <code>property()</code> follows an <code>addV()</code> or <code>addE()</code>, then it is "folded" into the
+previous step to enable vertex and edge creation with all its properties in one creation operation.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-IMPORTANT: The `match()`-step is stateless. The variable bindings of the traversal patterns are stored in the path
-history of the traverser. As such, the variables used over all `match()`-steps within a traversal are globally unique.
-A benefit of this is that subsequent `where()`, `select()`, `match()`, etc. steps can leverage the same variables in
-their analysis.
-
-Like all other steps in Gremlin, `match()` is a function and thus, `match()` within `match()` is a natural consequence
-of Gremlin's functional foundation (i.e. recursive matching).
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V(<span class="integer">1</span>).property(<span class="string"><span class="delimiter">'</span><span class="content">country</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">usa</span><span class="delimiter">'</span></span>)
+==&gt;v[<span class="integer">1</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).property(<span class="string"><span class="delimiter">'</span><span class="content">city</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">santa fe</span><span class="delimiter">'</span></span>).property(<span class="string"><span class="delimiter">'</span><span class="content">state</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">new mexico</span><span class="delimiter">'</span></span>).valueMap()
+==&gt;[<span class="key">country</span>:[usa], <span class="key">city</span>:[santa fe], <span class="key">name</span>:[marko], <span class="key">state</span>:[<span class="keyword">new</span> mexico], <span class="key">age</span>:[<span class="integer">29</span>]]
+gremlin&gt; g.V(<span class="integer">1</span>).property(list,<span class="string"><span class="delimiter">'</span><span class="content">age</span><span class="delimiter">'</span></span>,<span class="integer">35</span>) <span class="comment">//</span><b>(1)</b>
+==&gt;v[<span class="integer">1</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).valueMap()
+==&gt;[<span class="key">country</span>:[usa], <span class="key">city</span>:[santa fe], <span class="key">name</span>:[marko], <span class="key">state</span>:[<span class="keyword">new</span> mexico], <span class="key">age</span>:[<span class="integer">29</span>, <span class="integer">35</span>]]
+gremlin&gt; g.V(<span class="integer">1</span>).property(<span class="string"><span class="delimiter">'</span><span class="content">friendWeight</span><span class="delimiter">'</span></span>,outE(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>).values(<span class="string"><span class="delimiter">'</span><span class="content">weight</span><span class="delimiter">'</span></span>).sum(),<span class="string"><span class="delimiter">'</span><span class="content">acl</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">private</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(2)</b>
+==&gt;v[<span class="integer">1</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).properties(<span class="string"><span class="delimiter">'</span><span class="content">friendWeight</span><span class="delimiter">'</span></span>).valueMap() <span class="comment">//</span><b>(3)</b>
+==&gt;[<span class="key">acl</span>:<span class="directive">private</span>]</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>gremlin&gt; g.V().match(
-                 <em>.as(<em>a</em>).out(<em>knows</em>).as(<em>b</em>),
-                 </em>.as(<em>b</em>).out(<em>created</em>).has(<em>name</em>,<em>lop</em>),
-                 <em>.as(<em>b</em>).match(
-                              </em>.as(<em>b</em>).out(<em>created</em>).as(<em>c</em>),
-                              __.as(<em>c</em>).has(<em>name</em>,<em>ripple</em>)).
-                            select(<em>c</em>).as(<em>c</em>)).
-               select(<em>a</em>,<em>c</em>).by(<em>name</em>)
-=&#8658;[a:marko, c:ripple]</p>
+<div class="colist arabic">
+<ol>
+<li>
+<p>For vertices, a cardinality can be provided for <a href="#vertex-properties">vertex properties</a>.</p>
+</li>
+<li>
+<p>It is possible to select the property value (as well as key) via a traversal.</p>
+</li>
+<li>
+<p>For vertices, the <code>property()</code>-step can add meta-properties.</p>
+</li>
+</ol>
 </div>
-<div class="listingblock">
+</div>
+<div class="sect2">
+<h3 id="aggregate-step">Aggregate Step</h3>
+<div class="imageblock">
 <div class="content">
-<pre>
-If a step-labeled traversal proceeds the `match()`-step and the traverser entering the `match()` is destined to bind
-to a particular variable, then the previous step should be labeled accordingly.
-
-[source,groovy]</pre>
+<img src="../images/aggregate-step.png" alt="aggregate step" width="800">
 </div>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().as(<em>a</em>).out(<em>knows</em>).as(<em>b</em>).
-           match(
-             <em>.as(<em>b</em>).out(<em>created</em>).as(<em>c</em>),
-             </em>.not(__.as(<em>c</em>).in(<em>created</em>).as(<em>a</em>))).
-           select(<em>a</em>,<em>b</em>,<em>c</em>).by(<em>name</em>)
-=&#8658;[a:marko, b:josh, c:ripple]</p>
+<p>The <code>aggregate()</code>-step (<strong>sideEffect</strong>) is used to aggregate all the objects at a particular point of traversal into a
+<code>Collection</code>. The step uses <a href="http://en.wikipedia.org/wiki/Eager_evaluation">eager evaluation</a> in that no objects
+continue on until all previous objects have been fully aggregated (as opposed to <a href="#store-step"><code>store()</code></a> which
+<a href="http://en.wikipedia.org/wiki/Lazy_evaluation">lazily</a> fills a collection). The eager evaluation nature is crucial
+in situations where everything at a particular point is required for future computation. An example is provided below.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-There are three types of `match()` traversal patterns.
-
-  . `as('a')...as('b')`: both the start and end of the traversal have a declared variable.
-  . `as('a')...`: only the start of the traversal has a declared variable.
-  . `...`: there are no declared variables.
-
-If a variable is at the start of a traversal pattern it *must* exist as a label in the path history of the traverser
-else the traverser can not go down that path. If a variable is at the end of a traversal pattern then if the variable
-exists in the path history of the traverser, the traverser's current location *must* match (i.e. equal) its historic
-location at that same label. However, if the variable does not exist in the path history of the traverser, then the
-current location is labeled as the variable and thus, becomes a bound variable for subsequent traversal patterns. If a
-traversal pattern does not have an end label, then the traverser must simply "survive" the pattern (i.e. not be
-filtered) to continue to the next pattern. If a traversal pattern does not have a start label, then the traverser
-can go down that path at any point, but will only go down that pattern once as a traversal pattern is executed once
-and only once for the history of the traverser. Typically, traversal patterns that do not have a start and end label
-are used in conjunction with `and()`, `or()`, and `where()`. Once the traverser has "survived" all the patterns (or at
-least one for `or()`), `match()`-step analyzes the traverser's path history and emits a `Map&lt;String,Object&gt;` of the
-variable bindings to the next step in the traversal.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V(<span class="integer">1</span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(1)</b>
+==&gt;v[<span class="integer">3</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).aggregate(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(2)</b>
+==&gt;v[<span class="integer">3</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).aggregate(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>).in(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(3)</b>
+==&gt;v[<span class="integer">1</span>]
+==&gt;v[<span class="integer">4</span>]
+==&gt;v[<span class="integer">6</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).aggregate(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>).in(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(4)</b>
+==&gt;v[<span class="integer">3</span>]
+==&gt;v[<span class="integer">5</span>]
+==&gt;v[<span class="integer">3</span>]
+==&gt;v[<span class="integer">3</span>]
+gremlin&gt; g.V(<span class="integer">1</span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).aggregate(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>).in(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).
+                where(without(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>)).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(5)</b>
+==&gt;ripple</code></pre>
 </div>
 </div>
+<div class="colist arabic">
+<ol>
+<li>
+<p>What has marko created?</p>
+</li>
+<li>
+<p>Aggregate all his creations.</p>
+</li>
+<li>
+<p>Who are marko&#8217;s collaborators?</p>
+</li>
+<li>
+<p>What have marko&#8217;s collaborators created?</p>
+</li>
+<li>
+<p>What have marko&#8217;s collaborators created that he hasn&#8217;t created?</p>
+</li>
+</ol>
+</div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().as(<em>a</em>).out().as(<em>b</em>). //// &lt;1&gt;
-             match( //// &lt;2&gt;
-               <em>.as(<em>a</em>).out().count().as(<em>c</em>), //// &lt;3&gt;
-               </em>.not(<em>.as(<em>a</em>).in().as(<em>b</em>)), //// &lt;4&gt;
-               or( //// &lt;5&gt;
-                 </em>.as(<em>a</em>).out(<em>knows</em>).as(<em>b</em>),
-                 __.as(<em>b</em>).in().count().as(<em>c</em>).and().as(<em>c</em>).is(gt(2)))). //// &lt;6&gt;
-             dedup(<em>a</em>,<em>c</em>). //// &lt;7&gt;
-             select(<em>a</em>,<em>b</em>,<em>c</em>).by(<em>name</em>).by(<em>name</em>).by() //// &lt;8&gt;
-=&#8658;[a:marko, b:lop, c:3]</p>
+<p>In <a href="http://en.wikipedia.org/wiki/Recommender_system">recommendation systems</a>, the above pattern is used:</p>
 </div>
-<div class="listingblock">
+<div class="literalblock">
 <div class="content">
-<pre>
-&lt;1&gt; A standard, step-labeled traversal can come prior to `match()`.
-&lt;2&gt; If the traverser's path prior to entering `match()` has requisite label values, then those historic values are bound.
-&lt;3&gt; It is possible to use &lt;&lt;a-note-on-barrier-steps,barrier steps&gt;&gt; though they are computed locally to the pattern (as one would expect).
-&lt;4&gt; It is possible to `not()` a pattern.
-&lt;5&gt; It is possible to nest `and()`- and `or()`-steps for conjunction matching.
-&lt;6&gt; Both infix and prefix conjunction notation is supported.
-&lt;7&gt; It is possible to "distinct" the specified label combination.
-&lt;8&gt; The bound values are of different types -- vertex ("a"), vertex ("b"), long ("c").
-
-[[using-where-with-match]]
-Using Where with Match
-^^^^^^^^^^^^^^^^^^^^^^
-
-Match is typically used in conjunction with both `select()` (demonstrated previously) and `where()` (presented here).
-A `where()`-step allows the user to further constrain the result set provided by `match()`.
-
-[source,groovy]</pre>
+<pre>"What has userA liked? Who else has liked those things? What have they liked that userA hasn't already liked?"</pre>
 </div>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().match(
-                 <em>.as(<em>a</em>).out(<em>created</em>).as(<em>b</em>),
-                 </em>.as(<em>b</em>).in(<em>created</em>).as(<em>c</em>)).
-                 where(<em>a</em>, neq(<em>c</em>)).
-               select(<em>a</em>,<em>c</em>).by(<em>name</em>)
-=&#8658;[a:marko, c:josh]
-=&#8658;[a:marko, c:peter]
-=&#8658;[a:josh, c:marko]
-=&#8658;[a:josh, c:peter]
-=&#8658;[a:peter, c:marko]
-=&#8658;[a:peter, c:josh]</p>
+<p>Finally, <code>aggregate()</code>-step can be modulated via <code>by()</code>-projection.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-The `where()`-step can take either a `P`-predicate (example above) or a `Traversal` (example below). Using
-`MatchPredicateStrategy`, `where()`-clauses are automatically folded into `match()` and thus, subject to the query
-optimizer within `match()`-step.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().out(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>).aggregate(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>).cap(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>)
+==&gt;{v[<span class="integer">2</span>]=<span class="integer">1</span>, v[<span class="integer">4</span>]=<span class="integer">1</span>}
+gremlin&gt; g.V().out(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>).aggregate(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>).by(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>).cap(<span class="string"><span class="delimiter">'</span><span class="content">x</span><span class="delimiter">'</span></span>)
+==&gt;{vadas=<span class="integer">1</span>, josh=<span class="integer">1</span>}</code></pre>
 </div>
 </div>
+</div>
+<div class="sect2">
+<h3 id="and-step">And Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; traversal = g.V().match(
-                             <em>.as(<em>a</em>).has(label,<em>person</em>), //// &lt;1&gt;
-                             </em>.as(<em>a</em>).out(<em>created</em>).as(<em>b</em>),
-                             <em>.as(<em>b</em>).in(<em>created</em>).as(<em>c</em>)).
-                             where(</em>.as(<em>a</em>).out(<em>knows</em>).as(<em>c</em>)). //// &lt;2&gt;
-                           select(<em>a</em>,<em>c</em>).by(<em>name</em>); null //// &lt;3&gt;
-=&#8658;null
-gremlin&gt; traversal.toString() //// &lt;4&gt;
-=&#8658;[GraphStep([],vertex), MatchStep(AND,<a id="MatchStartStep(a)"></a>), WhereTraversalStep([WhereStartStep(a), VertexStep(OUT,[knows],vertex), WhereEndStep(c)]), SelectStep([a, c],[value(name)])]
-gremlin&gt; traversal //// &lt;5&gt; &lt;6&gt;
-=&#8658;[a:marko, c:josh]
-gremlin&gt; traversal.toString() //// &lt;7&gt;
-=&#8658;[TinkerGraphStep(vertex,[</sub>label.eq(person)])@[a], MatchStep(AND,<a id="MatchStartStep(a)"></a>), SelectStep([a, c],[value(name)])]</p>
+<p>The <code>and()</code>-step ensures that all provided traversals yield a result (<strong>filter</strong>). Please see <a href="#or-step"><code>or()</code></a> for or-semantics.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-&lt;1&gt; Any `has()`-step traversal patterns that start with the match-key are pulled out of `match()` to enable the graph
-system to leverage the filter for index lookups.
-&lt;2&gt; A `where()`-step with a traversal containing variable bindings declared in `match()`.
-&lt;3&gt; A useful trick to ensure that the traversal is not iterated by Gremlin Console.
-&lt;4&gt; The string representation of the traversal prior to its strategies being applied.
-&lt;5&gt; The Gremlin Console will automatically iterate anything that is an iterator or is iterable.
-&lt;6&gt; Both marko and josh are co-developers and marko knows josh.
-&lt;7&gt; The string representation of the traversal after the strategies have been applied (and thus, `where()` is folded into `match()`)
-
-IMPORTANT: A `where()`-step is a filter and thus, variables within a `where()` clause are not globally bound to the
-path of the traverser in `match()`. As such, `where()`-steps in `match()` are used for filtering, not binding.
-
-[[max-step]]
-Max Step
-~~~~~~~~
-
-The `max()`-step (*map*) operates on a stream of numbers and determines which is the largest number in the stream.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().and(
+            outE(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>),
+            values(<span class="string"><span class="delimiter">'</span><span class="content">age</span><span class="delimiter">'</span></span>).is(lt(<span class="integer">30</span>))).
+              values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>)
+==&gt;marko</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().values(<em>age</em>).max()
-=&#8658;35
-gremlin&gt; g.V().repeat(both()).times(3).values(<em>age</em>).max()
-=&#8658;35</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre>
-IMPORTANT: `max(local)` determines the max of the current, local object (not the objects in the traversal stream).
-This works for `Collection` and `Number`-type objects. For any other object, a max of `Double.NaN` is returned.
-
-[[mean-step]]
-Mean Step
-~~~~~~~~~
-
-The `mean()`-step (*map*) operates on a stream of numbers and determines the average of those numbers.
-
-[source,groovy]</pre>
-</div>
+<p>The <code>and()</code>-step can take an arbitrary number of traversals. All traversals must produce at least one output for the
+original traverser to pass to the next step.</p>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().values(<em>age</em>).mean()
-=&#8658;30.75
-gremlin&gt; g.V().repeat(both()).times(3).values(<em>age</em>).mean() //// &lt;1&gt;
-=&#8658;30.645833333333332
-gremlin&gt; g.V().repeat(both()).times(3).values(<em>age</em>).dedup().mean()
-=&#8658;30.75</p>
+<p>An <a href="http://en.wikipedia.org/wiki/Infix_notation">infix notation</a> can be used as well. Though, with infix notation,
+only two traversals can be and&#8217;d together.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-&lt;1&gt; Realize that traversers are being bulked by `repeat()`. There may be more of a particular number than another,
-thus altering the average.
-
-IMPORTANT: `mean(local)` determines the mean of the current, local object (not the objects in the traversal stream).
-This works for `Collection` and `Number`-type objects. For any other object, a mean of `Double.NaN` is returned.
-
-[[min-step]]
-Min Step
-~~~~~~~~
-
-The `min()`-step (*map*) operates on a stream of numbers and determines which is the smallest number in the stream.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().where(outE(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).and().outE(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>)).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>)
+==&gt;marko</code></pre>
+</div>
 </div>
 </div>
+<div class="sect2">
+<h3 id="as-step">As Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().values(<em>age</em>).min()
-=&#8658;27
-gremlin&gt; g.V().repeat(both()).times(3).values(<em>age</em>).min()
-=&#8658;27</p>
+<p>The <code>as()</code>-step is not a real step, but a "step modulator" similar to <a href="#by-step"><code>by()</code></a> and <a href="#option-step"><code>option()</code></a>.
+With <code>as()</code>, it is possible to provide a label to the step that can later be accessed by steps and data structures
+that make use of such labels&#8201;&#8212;&#8201;e.g., <a href="#select-step"><code>select()</code></a>, <a href="#match-step"><code>match()</code></a>, and path.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-IMPORTANT: `min(local)` determines the min of the current, local object (not the objects in the traversal stream).
-This works for `Collection` and `Number`-type objects. For any other object, a min of `Double.NaN` is returned.
-
-[[option-step]]
-Option Step
-~~~~~~~~~~~~~
-
-An option to a &lt;&lt;branch-step,`branch()`&gt;&gt; or &lt;&lt;choose-step,`choose()`&gt;&gt;
-
-[[or-step]]
-Or Step
-~~~~~~~
-
-The `or()`-step ensures that at least one of the provided traversals yield a result (*filter*). Please see
-&lt;&lt;and-step,`and()`&gt;&gt; for and-semantics.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().as(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).as(<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>).select(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(1)</b>
+==&gt;[<span class="key">a</span>:v[<span class="integer">1</span>], <span class="key">b</span>:v[<span class="integer">3</span>]]
+==&gt;[<span class="key">a</span>:v[<span class="integer">4</span>], <span class="key">b</span>:v[<span class="integer">5</span>]]
+==&gt;[<span class="key">a</span>:v[<span class="integer">4</span>], <span class="key">b</span>:v[<span class="integer">3</span>]]
+==&gt;[<span class="key">a</span>:v[<span class="integer">6</span>], <span class="key">b</span>:v[<span class="integer">3</span>]]
+gremlin&gt; g.V().as(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>).out(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).as(<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>).select(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>).by(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(2)</b>
+==&gt;[<span class="key">a</span>:marko, <span class="key">b</span>:lop]
+==&gt;[<span class="key">a</span>:josh, <span class="key">b</span>:ripple]
+==&gt;[<span class="key">a</span>:josh, <span class="key">b</span>:lop]
+==&gt;[<span class="key">a</span>:peter, <span class="key">b</span>:lop]</code></pre>
 </div>
 </div>
+<div class="colist arabic">
+<ol>
+<li>
+<p>Select the objects labeled "a" and "b" from the path.</p>
+</li>
+<li>
+<p>Select the objects labeled "a" and "b" from the path and, for each object, project its name value.</p>
+</li>
+</ol>
+</div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().or(
-            <em>.outE(<em>created</em>),
-            </em>.inE(<em>created</em>).count().is(gt(1))).
-              values(<em>name</em>)
-=&#8658;marko
-=&#8658;lop
-=&#8658;josh
-=&#8658;peter</p>
+<p>A step can have any number of labels associated with it. This is useful for referencing the same step multiple times in a future step.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-The `or()`-step can take an arbitrary number of traversals. At least one of the traversals must produce at least one
-output for the original traverser to pass to the next step.
-
-An link:http://en.wikipedia.org/wiki/Infix_notation[infix notation] can be used as well. Though, with infix notation,
-only two traversals can be or'd together.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">software</span><span class="delimiter">'</span></span>).as(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">c</span><span class="delimiter">'</span></span>).
+            select(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">c</span><span class="delimiter">'</span></span>).
+              by(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>).
+              by(<span class="string"><span class="delimiter">'</span><span class="content">lang</span><span class="delimiter">'</span></span>).
+              by(__.in(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>).fold())
+==&gt;[<span class="key">a</span>:lop, <span class="key">b</span>:java, <span class="key">c</span>:[marko, josh, peter]]
+==&gt;[<span class="key">a</span>:ripple, <span class="key">b</span>:java, <span class="key">c</span>:[josh]]</code></pre>
 </div>
 </div>
+</div>
+<div class="sect2">
+<h3 id="barrier-step">Barrier Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().where(outE(<em>created</em>).or().outE(<em>knows</em>)).values(<em>name</em>)
-=&#8658;marko
-=&#8658;josh
-=&#8658;peter</p>
+<p>The <code>barrier()</code>-step (<strong>barrier</strong>) turns the lazy traversal pipeline into a bulk-synchronous pipeline. This step is
+useful in the following situations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>When everything prior to <code>barrier()</code> needs to be executed before moving onto the steps after the <code>barrier()</code> (i.e. ordering).</p>
+</li>
+<li>
+<p>When "stalling" the traversal may lead to a "bulking optimization" in traversals that repeatedly touch many of the same elements (i.e. optimizing).</p>
+</li>
+</ul>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-[[order-step]]
-Order Step
-~~~~~~~~~~
-
-When the objects of the traversal stream need to be sorted, `order()`-step (*map*) can be leveraged.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().sideEffect{println <span class="string"><span class="delimiter">&quot;</span><span class="content">first: </span><span class="inline"><span class="inline-delimiter">${</span><span class="local-variable">it</span><span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span>}.sideEffect{println <span class="string"><span class="delimiter">&quot;</span><span class="content">second: </span><span class="inline"><span class="inline-delimiter">${</span><span class="local-variable">it</span><span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span>}.iterate()
+<span class="key">first</span>: v[<span class="integer">1</span>]
+<span class="key">second</span>: v[<span class="integer">1</span>]
+<span class="key">first</span>: v[<span class="integer">2</span>]
+<span class="key">second</span>: v[<span class="integer">2</span>]
+<span class="key">first</span>: v[<span class="integer">3</span>]
+<span class="key">second</span>: v[<span class="integer">3</span>]
+<span class="key">first</span>: v[<span class="integer">4</span>]
+<span class="key">second</span>: v[<span class="integer">4</span>]
+<span class="key">first</span>: v[<span class="integer">5</span>]
+<span class="key">second</span>: v[<span class="integer">5</span>]
+<span class="key">first</span>: v[<span class="integer">6</span>]
+<span class="key">second</span>: v[<span class="integer">6</span>]
+gremlin&gt; g.V().sideEffect{println <span class="string"><span class="delimiter">&quot;</span><span class="content">first: </span><span class="inline"><span class="inline-delimiter">${</span><span class="local-variable">it</span><span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span>}.barrier().sideEffect{println <span class="string"><span class="delimiter">&quot;</span><span class="content">second: </span><span class="inline"><span class="inline-delimiter">${</span><span class="local-variable">it</span><span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span>}.iterate()
+<span class="key">first</span>: v[<span class="integer">1</span>]
+<span class="key">first</span>: v[<span class="integer">2</span>]
+<span class="key">first</span>: v[<span class="integer">3</span>]
+<span class="key">first</span>: v[<span class="integer">4</span>]
+<span class="key">first</span>: v[<span class="integer">5</span>]
+<span class="key">first</span>: v[<span class="integer">6</span>]
+<span class="key">second</span>: v[<span class="integer">1</span>]
+<span class="key">second</span>: v[<span class="integer">2</span>]
+<span class="key">second</span>: v[<span class="integer">3</span>]
+<span class="key">second</span>: v[<span class="integer">4</span>]
+<span class="key">second</span>: v[<span class="integer">5</span>]
+<span class="key">second</span>: v[<span class="integer">6</span>]</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().values(<em>name</em>).order()
-=&#8658;josh
-=&#8658;lop
-=&#8658;marko
-=&#8658;peter
-=&#8658;ripple
-=&#8658;vadas
-gremlin&gt; g.V().values(<em>name</em>).order().by(decr)
-=&#8658;vadas
-=&#8658;ripple
-=&#8658;peter
-=&#8658;marko
-=&#8658;lop
-=&#8658;josh
-gremlin&gt; g.V().hasLabel(<em>person</em>).order().by(<em>age</em>, incr).values(<em>name</em>)
-=&#8658;vadas
-=&#8658;marko
-=&#8658;josh
-=&#8658;peter</p>
+<p>The theory behind a "bulking optimization" is simple. If there are one million traversers at vertex 1, then there is
+no need to calculate one million <code>both()</code>-computations. Instead, represent those one million traversers as a single
+traverser with a <code>Traverser.bulk()</code> equal to one million and execute <code>both()</code> once. A bulking optimization example is
+made more salient on a larger graph. Therefore, the example below leverages the <a href="#grateful-dead">Grateful Dead graph</a>.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-One of the most traversed objects in a traversal is an `Element`. An element can have properties associated with it
-(i.e. key/value pairs). In many situations, it is desirable to sort an element traversal stream according to a
-comparison of their properties.
-
-[source,groovy]</pre>
-</div>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; graph = TinkerGraph.open()
+==&gt;tinkergraph[<span class="key">vertices</span>:<span class="integer">0</span> <span class="key">edges</span>:<span class="integer">0</span>]
+gremlin&gt; graph.io(graphml()).readGraph(<span class="string"><span class="delimiter">'</span><span class="content">data/grateful-dead.xml</span><span class="delimiter">'</span></span>)
+==&gt;<span class="predefined-constant">null</span>
+gremlin&gt; g = graph.traversal(standard())
+==&gt;graphtraversalsource[tinkergraph[<span class="key">vertices</span>:<span class="integer">808</span> <span class="key">edges</span>:<span class="integer">8049</span>], standard]
+gremlin&gt; clockWithResult(<span class="integer">1</span>){g.V().both().both().both().count().next()} <span class="comment">//</span><b>(1)</b>
+==&gt;<span class="float">11787.011482</span>
+==&gt;<span class="integer">126653966</span>
+gremlin&gt; clockWithResult(<span class="integer">1</span>){g.V().repeat(both()).times(<span class="integer">3</span>).count().next()} <span class="comment">//</span><b>(2)</b>
+==&gt;<span class="float">1533.832309</span>
+==&gt;<span class="integer">126653966</span>
+gremlin&gt; clockWithResult(<span class="integer">1</span>){g.V().both().barrier().both().barrier().both().barrier().count().next()} <span class="comment">//</span><b>(3)</b>
+==&gt;<span class="float">16.900191</span>
+==&gt;<span class="integer">126653966</span></code></pre>
 </div>
-<div class="paragraph">
-<p>gremlin&gt; g.V().values(<em>name</em>)
-=&#8658;marko
-=&#8658;vadas
-=&#8658;lop
-=&#8658;josh
-=&#8658;ripple
-=&#8658;peter
-gremlin&gt; g.V().order().by(<em>name</em>,incr).values(<em>name</em>)
-=&#8658;josh
-=&#8658;lop
-=&#8658;marko
-=&#8658;peter
-=&#8658;ripple
-=&#8658;vadas
-gremlin&gt; g.V().order().by(<em>name</em>,decr).values(<em>name</em>)
-=&#8658;vadas
-=&#8658;ripple
-=&#8658;peter
-=&#8658;marko
-=&#8658;lop
-=&#8658;josh</p>
 </div>
-<div class="listingblock">
-<div class="content">
-<pre>
-The `order()`-step allows the user to provide an arbitrary number of comparators for primary, secondary, etc. sorting.
-In the example below, the primary ordering is based on the outgoing created-edge count. The secondary ordering is
-based on the age of the person.
-
-[source,groovy]</pre>
+<div class="colist arabic">
+<ol>
+<li>
+<p>A non-bulking traversal where each traverser is processed.</p>
+</li>
+<li>
+<p>Each traverser entering <code>repeat()</code> has its recursion bulked.</p>
+</li>
+<li>
+<p>A bulking traversal where implicit traversers are not processed.</p>
+</li>
+</ol>
 </div>
+<div class="paragraph">
+<p>If <code>barrier()</code> is provided an integer argument, then the barrier will only hold <code>n</code>-number of unique traversers in its
+barrier before draining the aggregated traversers to the next step. This is useful in the aforementioned bulking
+optimization scenario, but reduces the risk of an out-of-memory exception.</p>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().hasLabel(<em>person</em>).order().by(outE(<em>created</em>).count(), incr).
-                                          by(<em>age</em>, incr).values(<em>name</em>)
-=&#8658;vadas
-=&#8658;marko
-=&#8658;peter
-=&#8658;josh
-gremlin&gt; g.V().hasLabel(<em>person</em>).order().by(outE(<em>created</em>).count(), incr).
-                                          by(<em>age</em>, decr).values(<em>name</em>)
-=&#8658;vadas
-=&#8658;peter
-=&#8658;marko
-=&#8658;josh</p>
+<p>The non-default <code>LazyBarrierStrategy</code> inserts <code>barrier()</code>-steps in a traversal where appropriate in order to gain the
+"bulking optimization."</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-Randomizing the order of the traversers at a particular point in the traversal is possible with `Order.shuffle`.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; graph = TinkerGraph.open()
+==&gt;tinkergraph[<span class="key">vertices</span>:<span class="integer">0</span> <span class="key">edges</span>:<span class="integer">0</span>]
+gremlin&gt; graph.io(graphml()).readGraph(<span class="string"><span class="delimiter">'</span><span class="content">data/grateful-dead.xml</span><span class="delimiter">'</span></span>)
+==&gt;<span class="predefined-constant">null</span>
+gremlin&gt; g = graph.traversal(GraphTraversalSource.build().with(LazyBarrierStrategy.instance()).engine(StandardTraversalEngine.build()))
+==&gt;graphtraversalsource[tinkergraph[<span class="key">vertices</span>:<span class="integer">808</span> <span class="key">edges</span>:<span class="integer">8049</span>], standard]
+gremlin&gt; clockWithResult(<span class="integer">1</span>){g.V().both().both().both().count().next()}
+==&gt;<span class="float">13.600717999999999</span>
+==&gt;<span class="integer">126653966</span>
+gremlin&gt; g.V().both().both().both().count().iterate().toString() <span class="comment">//</span><b>(1)</b>
+==&gt;[TinkerGraphStep(<span class="type">[]</span>,vertex), VertexStep(BOTH,vertex), LambdaCollectingBarrierStep(noOp), VertexStep(BOTH,vertex), LambdaCollectingBarrierStep(noOp), VertexStep(BOTH,edge), CountGlobalStep]</code></pre>
 </div>
 </div>
+<div class="colist arabic">
+<ol>
+<li>
+<p>With <code>LazyBarrierStrategy</code> activated, <code>barrier()</code> steps are automatically inserted where appropriate.</p>
+</li>
+</ol>
+</div>
+</div>
+<div class="sect2">
+<h3 id="by-step">By Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().hasLabel(<em>person</em>).order().by(shuffle)
-=&#8658;v[4]
-=&#8658;v[2]
-=&#8658;v[6]
-=&#8658;v[1]
-gremlin&gt; g.V().hasLabel(<em>person</em>).order().by(shuffle)
-=&#8658;v[4]
-=&#8658;v[2]
-=&#8658;v[1]
-=&#8658;v[6]</p>
+<p>The <code>by()</code>-step is not an actual step, but instead is a "step-modulator" similar to <a href="#as-step"><code>as()</code></a> and
+<a href="#option-step"><code>option()</code></a>. If a step is able to accept traversals, functions, comparators, etc. then <code>by()</code> is the
+means by which they are added. The general pattern is <code>step().by()...by()</code>. Some steps can only accept one <code>by()</code>
+while others can take an arbitrary amount.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-It is possible to use `order(local)` to order the current local object and not the entire traversal stream. This works for
-`Collection`- and `Map`-type objects. For any other object, the object is returned unchanged.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().group().by(bothE().count()) <span class="comment">//</span><b>(1)</b>
+==&gt;[<span class="integer">1</span>:[v[<span class="integer">2</span>], v[<span class="integer">5</span>], v[<span class="integer">6</span>]], <span class="integer">3</span>:[v[<span class="integer">1</span>], v[<span class="integer">3</span>], v[<span class="integer">4</span>]]]
+gremlin&gt; g.V().group().by(bothE().count()).by(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(2)</b>
+==&gt;[<span class="integer">1</span>:[vadas, ripple, peter], <span class="integer">3</span>:[marko, lop, josh]]
+gremlin&gt; g.V().group().by(bothE().count()).by(count()) <span class="comment">//</span><b>(3)</b>
+==&gt;[<span class="integer">1</span>:<span class="integer">3</span>, <span class="integer">3</span>:<span class="integer">3</span>]</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<ol>
+<li>
+<p><code>by(outE().count())</code> will group the elements by their edge count (<strong>traversal</strong>).</p>
+</li>
+<li>
+<p><code>by('name')</code> will process the grouped elements by their name (<strong>element property projection</strong>).</p>
+</li>
+<li>
+<p><code>by(count())</code> will count the number of elements in each group (<strong>traversal</strong>).</p>
+</li>
+</ol>
 </div>
 </div>
+<div class="sect2">
+<h3 id="cap-step">Cap Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().values(<em>age</em>).fold().order(local).by(decr) //// &lt;1&gt;
-=&#8658;[35, 32, 29, 27]
-gremlin&gt; g.V().values(<em>age</em>).order(local).by(decr) //// &lt;2&gt;
-=&#8658;29
-=&#8658;27
-=&#8658;32
-=&#8658;35
-gremlin&gt; g.V().groupCount().by(inE().count()).order(local).by(values, decr) //// &lt;3&gt;
-=&#8658;[1:3, 0:2, 3:1]
-gremlin&gt; g.V().groupCount().by(inE().count()).order(local).by(keys, incr) //// &lt;4&gt;
-=&#8658;[0:2, 1:3, 3:1]</p>
+<p>The <code>cap()</code>-step (<strong>barrier</strong>) iterates the traversal up to itself and emits the sideEffect referenced by the provided
+key. If multiple keys are provided, then a <code>Map&lt;String,Object&gt;</code> of sideEffects is emitted.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-&lt;1&gt; The ages are gathered into a list and then that list is sorted in decreasing order.
-&lt;2&gt; The ages are not gathered and thus `order(local)` is "ordering" single integers and thus, does nothing.
-&lt;3&gt; The `groupCount()` map is ordered by its values in decreasing order.
-&lt;4&gt; The `groupCount()` map is ordered by its keys in increasing order.
-
-NOTE: The `values` and `keys` enums are from `Column` which is used to select "columns" from a `Map`, `Map.Entry`, or `Path`.
-
-[[path-step]]
-Path Step
-~~~~~~~~~
-
-A traverser is transformed as it moves through a series of steps within a traversal. The history of the traverser is
-realized by examining its path with `path()`-step (*map*).
-
-image::path-step.png[width=650]
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().groupCount(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>).by(label).cap(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(1)</b>
+==&gt;[<span class="key">software</span>:<span class="integer">2</span>, <span class="key">person</span>:<span class="integer">4</span>]
+gremlin&gt; g.V().groupCount(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>).by(label).groupCount(<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>).by(outE().count()).cap(<span class="string"><span class="delimiter">'</span><span class="content">a</span><span class="delimiter">'</span></span>,<span class="string"><span class="delimiter">'</span><span class="content">b</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(2)</b>
+==&gt;[<span class="key">a</span>:[<span class="key">software</span>:<span class="integer">2</span>, <span class="key">person</span>:<span class="integer">4</span>], <span class="key">b</span>:[<span class="integer">0</span>:<span class="integer">3</span>, <span class="integer">1</span>:<span class="integer">1</span>, <span class="integer">2</span>:<span class="integer">1</span>, <span class="integer">3</span>:<span class="integer">1</span>]]</code></pre>
+</div>
+</div>
+<div class="colist arabic">
+<ol>
+<li>
+<p>Group and count verticies by their label.  Emit the side effect labeled <em>a</em>, which is the group count by label.</p>
+</li>
+<li>
+<p>Same as statement 1, but also emit the side effect labeled <em>b</em> which groups vertices by the number of out edges.</p>
+</li>
+</ol>
 </div>
 </div>
+<div class="sect2">
+<h3 id="coalesce-step">Coalesce Step</h3>
 <div class="paragraph">
-<p>gremlin&gt; g.V().out().out().values(<em>name</em>)
-=&#8658;ripple
-=&#8658;lop
-gremlin&gt; g.V().out().out().values(<em>name</em>).path()
-=&#8658;[v[1], v[4], v[5], ripple]
-=&#8658;[v[1], v[4], v[3], lop]</p>
+<p>The <code>coalesce()</code>-step evaluates the provided traversals in order and returns the first traversal that emits at
+least one element.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-If edges are required in the path, then be sure to traverser those edges explicitly.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V(<span class="integer">1</span>).coalesce(outE(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>), outE(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>)).inV().path().by(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>).by(label)
+==&gt;[marko, knows, vadas]
+==&gt;[marko, knows, josh]
+gremlin&gt; g.V(<span class="integer">1</span>).coalesce(outE(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>), outE(<span class="string"><span class="delimiter">'</span><span class="content">knows</span><span class="delimiter">'</span></span>)).inV().path().by(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>).by(label)
+==&gt;[marko, created, lop]
+gremlin&gt; g.V(<span class="integer">1</span>).property(<span class="string"><span class="delimiter">'</span><span class="content">nickname</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">okram</span><span class="delimiter">'</span></span>)
+==&gt;v[<span class="integer">1</span>]
+gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).coalesce(values(<span class="string"><span class="delimiter">'</span><span class="content">nickname</span><span class="delimiter">'</span></span>), values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>))
+==&gt;okram
+==&gt;vadas
+==&gt;josh
+==&gt;peter</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>gremlin&gt; g.V().outE().inV().outE().inV().path()
-=&#8658;[v[1], e[8][1-knows&#8594;4], v[4], e[10][4-created&#8594;5], v[5]]
-=&#8658;[v[1], e[8][1-knows&#8594;4], v[4], e[11][4-created&#8594;3], v[3]]</p>
 </div>
-<div class="listingblock">
+<div class="sect2">
+<h3 id="count-step">Count Step</h3>
+<div class="imageblock">
 <div class="content">
-<pre>
-It is possible to post-process the elements of the path in a round-robin fashion via `by()`.
-
-[source,groovy]</pre>
+<img src="../images/count-step.png" alt="count step" width="195">
 </div>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; g.V().out().out().path().by(<em>name</em>).by(<em>age</em>)
-=&#8658;[marko, 32, ripple]
-=&#8658;[marko, 32, lop]</p>
+<p>The <code>count()</code>-step (<strong>map</strong>) counts the total number of represented traversers in the streams (i.e. the bulk count).</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-Finally, because `by()`-based post-processing, nothing prevents triggering yet another traversal. In the traversal
-below, for each element of the path traversed thus far, if its a person (as determined by having an `age`-property),
-then get all of their creations, else if its a creation, get all the people that created it.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().count()
+==&gt;<span class="integer">6</span>
+gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).count()
+==&gt;<span class="integer">4</span>
+gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).outE(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).count().path() <span class="comment">//</span><b>(1)</b>
+==&gt;[<span class="integer">4</span>]
+gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).outE(<span class="string"><span class="delimiter">'</span><span class="content">created</span><span class="delimiter">'</span></span>).count().map {<span class="local-variable">it</span>.get() * <span class="integer">10</span>}.path() <span class="comment">//</span><b>(2)</b>
+==&gt;[<span class="integer">4</span>, <span class="integer">40</span>]</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>gremlin&gt; g.V().out().out().path().by(
-                            choose(hasLabel(<em>person</em>),
-                                          out(<em>created</em>).values(<em>name</em>),
-                                          __.in(<em>created</em>).values(<em>name</em>)).fold())
-=&#8658;<a id="lop]"></a>
-=&#8658;<a id="lop]"></a></p>
+<div class="colist arabic">
+<ol>
+<li>
+<p><code>count()</code>-step is a <a href="#a-note-on-barrier-steps">reducing barrier step</a> meaning that all of the previous traversers are folded into a new traverser.</p>
+</li>
+<li>
+<p>The path of the traverser emanating from <code>count()</code> starts at <code>count()</code>.</p>
+</li>
+</ol>
 </div>
-<div class="listingblock">
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Important</div>
+</td>
+<td class="content">
+<code>count(local)</code> counts the current, local object (not the objects in the traversal stream). This works for
+<code>Collection</code>- and <code>Map</code>-type objects. For any other object, a count of 1 is returned.
+</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="choose-step">Choose Step</h3>
+<div class="imageblock">
 <div class="content">
-<pre>
-WARNING: Generating path information is expensive as the history of the traverser is stored into a Java list. With
-numerous traversers, there are numerous lists. Moreover, in an OLAP &lt;&lt;graphcomputer,`GraphComputer`&gt;&gt; environment
-this becomes exceedingly prohibitive as there are traversers emanating from all vertices in the graph in parallel.
-In OLAP there are optimizations provided for traverser populations, but when paths are calculated (and each traverser
-is unique due to its history), then these optimizations are no longer possible.
-
-[[path-data-structure]]
-Path Data Structure
-^^^^^^^^^^^^^^^^^^^
-
-The `Path` data structure is an ordered list of objects, where each object is associated to a `Set&lt;String&gt;` of
-labels. An example is presented below to demonstrate both the `Path` API as well as how a traversal yields labeled paths.
-
-image::path-data-structure.png[width=350]
-
-[source,groovy]</pre>
+<img src="../images/choose-step.png" alt="choose step" width="700">
 </div>
 </div>
 <div class="paragraph">
-<p>gremlin&gt; path = g.V(1).as(<em>a</em>).has(<em>name</em>).as(<em>b</em>).
-                       out(<em>knows</em>).out(<em>created</em>).as(<em>c</em>).
-                       has(<em>name</em>,<em>ripple</em>).values(<em>name</em>).as(<em>d</em>).
-                       identity().as(<em>e</em>).path().next()
-=&#8658;v[1]
-=&#8658;v[4]
-=&#8658;v[5]
-=&#8658;ripple
-gremlin&gt; path.size()
-=&#8658;4
-gremlin&gt; path.objects()
-=&#8658;v[1]
-=&#8658;v[4]
-=&#8658;v[5]
-=&#8658;ripple
-gremlin&gt; path.labels()
-=&#8658;[a, b]
-=&#8658;[]
-=&#8658;[c]
-=&#8658;[d, e]
-gremlin&gt; path.a
-=&#8658;v[1]
-gremlin&gt; path.b
-=&#8658;v[1]
-gremlin&gt; path.c
-=&#8658;v[5]
-gremlin&gt; path.d == path.e
-=&#8658;true</p>
+<p>The <code>choose()</code>-step (<strong>branch</strong>) routes the current traverser to a particular traversal branch option. With <code>choose()</code>,
+it is possible to implement if/else-based semantics as well as more complicated selections.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-[[profile-step]]
-Profile Step
-~~~~~~~~~~~~
-
-The `profile()`-step (*sideEffect*) exists to allow developers to profile their traversals to determine statistical
-information like step runtime, counts, etc.
-
-WARNING: Profiling a Traversal will impede the Traversal's performance. This overhead is mostly excluded from the
-profile results, but durations are not exact. Thus, durations are best considered in relation to each other.
-
-[source,groovy]</pre>
+<pre class="CodeRay"><code class="groovy language-groovy">gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).
+               choose(values(<span class="string"><span class="delimiter">'</span><span class="content">age</span><span class="delimiter">'</span></span>).is(lte(<span class="integer">30</span>)),
+                 __.in(),
+                 __.out()).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(1)</b>
+==&gt;marko
+==&gt;ripple
+==&gt;lop
+==&gt;lop
+gremlin&gt; g.V().hasLabel(<span class="string"><span class="delimiter">'</span><span class="content">person</span><span class="delimiter">'</span></span>).
+               choose(values(<span class="string"><span class="delimiter">'</span><span class="content">age</span><span class="delimiter">'</span></span>)).
+                 option(<span class="integer">27</span>, __.in()).
+                 option(<span class="integer">32</span>, __.out()).values(<span class="string"><span class="delimiter">'</span><span class="content">name</span><span class="delimiter">'</span></span>) <span class="comment">//</span><b>(2)</b>
+==&gt;marko
+==&gt;ripple
+==&gt;lop</code></pre>
 </div>
 </div>
-<div class="paragraph">
-<p>gremlin&gt; g.V().out(<em>created</em>).repeat(both()).times(3).hasLabel(<em>person</em>).values(<em>age</em>).sum().profile().cap(TraversalMetrics.METRICS_KEY)
-=&#8658;Traversal Metrics
-Step                                                               Count  Traversers       Time (ms)    % Dur</p>
+<div class="colist arabic">
+<ol>
+<li>
+<p>If the traversal yields an element, then do <code>in</code>, else do <code>out</code> (i.e. true/false-based option selection).</p>
+</li>
+<li>
+<p>Use the result of the traversal as a key to the map of traversal options (i.e. value-based option selection).</p>
+</li>
+</ol>
 </div>
-<div class="exampleblock">
-<div class="content">
 <div class="paragraph">
-<p>TinkerGraphStep([],vertex)                                             6           6           0.148     7.98
-VertexStep(OUT,[created],vertex)                                       4           4           0.037     2.04
-RepeatStep([VertexStep(BOTH,vertex), ProfileSte&#8230;                    58          40           0.909    48.80
-  VertexStep(BOTH,vertex)                                             92          74           0.299
-  RepeatEndStep                                                       58          40           0.436
-HasStep([<sub>label.eq(person)])                                          48          30           0.219    11.79
-PropertiesStep([age],value)                                           48          30           0.140     7.54
-SumGlobalStep                                                          1           1           0.355    19.10
-SideEffectCapStep([</sub>metrics])                                          1           1           0.051     2.75
-                                            &gt;TOTAL                     -           -           1.863        -</p>
+<p>However, note that <code>choose()</code> can have an arbitrary number of options and moreover, can take an anonymous traversal as its choice function.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre>
-The `profile()`-step generates a `TraversalMetrics` sideEffect object that contains the following information:
-
-* `Step`: A step within the traversal being profiled.
-* `Count`: The number of _represented_ traversers that passed through the step.
-* `Traversers`: The number of traversers that passed through the step.
-* `Time (ms)`: The total time the step was actively executing its behavior.

[... 15833 lines stripped ...]


Mime
View raw message