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 2015/06/19 23:18:21 UTC

[1/2] incubator-tinkerpop git commit: Update docs around serializers in gremlin driver.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 9439e75c7 -> 9181992fb


Update docs around serializers in gremlin driver.


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

Branch: refs/heads/master
Commit: 19f6a7a4e2f8db5ae52a896a6d9ef3efcdc33e8b
Parents: fa96db3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jun 19 17:17:47 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jun 19 17:17:47 2015 -0400

----------------------------------------------------------------------
 docs/src/gremlin-applications.asciidoc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/19f6a7a4/docs/src/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/gremlin-applications.asciidoc b/docs/src/gremlin-applications.asciidoc
index 54892cd..51b00d2 100644
--- a/docs/src/gremlin-applications.asciidoc
+++ b/docs/src/gremlin-applications.asciidoc
@@ -350,6 +350,9 @@ client.submit("[1,2,3,x]", params); <5>
 <4> Submit a script asynchronously without waiting for the request to be written to the server.
 <5> Parameterized request are considered the most efficient way to send Gremlin to the server as they can be cached, which will boost performance and reduce resources required on the server.
 
+Rebinding
+^^^^^^^^^
+
 Scripts submitted to Gremlin Server automatically have the globally configured `Graph` and `TraversalSource` instances made available to them.  Therefore, if Gremlin Server configures two `TraversalSource` instances called "g1" and "g2" a script can simply reference them directly as:
 
 [source,java]
@@ -366,6 +369,21 @@ g2Client.submit("g.V()")
 
 The above code demonstrates how the `rebind` method can be used such that the script need only contain a reference to "g" and "g1" and "g2" are automatically rebound into "g" on the server-side.
 
+Serialization
+^^^^^^^^^^^^^
+
+When using Gryo serialization (the default serializer for the driver), it is important that the client and server have the same serializers configured or else one or the other will experience serialization exceptions and fail to always communicate.  Discrepancy in serializer registration between client and server can happen fairly easily as graphs will automatically include serializers on the server-side, thus leaving the client to be configured manually.  This can be done manually as follows:
+
+[source,java]
+GryoMapper kryo = GryoMapper.build().addRegistry(TitanIoRegistry.INSTANCE).create();
+MessageSerializer serializer = new GryoMessageSerializerV1d0(kryo);
+Cluster cluster = Cluster.build()
+                .serializer(serializer)
+                .create();
+Client client = cluster.connect().init();
+
+The above code demonstrates using the `TitanIoRegistry` which is an `IoRegistry` instance.  It tells the serializer what classes (from Titan in this case) to auto-register during serialization.  Gremlin Server roughly uses this same approach when it configures it's serializers, so using this same model will ensure compatibility when making requests.
+
 Connecting via REST
 ~~~~~~~~~~~~~~~~~~~
 


[2/2] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/master'

Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/master'


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

Branch: refs/heads/master
Commit: 9181992fb8c1a654822fddd9f784028fc9fc4be3
Parents: 19f6a7a 9439e75
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jun 19 17:18:12 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Jun 19 17:18:12 2015 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  5 +-
 .../traversal/dsl/graph/GraphTraversal.java     | 12 ++--
 .../gremlin/process/traversal/dsl/graph/__.java |  8 +--
 .../gremlin/process/traversal/step/Scoping.java | 11 ++-
 .../traversal/step/filter/WhereStep.java        | 22 ++++--
 .../process/traversal/step/map/MatchStep.java   |  2 +-
 .../strategy/finalization/ScopingStrategy.java  |  2 +-
 .../ComputerVerificationStrategy.java           |  6 ++
 .../MatchPredicateStrategyTest.java             | 25 +++----
 .../traversal/step/map/GroovySelectTest.groovy  | 14 ++--
 .../traversal/step/filter/WhereTest.java        | 18 +++--
 .../process/traversal/step/map/SelectTest.java  | 70 +++++++++++---------
 12 files changed, 117 insertions(+), 78 deletions(-)
----------------------------------------------------------------------