/

hasura-header-illustration

Top PostgreSQL Flavours and Extensions that work with Hasura

PostgreSQL Flavours and Extensions
PostgreSQL Flavours and Extensions

PostgreSQL is open source and pretty extensible. It allows for products and utilities to be created on top providing the fundamental features of Postgres but offering something specialised on top of it.

In this post, we will look at the different flavours and extensions of Postgres that cater to specific use cases and how Hasura supports them natively.

TimescaleDB

TimescaleDB is a time series system optimised for time series data with relational capabilites of Postgres. It is an open source project with support for complex data types that aid in various use cases related to dates and times.

TimescaleDB can be set up as a postgres extension.

It supports massive ingestion rates and Postgres functions that make it easy to work with time series data.

Timescale supports partitioning across time and space (hash partitioning) attributes. It supports ACID properties by default.

Here's a talk by a Developer Advocate at Timescale - Visualizing TimescaleDB compression status in real-time with Hasura.

Read more about how to configure Timescale Cloud with Hasura Cloud.

YugaByte

YugaByte is a distributed, high performance SQL database (compatible with PostgreSQL) for global, internet scale applications.

Yugabtye is an open source project that serves PostgreSQL compatible APIs that can then be connected to Hasura via the connection string. It's a standalone service that you can run.

It supports partitioning by Hash and Range Sharding. Since it's a distributed database, we will look at the protocol being used. YugaByte's replication is based on Raft distributed consensus protocol and there are atleast 3 replicas running for high availability.

It supports distributed ACID properties with Serializable and Snapshot isolation. The data persistence characteristics is based on RocksDB.

Quoting YugaByte's blog:

YugabyteDB + Hasura: making it easier than ever to build highly available, massively scalable, geo-distributed applications

Read more about how to configure YugaByte Cloud with Hasura Cloud.

Aurora Postgres

Amazon Aurora is a Postgres compatible relational database service that has an increased throughput performance over vanilla Postgres version.

Though it is not open source, scaling on both compute and storage is the key reason why you might choose Aurora Postgres. The infra for database hosting is taken care automatically with higher performance and hence it's more of a fully managed Postgres solution.

It supports horizontal partitioning and is also ACID compliant.

But before deciding on whether Aurora is for you, do check this post - AWS Aurora: Is it for you?

If you are convinced, read more about how to configure Amazon RDS Aurora with Hasura Cloud.

ZomboDB

ZomboDB is a postgres extension that adds full text search capabilities. It's an open source project that has its use cases around search and analytics data with Postgres.

It is fully compatible with Postgres' query plan types. ZomboDB communicates with Elasticsearch via a RESTful interface. Indexing and syncing from elasticsearch happens in the background asynchronously.

This way, you can use the power and scale of Elasticsearch with PostgreSQL.

Read more about how to configure ZomboDB with Hasura Cloud.

PostGIS

PostGIS is an open-source project that adds support for spatial and geographic objects to the PostgreSQL object-relational database. This allows realtime location queries to be run in SQL.

PostGIS can be added as an extension to existing Postgres database. It supports utility functions such as distance, area, union, and intersection among other things. It is also ACID compliant.

You can build realtime apps by joining data across multiple data sources such as this one - Using GraphQL to join data across Google Places API and Postgres to build location based apps.

Read more about how to configure PostGIS with Hasura Cloud.

Citus

Citus is an open source postgres extension that transforms Postgres into a distributed database.

It supports partitioning by sharding and is ACID compliant.

Although Hasura doesn't fully support Citus yet, basic queries against a configured database should work. We are announcing full native support soon!

Track the github issue for Hasura support of Citus.


What are your favourite postgres flavours and extensions among the above? Do you have any other tool which you think should be supported by Hasura or deserves a mention here? Let us know in the comments below :)

Blog
29 Jun, 2021
Email
Subscribe to stay up-to-date on all things Hasura. One newsletter, once a month.
Loading...
v3-pattern
Accelerate development and data access with radically reduced complexity.