DEV Community

Hasura for Hasura

Posted on • Originally published at hasura.io on

Introducing Instant GraphQL for CockroachDB

Introducing Instant GraphQL for CockroachDB

We are pleased to announce the beta release for CockroachDB on Hasura in v2.15.0, which will be available in the open source and cloud free versions of Hasura. Together, Hasura and CockroachDB drastically reduce the time and effort required to build or migrate to a high availability distributed database architecture that is leveraged using an enterprise grade data access layer that includes GraphQL & REST APIs, Declarative Role Based Authorization, Advanced Security and Performance with rate limiting, allow lists, and caching. The combined solution of our platforms cut what could be years of experimentation and development down to weeks.

What is CockroachDB?

CockroachDB is a distributed SQL database built using a strongly-consistent key-value store. It scales horizontally; survives hardware failures with minimal disruption or manual intervention; supports strongly-consistent ACID transactions; and supports the PostgreSQL wire protocol and the majority of PostgreSQL syntax.

When is CockroachDB a good choice?

CockroachDB is a good choice for applications that require high availability and reliability across multiple regions. Many of the traditional drawbacks associated with distributed databases such as complexity that increases operational overhead are addressed with simple configurations that allow users to automatically replicate, rebalance, and recover from failures. The ability to scale up and down makes CockroachDB a cost effective solution for a wide range of operational requirements.

Why Hasura?

Hasura’s intuitive tools and documentation make it easy to set up and connect to CockroachDB, instantly generating GraphQL schemas and resolvers based on the tables and views in the database. With little to no effort organizations use Hasura to create a powerful data access layer that includes GraphQL & REST APIs, declarative role-based authorization, advanced security and performance with rate limiting, allow lists, and caching with little to no effort.

Auto-Generated GraphQL Schemas and Resolvers

Hasura’s ability to instantly generate GraphQL schemas and resolvers based on the tables and views in CockroachDB saves time spent on development and continued maintenance because developers no longer have to author more data access APIs or modify the code every time there is a database change. Hasura provides “GraphQL out of the box” with its ability to auto-generate GraphQL schemas and resolvers from CockroachDB, saving months of development time - especially in the early stages of greenfield projects or migrations when changes to features and the underlying database happened frequently. Many organizations use Hasura for nearly all queries and updates for hundreds of database tables.

Ref: https://hasura.io/case-studies/pulley/

Security, Authorization & Auditing

Hasura’s granular authorization features can be applied down to the row and column level to address a wide range of data authorization use cases and Hasura’s built-in auditing capabilities can be used to track changes in user permissions, providing a history of changes.

A mature and hardened data authorization layer is essential to protecting sensitive financial and personal data. To ensure the security of the system, Hasura regularly performs penetration testing to make sure Hasura is hardened from external attack.

Data Migrations

Hasura’s migrations features track CockroachDB database schema changes in metadata, allowing users to keep their database consistent between development and production.

Management Console

Hasura’s console also increased the developer’s productivity by making it easy to perform GraphQL schema generation tasks, perform GraphQL queries, and perform traces to identify any performance bottlenecks.

Before

Introducing Instant GraphQL for CockroachDB

Introducing Instant GraphQL for CockroachDB

With Hasura

Introducing Instant GraphQL for CockroachDB

Introducing Instant GraphQL for CockroachDB

Why Hasura and CockroachDB?

Together, Hasura and CockroachDB drastically reduce the time and effort required to build or migrate to a high availability distributed database architecture that is leveraged using an enterprise grade data access layer that includes GraphQL & REST APIs, Declarative Role Based Authorization, Advanced Security and Performance with rate limiting, allow lists, and caching. The combined solution of our platforms cut what could be years of experimentation and development down to weeks. Providing our solutions as a service allows organizations, both big and small, to treat their data as mission critical to their business ensuring data is reliable, available, correct, with response times measured in milliseconds, regardless of scale 100% of the time.

What is next?

Hasura will add support for Subscriptions in an upcoming release. Hasura support for the CockroachDB managed services will be available following the GA release of CockroachDB version 22.2.

Try it out

You can follow the instructions found in the documentation here to try Hasura's beta support for CockroachDB using docker today.

Top comments (0)