You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/10/24 17:33:01 UTC

[18/50] tinkerpop git commit: TINKERPOP-1369 renamed REST to HTTP

TINKERPOP-1369 renamed REST to HTTP


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

Branch: refs/heads/TINKERPOP-1389
Commit: 43f10d53307cfc4ec3dcaad208e57f403624b67e
Parents: 1e8fd0f
Author: Robert Dale <ro...@gmail.com>
Authored: Sun Sep 4 10:56:46 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Oct 19 14:02:39 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc | 22 ++++++++++----------
 docs/src/reference/the-graph.asciidoc           |  4 ++--
 .../tutorials/getting-started/index.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   |  7 ++++++-
 .../gremlin/server/channel/HttpChannelizer.java |  2 +-
 .../handler/HttpBasicAuthenticationHandler.java |  2 +-
 .../handler/HttpGremlinEndpointHandler.java     |  2 +-
 8 files changed, 24 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0bc533f..2cc2cd3 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -184,6 +184,7 @@ This release also includes changes from <<release-3-1-4, 3.1.4>>.
 * Added color preferences
 * Added input, result prompt preferences
 * Added multi-line indicator in Gremlin Console
+* Replaced term `REST` with `HTTP` to remove any confusion as to the design of the API
 
 Bugs
 ^^^^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index c452a0f..5a0e397 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -764,17 +764,17 @@ The above code demonstrates using the `TitanIoRegistry` which is an `IoRegistry`
 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
+Connecting via HTTP
 ~~~~~~~~~~~~~~~~~~~
 
 image:gremlin-rexster.png[width=225,float=left] While the default behavior for Gremlin Server is to provide a
-WebSockets-based connection, it can also be configured to support link:http://en.wikipedia.org/wiki/Representational_state_transfer[REST].
-The REST endpoint provides for a communication protocol familiar to most developers, with a wide support of
-programming languages, tools and libraries for accessing it.  As a result, REST provides a fast way to get started
+WebSockets-based connection, it can also be configured to support plain HTTP web service.
+The HTTP endpoint provides for a communication protocol familiar to most developers, with a wide support of
+programming languages, tools and libraries for accessing it.  As a result, HTTP provides a fast way to get started
 with Gremlin Server.   It also may represent an easier upgrade path from link:http://rexster.tinkerpop.com/[Rexster]
 as the API for the endpoint is very similar to Rexster's link:https://github.com/tinkerpop/rexster/wiki/Gremlin-Extension[Gremlin Extension].
 
-Gremlin Server provides for a single REST endpoint - a Gremlin evaluator - which allows the submission of a Gremlin
+Gremlin Server provides for a single HTTP endpoint - a Gremlin evaluator - which allows the submission of a Gremlin
 script as a request.  For each request, it returns a response containing the serialized results of that script.
 To enable this endpoint, Gremlin Server needs to be configured with the `HttpChannelizer`, which replaces the default
 `WebSocketChannelizer`, in the configuration file:
@@ -841,7 +841,7 @@ curl -X POST -d "{\"gremlin\":\"100-x\", \"language\":\"gremlin-groovy\", \"bind
 By default this value is set to `gremlin-groovy`.  If using a `GET` operation, this value can be set as a query
 string argument with by setting the `language` key.
 
-WARNING: Consider the size of the result of a submitted script being returned from the REST endpoint.  A script
+WARNING: Consider the size of the result of a submitted script being returned from the HTTP endpoint.  A script
 that iterates thousands of results will serialize each of those in memory into a single JSON result set.  It is
 quite possible that such a script will generate `OutOfMemoryError` exceptions on the server.  Consider the default
 WebSockets configuration, which supports streaming, if that type of use case is required.
@@ -862,7 +862,7 @@ Connecting via withRemote
 image:remote-graph.png[width=145,float=left] A `TraversalSource` has several `withRemote()` methods which provide an
 interesting alternative to the other methods for connecting to Gremlin Server. It is interesting in that all other
 methods involve construction of a `String` representation of the `Traversal` which is then submitted as a script
-to Gremlin Server (via driver or REST). This approach is quite akin to SQL, where query strings are embedded into code
+to Gremlin Server (via driver or HTTP). This approach is quite akin to SQL, where query strings are embedded into code
 and submitted to a database server. While there are patterns for taking this approach that can lead to maintainable
 application code, using `withRemote()` could be a better method as it brings some good benefits with it:
 
@@ -1148,7 +1148,7 @@ If connecting with Gremlin Console, which utilizes `gremlin-driver` for remote s
 `conf/remote-secure.yaml` file when defining the remote.  That file contains configuration for the username and
 password as well as enablement of SSL from the client side.
 
-Similarly, Gremlin Server can be configured for REST and security.
+Similarly, Gremlin Server can be configured for HTTP and security.
 
 [source,text]
 ----
@@ -1668,7 +1668,7 @@ will simply have Gremlin Server close transactions on all graphs for every reque
 Considering State
 ^^^^^^^^^^^^^^^^^
 
