Book a Demo Free Trial

Gremlin API Management using Cerebrata

Ranjith Eswaran

Aug 27, 2021

Category: Azure Cosmos DB

Introduction

In this blog we will discuss on effectively managing Cosmos DB Gremlin API using Cerebrata. Azure Cosmos DB provides a graph database service via the Gremlin API on a fully managed database service designed for any scale. You can query the graphs with millisecond latency and evolve the graph structure easily. Azure Cosmos DB’s Gremlin API is built based on the Apache TinkerPop, a graph computing framework. The Gremlin API in Azure Cosmos DB uses the Gremlin query language. Gremlin API can be used to serve use cases like Internet Of Things, Geospatial applications, Social networks/ Customer 365 and Recommendation engines.

Database Management

Cerebrata allows us to create databases in Gremlin API with the required throughput configuration. The throughput can be either fixed or it can autoscale. In case of Autoscale, we can specify the Maximum throughput and the increment percent so that the throughput is increased and decreased based on the load within the maximum throughput limit.

It is also possible to view the Gremlin database properties and the throughput of the already created database

Container Management

We can create a Container in a Gremlin database with the partition key path and the required throughput mode. We can also specify the container supports Large sized partition key. We can also provide the required indexing policy for the container and unique key policy. It is also possible to provide the Default Time To Live configuration for the documents. It is possible to specify the TTL for documents either at the container level or at the individual document level.

It is also possible to view the throughput and TTL configuration of the container using Cerebrata. It s possible to create the indexing policy for the Gremlin container through an user friendly Graphical interface rather than through the JSON configuration in Azure portal.

Support for Serverless accounts

Cerebrata also supports creation and management of databases and containers within Cosmos DB accounts with Serverless capacity mode.  There is no need to specify the throughput type and throughput values while creating the databases and containers within the Serverless accounts.

Graph Management

Cerebrata allows us to create vertices and edges in the graph using a cool user interface. It is possible to specify the id, label, partition key and the required properties while creating a vertex.

We can also create edges between the created vertices using Cerebrata. Like the vertices it is also possible to configure the edge label and the required properties for the edges.

It is also possible to create an edge with the same vertex as source and destination which is called as self loop.

Cerebrata allows us to visualize the graph container as a graph with vertices connected through the respective edges between them.

Query Management

Cerebrata allows us to provide multiple queries at a go separated by semicolon which is not possible in Azure portal. For example: we can execute the following query in Cerebrata which is not possible in Azure portal. g.V();g.E();

Raw response

In addition to the graphical representation of the query result in a Gremlin container, we can also view the result in JSON format in the Raw Data tab. This will hold all the edges and vertices that match the provided query along with their properties. We can also view the request charge and server time in the Response Headers tab.

Customize Graph

The graph shown in Cerebrata is completely customizable. You can define the shape of the nodes or vertices, colour, shape and the default label that has to be shown on the vertex.

It is also possible to customize the edges in a graph. The properties that can be customized are edge thickness, colour and the display label.

It is also possible to customize the edges in a graph. The properties that can be customized are edge thickness, colour and the display label.

Saved Queries

Cerebrata helps us in managing the queries that we execute within a Gremlin API container. We can save multiple queries for a single container. We can also set a query as a Default query, so that the Query gets opened by default when we open the Gremlin API container.

It is also possible to export the queries from a container and import it in another container which makes our tasks easier.

We can also edit and delete the queries at any point in time.

Conclusion

In this blog, we saw how easy it is to manage your Azure Cosmos DB Gremlin API using Cerebrata.

Cerebrata enables you to manage your Azure Cosmos DB accounts (SQL API Table API), Service Bus Namespaces, Cognitive Search Service accounts, Redis Cache accounts, and much more. It is also cross-platform so that you can manage your Azure resources from a platform of your choice – Windows, Mac, or Linux.

If you wish to experience Cerebreta, try our 15 days free trial.

If you’re looking for more Azure resources, Read about Secure Azure Functions Using API Management