You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/01/05 13:34:31 UTC

[1/3] tinkerpop git commit: Update TinkerGraph docs to include production use cases CTR

Repository: tinkerpop
Updated Branches:
  refs/heads/master e6d8df7e1 -> e00b4d24d


Update TinkerGraph docs to include production use cases CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e4c8e6a1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e4c8e6a1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e4c8e6a1

Branch: refs/heads/master
Commit: e4c8e6a18dc468cdc72e3ce08f953a89e1502687
Parents: df62481
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jan 5 08:27:38 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jan 5 08:27:38 2018 -0500

----------------------------------------------------------------------
 .../implementations-tinkergraph.asciidoc        | 42 ++++++++++++++++----
 1 file changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e4c8e6a1/docs/src/reference/implementations-tinkergraph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-tinkergraph.asciidoc b/docs/src/reference/implementations-tinkergraph.asciidoc
index 4ebafb0..775316a 100644
--- a/docs/src/reference/implementations-tinkergraph.asciidoc
+++ b/docs/src/reference/implementations-tinkergraph.asciidoc
@@ -29,16 +29,44 @@ limitations under the License.
 image:tinkerpop-character.png[width=100,float=left] TinkerGraph is a single machine, in-memory (with optional
 persistence), non-transactional graph engine that provides both OLTP and OLAP functionality. It is deployed with
 TinkerPop3 and serves as the reference implementation for other providers to study in order to understand the
-semantics of the various methods of the TinkerPop3 API. Constructing a simple graph in Java8 is presented below.
+semantics of the various methods of the TinkerPop3 API. Its status as a reference implementation does not however imply
+that it is not suitable for production. TinkerGraph has many practical use cases in production applications and their
+development. Some examples of TinkerGraph use cases include:
+
+* Ad-hoc analysis of large immutable graphs that fit in memory.
+* Extract subgraphs, from larger graphs that don't fit in memory, into TinkerGraph for further analysis or other
+purposes.
+* Use TinkerGraph as a sandbox to develop and debug complex traversals by simulating data from a larger graph inside
+a TinkerGraph.
+
+Constructing a simple graph using TinkerGraph in Java8 is presented below:
 
 [source,java]
-Graph g = TinkerGraph.open();
-Vertex marko = g.addVertex("name","marko","age",29);
-Vertex lop = g.addVertex("name","lop","lang","java");
-marko.addEdge("created",lop,"weight",0.6d);
+----
+Graph graph = TinkerGraph.open();
+GraphTraversalSource g = graph.traversal();
+Vertex marko = g.addV("person").property("name","marko").property("age",29).next();
+Vertex lop = g.addV("software").property("name","lop").property("lang","java").next();
+g.withSideEffect("l",lop).V(marko).addE("created").to('l').property("weight",0.6d).iterate();
+----
+
+The above Gremlin creates two vertices named "marko" and "lop" and connects them via a created-edge with a weight=0.6
+property. The addition of these two vertices and the edge between them could also be done in a single Gremlin statement
+as follows:
+
+[source,java]
+----
+g.addV("person").property("name","marko").property("age",29).as("m").
+  addV("software").property("name","lop").property("lang","java").as("l").
+  addE("created").from("m").to("l").property("weight",0.6d).iterate();
+----
+
+IMPORTANT: Pay attention to the fact that traversals end with `next()` or `iterate()`. These methods advance the
+objects in the traversal stream and without those methods, the traversal does nothing. Review the
+link:http://tinkerpop.apache.org/docs/x.y.z/tutorials/the-gremlin-console/#result-iteration[Result Iteration Section]
+of The Gremlin Console tutorial for more information.
 
-The above graph creates two vertices named "marko" and "lop" and connects them via a created-edge with a weight=0.6
-property. Next, the graph can be queried as such.
+Next, the graph can be queried as such.
 
 [source,java]
 g.V().has("name","marko").out("created").values("name")


[2/3] tinkerpop git commit: Merge branch 'tp32'

Posted by sp...@apache.org.
Merge branch 'tp32'


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ea14f093
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ea14f093
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ea14f093

Branch: refs/heads/master
Commit: ea14f09396a991ba40361e2ff4e31d2e7de5a0ce
Parents: e6d8df7 e4c8e6a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jan 5 08:28:22 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jan 5 08:28:22 2018 -0500

----------------------------------------------------------------------
 .../implementations-tinkergraph.asciidoc        | 42 ++++++++++++++++----
 1 file changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------



[3/3] tinkerpop git commit: Update TinkerGraph docs to include 3.3.x addE() usage CTR

Posted by sp...@apache.org.
Update TinkerGraph docs to include 3.3.x addE() usage CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e00b4d24
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e00b4d24
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e00b4d24

Branch: refs/heads/master
Commit: e00b4d24d9a2a60f1dd7b019b5d1504a26f3bd85
Parents: ea14f09
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jan 5 08:33:50 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jan 5 08:33:50 2018 -0500

----------------------------------------------------------------------
 docs/src/reference/implementations-tinkergraph.asciidoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e00b4d24/docs/src/reference/implementations-tinkergraph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/implementations-tinkergraph.asciidoc b/docs/src/reference/implementations-tinkergraph.asciidoc
index 775316a..b6b5bf4 100644
--- a/docs/src/reference/implementations-tinkergraph.asciidoc
+++ b/docs/src/reference/implementations-tinkergraph.asciidoc
@@ -47,7 +47,7 @@ Graph graph = TinkerGraph.open();
 GraphTraversalSource g = graph.traversal();
 Vertex marko = g.addV("person").property("name","marko").property("age",29).next();
 Vertex lop = g.addV("software").property("name","lop").property("lang","java").next();
-g.withSideEffect("l",lop).V(marko).addE("created").to('l').property("weight",0.6d).iterate();
+g.addE("created").from(marko).to(lop).property("weight",0.6d).iterate();
 ----
 
 The above Gremlin creates two vertices named "marko" and "lop" and connects them via a created-edge with a weight=0.6