-With REST and any sessionless requests, there is no variable state maintained between requests.  Therefore,
+With HTTP and any sessionless requests, there is no variable state maintained between requests.  Therefore,
 when <<connecting-via-console,connecting with the console>>, for example, it is not possible to create a variable in
 one command and then expect to access it in the next:
 
@@ -1683,7 +1683,7 @@ No such property: x for class: Script4
 Display stack trace? [yN] n
 ----
 
-The same behavior would be seen with REST or when using sessionless requests through one of the Gremlin Server drivers.
+The same behavior would be seen with HTTP or when using sessionless requests through one of the Gremlin Server drivers.
 If having this behavior is desireable, then <<sessions,consider sessions>>.
 
 There is an exception to this notion of state not existing between requests and that is globally defined functions.
@@ -1722,7 +1722,7 @@ $ curl -X POST -d "{\"gremlin\":\"divideIt(8, 2)\"}" "http://localhost:8182"
 {"message":"Error encountered evaluating script: divideIt(8, 2)"}
 ----
 
-In the above REST-based requests, the bindings contain a special parameter that tells the `ScriptEngine` cache to
+In the above HTTP-based requests, the bindings contain a special parameter that tells the `ScriptEngine` cache to
 immediately forget the script after execution. In this way, the function does not end up being globally available.
 
 [[gremlin-plugins]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index 42b1a76..e341304 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -187,7 +187,7 @@ modify the graph as required and call `graph.tx().commit()` to apply changes or
 When the next read or write action occurs against the graph, a new transaction will be started within that current
 thread of execution.
 
-When using transactions in this fashion, especially in web application (e.g. REST server), it is important to ensure
+When using transactions in this fashion, especially in web application (e.g. HTTP server), it is important to ensure
 that transactions do not leak from one request to the next.  In other words, unless a client is somehow bound via
 session to process every request on the same server thread, every request must be committed or rolled back at the end
 of the request.  By ensuring that the request encapsulates a transaction, it ensures that a future request processed
@@ -906,4 +906,4 @@ IMPORTANT: TinkerPop uses `tinkerpop.` and `gremlin.` as the prefixes for provid
 reduce implementations, and plugins.
 
 The only truly protected namespace is the _hidden namespace_ provided to graph systems. From there, it's up to
-engineers to respect the namespacing conventions presented.
\ No newline at end of file
+engineers to respect the namespacing conventions presented.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/getting-started/index.asciidoc b/docs/src/tutorials/getting-started/index.asciidoc
index 337061b..84fb036 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -528,7 +528,7 @@ Gremlin Server
 
 image:gremlin-server-protocol.png[width=325,float=right] link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-server[Gremlin Server]
 provides a way to remotely execute Gremlin scripts against one or more `Graph` instances hosted within it. It does
-this by exposing different endpoints, such as link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_rest[REST]
+this by exposing different endpoints, such as link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_http[HTTP]
 and link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_java[websockets], which allow a request
 containing a Gremlin script to be processed with results returned.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index d79c9db..8bcbd57 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -370,6 +370,11 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-1285[TINKERPOP-1037],
 link:http://tinkerpop.apache.org/docs/3.2.2/reference/#console-preferences[Reference Documentation -
 Console Preferences]
 
+REST API Renamed to HTTP API
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+This is only a rename to clarify the design of the API. There is no change to the API itself.
+
+
 Upgrading for Providers
 ~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -798,7 +803,7 @@ RemoteGraph
 `RemoteGraph` is a lightweight `Graph` implementation that acts as a proxy for sending traversals to Gremlin Server for
 remote execution. It is an interesting alternative to the other methods for connecting to Gremlin Server in that all
 other methods involved construction of a `String` representation of the `Traversal` which is then submitted as a script
-to Gremlin Server (via driver or REST).
+to Gremlin Server (via driver or HTTP).
 
 [source,groovy]
 ----

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
index 9e58a40..5c632e6 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Constructs a {@link Channelizer} that exposes an HTTP/REST endpoint in Gremlin Server.
+ * Constructs a {@link Channelizer} that exposes an HTTP endpoint in Gremlin Server.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpBasicAuthenticationHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpBasicAuthenticationHandler.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpBasicAuthenticationHandler.java
index 8732268..bf3b674 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpBasicAuthenticationHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpBasicAuthenticationHandler.java
@@ -38,7 +38,7 @@ import static org.apache.tinkerpop.gremlin.groovy.plugin.dsl.credential.Credenti
 import static org.apache.tinkerpop.gremlin.groovy.plugin.dsl.credential.CredentialGraphTokens.PROPERTY_USERNAME;
 
 /**
- * Implements basic HTTP authentication for use with the {@link HttpGremlinEndpointHandler} and REST based API calls.
+ * Implements basic HTTP authentication for use with the {@link HttpGremlinEndpointHandler} and HTTP based API calls.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43f10d53/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
index 899d488..ad11834 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
@@ -93,7 +93,7 @@ import static io.netty.handler.codec.http.HttpResponseStatus.OK;
 import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
 
 /**
- * Handler that processes HTTP requests to the REST Gremlin endpoint.
+ * Handler that processes HTTP requests to the HTTP Gremlin endpoint.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */