tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject tinkerpop git commit: Improved documentation for RemoteConnection development CTR
Date Mon, 14 Nov 2016 13:03:17 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 fa9f898c2 -> 97375061d


Improved documentation for RemoteConnection development CTR


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

Branch: refs/heads/tp32
Commit: 97375061d1278519363d6aeda1aa00abbd628774
Parents: fa9f898
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Nov 14 08:02:34 2016 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Nov 14 08:02:34 2016 -0500

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc | 33 +++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97375061/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 4322084..8760d01 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -418,19 +418,36 @@ classes being serialized.
 RemoteConnection Implementations
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-A `RemoteConnection` is an interface that is important for usage with
-link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connecting-via-remotegraph[RemoteGraph].
A `RemoteGraph` takes
-a `RemoteConnection` implementation and submits constructed traversals to it for processing
through a single method:
+A `RemoteConnection` is an interface that is important for usage on traversal sources configured
using the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#connecting-via-remotegraph[withRemote()]
option. A `Traversal`
+that is generated from that source will apply a `RemoteStrategy` which will inject a `RemoteStep`
to its end. That
+step will then send the `Bytecode` of the `Traversal` over the `RemoteConnection` to get
the results that it will
+iterate.
+
+There is one method to implement on `RemoteConnection`:
 
 [source,java]
-public Iterator<Traverser> submit(final Traversal t) throws RemoteConnectionException;
+public <E> RemoteTraversal<?,E> submit(final Bytecode bytecode) throws RemoteConnectionException;
+
+Note that it returns a `RemoteTraversal`. This interface should also be implemented and in
most cases implementers can
+simply extend the `AbstractRemoteTraversal`, which provides default implementations for all
the `Traversal` methods
+except for the important one `getSideEffects()`.
+
+[source,java]
+public RemoteTraversalSideEffects getSideEffects();
+
+This method has been overriden from `Traversal` to return `RemoteTraversalSideEffects` and
this interface allows a user
+to do a retrieval of any side-effects produced by the `Traversal`. The assumption, of course,
is that the
+`RemoteConnection` is communicating with a server that supports side-effect retreival (as
Gremlin Server does).
 
-TinkerPop provides the `DriverRemoteConnection` as a useful and example implementation. `DriverRemoteConnection`
-serializes the `Traversal` and then submits it for remote processing on Gremlin Server. Gremlin
Server rebinds the
-`Traversal` to a configured `Graph` instance and then iterates the results back as it would
normally do.
+TinkerPop provides the `DriverRemoteConnection` as a useful and
+link:https://github.com/apache/tinkerpop/blob/x.y.z/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote[example
implementation].
+`DriverRemoteConnection` serializes the `Traversal` and then submits it for remote processing
on Gremlin Server.
+Gremlin Server rebinds the `Traversal` to a configured `Graph` instance and then iterates
the results back as it would
+normally do.
 
 Implementing `RemoteConnection` is not something routinely done for those implementing `gremlin-core`.
It is only
-something required if there is a need to exploit `RemoteGraph` in some way. If a graph provider
has a "graph server"
+something required if there is a need to exploit `withRemote()` in some way. If a graph provider
has a "graph server"
 similar to Gremlin Server that can accept a serialized `Traversal` instance, then that would
be one example of a
 reason to implement this interface.
 


Mime
View raw message