You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/cassandra-faq.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ ms.topic: conceptual
7
7
ms.date: 04/09/2020
8
8
ms.author: thvankra
9
9
---
10
-
# Frequently asked questions about the Cassandra API for Azure Cosmos DB
10
+
# Frequently asked questions about the Cassandra API in Azure Cosmos DB
11
+
12
+
This article describes the functionality differences between Apache Cassandra and Cassandra API in Azure Cosmos DB. It also provides answers to frequently asked questions about the Cassandra API in Azure Cosmos DB.
11
13
12
14
## Key differences between Apache Cassandra and the Cassandra API
Copy file name to clipboardExpand all lines: articles/cosmos-db/gremlin-api-faq.md
+56-54Lines changed: 56 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,60 +12,7 @@ ms.author: sngun
12
12
13
13
This article explains answers to some frequently asked questions about Gremlin API in Azure Cosmos DB.
14
14
15
-
### How are RU/s charged when running queries on a graph database?
16
-
17
-
All graph objects, vertices, and edges, are shown as JSON documents in the backend. Since one Gremlin query can modify one or many graph objects at a time, the cost associated with it is directly related to the objects, edges that are processed by the query. This is the same process that Azure Cosmos DB uses for all other APIs. For more information, see [Request Units in Azure Cosmos DB](request-units.md).
18
-
19
-
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.
20
-
21
-
### What's the maximum scale that a graph database can have in Azure Cosmos DB Gremlin API?
22
-
23
-
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.
24
-
25
-
### For C#/.NET development, should I use the Microsoft.Azure.Graphs package or Gremlin.NET?
26
-
27
-
Azure Cosmos DB Gremlin API leverages the open-source drivers as the main connectors for the service. So the recommended option is to use [drivers that are supported by Apache Tinkerpop](https://tinkerpop.apache.org/).
28
-
29
-
### How can I protect against injection attacks using Gremlin drivers?
30
-
31
-
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).
32
-
33
-
### Why am I getting the "Gremlin Query Compilation Error: Unable to find any method" error?
34
-
35
-
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.
36
-
37
-
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.
38
-
39
-
### Why am I getting the "WebSocketException: The server returned status code '200' when status code '101' was expected" error?
40
-
41
-
This error is likely thrown when the wrong endpoint is being used. The endpoint that generates this error has the following pattern:
### Why am I getting the "RequestRateIsTooLarge" error?
50
-
51
-
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:
52
-
53
-
```
54
-
// Query example:
55
-
g.V()
56
-
```
57
-
58
-
This query will attempt to retrieve all vertices from the graph. So, the cost of this query will be equal to at least the number of vertices in terms of RUs. The RU/s setting should be adjusted to address this query.
59
-
60
-
### Why do my Gremlin driver connections get dropped eventually?
61
-
62
-
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.
63
-
64
-
### Why can't I use fluent API calls in the native Gremlin drivers?
65
-
66
-
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.
67
-
68
-
## Evaluate the efficiency of Gremlin queries
15
+
## How to evaluate the efficiency of Gremlin queries?
69
16
70
17
The **executionProfile()** preview step can be used to provide an analysis of the query execution plan. This step needs to be added to the end of any Gremlin query as illustrated by the following example:
The output of the above profile shows how much time is spent obtaining the vertex objects, the edge objects, and the size of the working data set. This is related to the standard cost measurements for Azure Cosmos DB queries.
139
86
87
+
## Other frequently asked questions
88
+
89
+
### How are RU/s charged when running queries on a graph database?
90
+
91
+
All graph objects, vertices, and edges, are shown as JSON documents in the backend. Since one Gremlin query can modify one or many graph objects at a time, the cost associated with it is directly related to the objects, edges that are processed by the query. This is the same process that Azure Cosmos DB uses for all other APIs. For more information, see [Request Units in Azure Cosmos DB](request-units.md).
92
+
93
+
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.
94
+
95
+
### What's the maximum scale that a graph database can have in Azure Cosmos DB Gremlin API?
96
+
97
+
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.
98
+
99
+
### For C#/.NET development, should I use the Microsoft.Azure.Graphs package or Gremlin.NET?
100
+
101
+
Azure Cosmos DB Gremlin API leverages the open-source drivers as the main connectors for the service. So the recommended option is to use [drivers that are supported by Apache Tinkerpop](https://tinkerpop.apache.org/).
102
+
103
+
### How can I protect against injection attacks using Gremlin drivers?
104
+
105
+
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).
106
+
107
+
### Why am I getting the "Gremlin Query Compilation Error: Unable to find any method" error?
108
+
109
+
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.
110
+
111
+
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.
112
+
113
+
### Why am I getting the "WebSocketException: The server returned status code '200' when status code '101' was expected" error?
114
+
115
+
This error is likely thrown when the wrong endpoint is being used. The endpoint that generates this error has the following pattern:
### Why am I getting the "RequestRateIsTooLarge" error?
124
+
125
+
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:
126
+
127
+
```
128
+
// Query example:
129
+
g.V()
130
+
```
131
+
132
+
This query will attempt to retrieve all vertices from the graph. So, the cost of this query will be equal to at least the number of vertices in terms of RUs. The RU/s setting should be adjusted to address this query.
133
+
134
+
### Why do my Gremlin driver connections get dropped eventually?
135
+
136
+
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.
137
+
138
+
### Why can't I use fluent API calls in the native Gremlin drivers?
139
+
140
+
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.
141
+
140
142
## Next steps
141
143
142
144
*[Azure Cosmos DB Gremlin wire protocol support](gremlin-support.md)
0 commit comments