Instant data activation with Hasura on GCP: Cloud SQL, AlloyDB, BigQuery
In today's world, data is the backbone of any application, and handling it effectively is essential. With the emergence of cloud technologies, managing data has become even more comfortable and accessible. Google Cloud Platform (GCP) offers a suite of cloud-based services that can help developers build scalable and secure applications.
In this blog, we will explore how to use GCP Cloud SQL, AlloyDB, and BigQuery with Hasura GraphQL Engine to build an efficient and robust data management system.
Hasura GraphQL Engine
Hasura GraphQL Engine is an open source engine that enables developers to build GraphQL APIs quickly. It provides a fast and secure way to access data from multiple sources and combine them into a single endpoint. Hasura GraphQL Engine offers real-time subscriptions, queries, and mutations, making it an ideal choice for building modern applications.
Hasura automates 50-80% of your API dev work, instantly providing a production ready API backed by the following features:
- Instant CRUD APIs on your domain models
- GraphQL and REST
- Granular row- and column-based authorization
- API limits (rate, depth, node, timeout)
- Event triggers and subscriptions
- Input checking and validation
GCP Cloud SQL
GCP Cloud SQL is a fully managed relational database service that offers MySQL, PostgreSQL, and SQL Server databases. It provides automatic backups, replication, and failover, making it an ideal choice for building scalable and high-availability applications. With Cloud SQL, developers can easily create, manage, and scale relational databases in the cloud.
AlloyDB is a distributed SQL database that offers high performance and scalability. It provides a PostgreSQL-compatible interface and supports distributed transactions, making it an ideal choice for building cloud-native applications. With AlloyDB, developers can store and retrieve large amounts of data quickly and efficiently.
BigQuery is a fully managed, serverless data warehouse that offers fast and scalable analytics. It provides SQL-like queries and can handle petabyte-scale datasets, making it an ideal choice for building data-driven applications. With BigQuery, developers can easily store and analyze data in the cloud.
Using Hasura GraphQL Engine with GCP Cloud SQL, AlloyDB, and BigQuery
Hasura GraphQL Engine integrates with GCP Cloud SQL, AlloyDB, and BigQuery, enabling developers to build scalable and efficient data management systems. Here's how to get started:
- Create a project in GCP and enable the required APIs (Cloud SQL, AlloyDB, and BigQuery).
- Create a Cloud SQL instance or an AlloyDB cluster and create a database.
- Connect Hasura GraphQL Engine to Cloud SQL or AlloyDB using the Postgres database connector. Hasura GraphQL Engine can automatically generate GraphQL schemas from the database schema.
- Create tables and insert data into the database using SQL commands.
- Create a BigQuery dataset and table and load data from Cloud SQL or AlloyDB into BigQuery.
- Use Hasura GraphQL Engine to query data from Cloud SQL, AlloyDB, and BigQuery.
- Use Hasura GraphQL Engine subscriptions to receive real-time updates from Cloud SQL, AlloyDB, and BigQuery.
Step by step guide for connecting AlloyDB
Hasura Cloud Enterprise on Google Cloud Marketplace
Google Cloud customers can also now procure and pay for Hasura Cloud Enterprise via the Google Cloud Marketplace. Please contact your account manager or [email protected] for more details.
By using Hasura GraphQL Engine with GCP Cloud SQL, AlloyDB, and BigQuery, developers can easily build scalable and efficient data management systems. With the combination of these powerful tools, developers are empowered to create high-performance and reliable applications that handle large amounts of data with ease.
Exploring faster reads with Google AlloyDB PostgreSQL and Hasura GraphQL API
Ready to get started for free with Hasura Cloud? In just a few clicks and no credit card required, create or connect your own database today.