Skip to content

Commit 34a8b3c

Browse files
authored
Merge pull request #111579 from SnehaGunda/breadcrumb
Updating GraphSON wire format details
2 parents 9f1e960 + 01bf6be commit 34a8b3c

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

articles/cosmos-db/create-graph-gremlin-console.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.author: lbosq
1919
> * [PHP](create-graph-php.md)
2020
>
2121
22-
Azure Cosmos DB is Microsofts globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
22+
Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB.
2323

2424
This quickstart demonstrates how to create an Azure Cosmos DB [Gremlin API](graph-introduction.md) account, database, and graph (container) using the Azure portal and then use the [Gremlin Console](https://tinkerpop.apache.org/docs/current/reference/#gremlin-console) from [Apache TinkerPop](https://tinkerpop.apache.org) to work with Gremlin API data. In this tutorial, you create and query vertices and edges, updating a vertex property, query vertices, traverse the graph, and drop a vertex.
2525

@@ -44,6 +44,7 @@ You also need to install the [Gremlin Console](https://tinkerpop.apache.org/down
4444
[!INCLUDE [cosmos-db-create-graph](../../includes/cosmos-db-create-graph.md)]
4545

4646
## <a id="ConnectAppService"></a>Connect to your app service/Graph
47+
4748
1. Before starting the Gremlin Console, create or modify the remote-secure.yaml configuration file in the `apache-tinkerpop-gremlin-console-3.2.5/conf` directory.
4849
2. Fill in your *host*, *port*, *username*, *password*, *connectionPool*, and *serializer* configurations as defined in the following table:
4950

articles/cosmos-db/faq.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Azure Cosmos DB has a schema agnostic indexing engine capable of automatically i
2828

2929
### Can I use multiple APIs to access my data?
3030

31-
Azure Cosmos DB is Microsoft's globally distributed, multi-model database service. Where multi-model means Azure Cosmos DB supports multiple APIs and multiple data models, different APIs use different data formats for storage and wire protocol. For example, SQL uses JSON, MongoDB uses BSON, Table uses EDM, Cassandra uses CQL, Gremlin uses GraphSON. As a result, we recommend using the same API for all access to the data in a given account.
31+
Azure Cosmos DB is Microsoft's globally distributed, multi-model database service. Where multi-model means Azure Cosmos DB supports multiple APIs and multiple data models, different APIs use different data formats for storage and wire protocol. For example, SQL uses JSON, MongoDB uses BSON, Table uses EDM, Cassandra uses CQL, Gremlin uses JSON format. As a result, we recommend using the same API for all access to the data in a given account.
3232

3333
Each API operates independently, except the Gremlin and SQL API, which are interoperable.
3434

@@ -228,7 +228,7 @@ Along with the common MongoDB error codes, the Azure Cosmos DB's API for MongoDB
228228

229229
### Is the Simba driver for MongoDB supported for use with Azure Cosmos DB's API for MongoDB?
230230

231-
Yes, you can use Simbas Mongo ODBC driver with Azure Cosmos DB's API for MongoDB
231+
Yes, you can use Simba's Mongo ODBC driver with Azure Cosmos DB's API for MongoDB
232232

233233
## <a id="table"></a>Table API
234234

@@ -517,21 +517,21 @@ All graph objects, vertices, and edges, are shown as JSON documents in the backe
517517

518518
The RU charge is based on the working data set of the traversal, and not the result set. For example, if a query aims to obtain a single vertex as a result but needs to traverse more than one other object on the way, then the cost will be based on all the graph objects that it will take to compute the one result vertex.
519519

520-
### Whats the maximum scale that a graph database can have in Azure Cosmos DB Gremlin API?
520+
### What's the maximum scale that a graph database can have in Azure Cosmos DB Gremlin API?
521521

522522
Azure Cosmos DB makes use of [horizontal partitioning](partition-data.md) to automatically address increase in storage and throughput requirements. The maximum throughput and storage capacity of a workload is determined by the number of partitions that are associated with a given container. However, a Gremlin API container has a specific set of guidelines to ensure a proper performance experience at scale. For more information about partitioning, and best practices, see [partitioning in Azure Cosmos DB](partition-data.md) article.
523523

524524
### How can I protect against injection attacks using Gremlin drivers?
525525

526526
Most native Apache Tinkerpop Gremlin drivers allow the option to provide a dictionary of parameters for query execution. This is an example of how to do it in [Gremlin.Net](https://tinkerpop.apache.org/docs/3.2.7/reference/#gremlin-DotNet) and in [Gremlin-Javascript](https://github.com/Azure-Samples/azure-cosmos-db-graph-nodejs-getting-started/blob/master/app.js).
527527

528-
### Why am I getting the Gremlin Query Compilation Error: Unable to find any method error?
528+
### Why am I getting the "Gremlin Query Compilation Error: Unable to find any method" error?
529529

530530
Azure Cosmos DB Gremlin API implements a subset of the functionality defined in the Gremlin surface area. For supported steps and more information, see [Gremlin support](gremlin-support.md) article.
531531

532532
The best workaround is to rewrite the required Gremlin steps with the supported functionality, since all essential Gremlin steps are supported by Azure Cosmos DB.
533533

534-
### Why am I getting the WebSocketException: The server returned status code '200' when status code '101' was expected error?
534+
### Why am I getting the "WebSocketException: The server returned status code '200' when status code '101' was expected" error?
535535

536536
This error is likely thrown when the wrong endpoint is being used. The endpoint that generates this error has the following pattern:
537537

@@ -541,7 +541,7 @@ This is the documents endpoint for your graph database. The correct endpoint to
541541

542542
`https://YOUR_DATABASE_ACCOUNT.gremlin.cosmosdb.azure.com:443/`
543543

544-
### Why am I getting the RequestRateIsTooLarge error?
544+
### Why am I getting the "RequestRateIsTooLarge" error?
545545

546546
This error means that the allocated Request Units per second aren't enough to serve the query. This error is usually seen when you run a query that obtains all vertices:
547547

@@ -556,7 +556,7 @@ This query will attempt to retrieve all vertices from the graph. So, the cost of
556556

557557
A Gremlin connection is made through a WebSocket connection. Although WebSocket connections don't have a specific time to live, Azure Cosmos DB Gremlin API will terminate idle connections after 30 minutes of inactivity.
558558

559-
### Why cant I use fluent API calls in the native Gremlin drivers?
559+
### Why can't I use fluent API calls in the native Gremlin drivers?
560560

561561
Fluent API calls aren't yet supported by the Azure Cosmos DB Gremlin API. Fluent API calls require an internal formatting feature known as bytecode support that currently isn't supported by Azure Cosmos DB Gremlin API. Due to the same reason, the latest Gremlin-JavaScript driver is also currently not supported.
562562

articles/cosmos-db/gremlin-compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Azure Cosmos DB Graph engine closely follows [Apache TinkerPop](https://tinkerpo
3030

3131
* ***Non-primitive JSON types*** aren't supported. Use `string`, `number`, or `true`/`false` types. `null` values aren't supported.
3232

33-
* ***GraphSONv3*** serializer isn't currently supported. Use `GraphSONv2` Serializer, Reader, and Writer classes in the connection configuration.
33+
* ***GraphSONv3*** serializer isn't currently supported. Use `GraphSONv2` Serializer, Reader, and Writer classes in the connection configuration. The results returned by the Azure Cosmos DB Gremlin API don't have the same format as the GraphSON format.
3434

3535
* **Lambda expressions and functions** aren't currently supported. This includes the `.map{<expression>}`, the `.by{<expression>}`, and the `.filter{<expression>}` functions. To learn more, and to learn how to rewrite them using Gremlin steps, see [A Note on Lambdas](http://tinkerpop.apache.org/docs/current/reference/#a-note-on-lambdas).
3636

articles/cosmos-db/gremlin-support.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ The following table lists the TinkerPop features that are implemented by Azure C
4141
| Edge features | AddEdges, RemoveEdges, StringIds, UserSuppliedIds, AddProperty, RemoveProperty | Supports creating, modifying, and deleting edges |
4242
| Edge property features | Properties, BooleanValues, ByteValues, DoubleValues, FloatValues, IntegerValues, LongValues, StringValues | Supports creating, modifying, and deleting edge properties |
4343

44-
## Gremlin wire format: GraphSON
44+
## Gremlin wire format
4545

46-
Azure Cosmos DB uses the [GraphSON format](https://tinkerpop.apache.org/docs/current/reference/#graphson) when returning results from Gremlin operations. Azure Cosmos DB currently supports "GraphSONv2" version. GraphSON is the Gremlin standard format for representing vertices, edges, and properties (single and multi-valued properties) using JSON.
47-
48-
For example, the following snippet shows a GraphSON representation of a vertex *returned to the client* from Azure Cosmos DB.
46+
Azure Cosmos DB uses the JSON format when returning results from Gremlin operations. Azure Cosmos DB currently supports the JSON format. For example, the following snippet shows a JSON representation of a vertex *returned to the client* from Azure Cosmos DB:
4947

5048
```json
5149
{
@@ -84,7 +82,7 @@ For example, the following snippet shows a GraphSON representation of a vertex *
8482
}
8583
```
8684

87-
The properties used by GraphSON for vertices are described below:
85+
The properties used by the JSON format for vertices are described below:
8886

8987
| Property | Description |
9088
| --- | --- | --- |

0 commit comments

Comments
 (0)