Monday 1 May 2023

Google Cloud Spanner

Google Cloud Spanner

Google Cloud Spanner is the first relational database service that is totally managed across the world. It can offer strong consistency and horizontal scalability for OLTP applications. This service lets you enjoy all the traditional advantages of a relational database. It is different from other relational database services because this one usually scales horizontally to a lot of servers for handling the pressure of substantial transactional workloads.

What is Google Cloud Spanner?

Google cloud spanner is actually a distributed relational database service. This service runs on Google Cloud and supports global online transaction processing deployments, SQL semantics, horizontal scaling & transactional consistency.

Interest in Google Cloud Spanner focuses on the cloud database's ability for providing availability as well as consistency. These are actually traits that are considered at odds with each other. Data designers create tradeoffs to emphasize both consistency and availability. We can describe the trade-off in the CAP Theorem. It remains underprinted as a casual move for availability and scalability in web and cloud systems. It also combines SQL & NoSQL traits to pursue system availability and data consistency.

Google Cloud Spanner's roots:

The first appearance of this service was as a key-value NoSQL store. But as time goes on, it has added a powerful typed schema and a SQL query processor. Google engineers have undertaken the work on the NoSQL processor core and SQL interface as part of the company's in-house F1 system to manage Google AdWords data. Google Cloud customers will be capable of accessing this in May 2017.

It is compatible with distributed SQL queries, and query re-starts in response to failures. This service uses TrueTime, a Google Cloud clock synchronization service using a mix of atomic clocks and GPS technology.

Other cloud databases:

It is an excellent alternative to cloud relational databases like Azure SQL, Amazon Aurora, IBM DB2 hosted, and Oracle Database Cloud Service. This one is also an excellent alternative to the commonly used open-source web and cloud application databases like MySQL and PostgreSQL.

As it can combine NoSQL and SQL traits, you can also classify this as a NewSQL database. It can support CrateDB, NuoDB, the in-memory database management system MemSQL, CockroachDB, etc. Due to the support of NoSQL and SQL approaches, this service is included in the multi-model database category. This one is an emerging type, including databases like Microsoft Azure Cosmos DB & MarkLogic.

Google Cloud Spanner pricing:

Its pricing depends on three infrastructure components:

  • Nodes 
  • Storage 
  • Networking

The pricing for nodes depends on hourly work and the number of nodes used within any given hour in a project. Besides, the pricing for storage is set on a per-month basis. It depends on the average data in the service's tables and secondary indexes during that month. Its pricing for network bandwidth is usually monthly based and depends on the amount used during that month.

Features:

It can store plenty of mutable structured data. Besides, it enables people to perform arbitrary queries with the help of SQL with relational data and maintain strong consistency as well as high availability for the data with synchronous replication.

Key features of Google Spanner:

  • Applying transactions across rows, columns, tables, and databases within a Spanner universe is possible. 
  • With the help of automatic multi-site replication and failover, you, as a client, can control the replication and data placement. 
  • Replication is consistent & synchronous. 
  • Reads are consistent, as well as data is versioned to permit for stale reads: clients will be able to read older versions of data. 
  • This database service can support a native SQL interface to read & write data.

History:

The service was described first in 2012 for internal Google data centers. In 2017, its SQL capability was included. Later, it was documented in a SIGMOD 2017 paper. That year it started to be available as part of the Google Cloud Platform in 2017 under "Cloud Spanner."

Google Spanner Architecture:

With the help of the Paxos algorithm as a work part, it partitions data across up to many servers. This service uses hardware-linked clock synchronization to make sure global consistency with the help of GPS clocks and atomic clocks. The brand name of the distributed cloud infrastructure of Google is TrueTime. DBMS of Google's F1 SQL is made on its top, which exchanges Google's custom MySQL variant.

Conclusion:

In this article, we have covered the details related to the Google Spanner database. Still if you have any doubt or queries, you can let us know via comments.

Frequently Asked Questions

Q. Is Google Spanner SQL or NoSQL?

It came first as a key-value NoSQL store.

Q. What is Google Spanner used for?

It is used to decouple computing from storage. Therefore, it becomes possible to scale processing resources separately from storage.

Q. Is Google Spanner free?

Its free trial is an addition to the $300 credits that the Google Cloud free trial provides.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.