TimescaleDB is an open-source time-series database that supports full SQL and is deployed across various industries for powering applications in DevOps, IoT, SaaS, and Machine Learning. It can be packaged as a Postgres extension. Hasura GraphQL engine provides instant GraphQL APIs on any Postgres database, including TimescaleDB.
In this guide, we will set up TimescaleDB with Hasura GraphQL on a Digital Ocean VM. Key points include:
1. Creating a Digital Ocean droplet and installing Docker and docker-compose.
2. Running TimescaleDB with Hasura using docker-compose.
3. Understanding hypertables, which are an abstraction over standard SQL tables for efficient management and querying of time-series data in TimescaleDB.
4. Using GraphQL queries on hypertables and subscriptions to get real-time data.
5. Setting up the TimescaleDB extension using psql.
6. Creating a view, tracking it, and making GraphQL queries on the view.
7. Real-time data with TimescaleDB & Hasura GraphQL through Python script and subscriptions.