Google F1

F1 is a relational distributed transactional database. And it's built on Google's Spanner so that it can reach strong consistency. It combines RDBMS features and NoSQL's(like BigTable) scalability. And it maintains ACID and provides a distributed scalable database system.

History

Google Research published at SIGMOD, 2012 and then published a paper about it at VLDB, 2013. Google used to use Sharded MySQL for their Ads system. But it had bad performance on availability, scalability and functionality. So Google decided to build a new database on Spanner to keep all RDBMS features but with scalability.

Concurrency Control

Timestamp Ordering

The Spanner provides a global timestamp order for the transactions to use. Thus F1 can use timestamp to achieve concurrency control. F1 actually gets three kinds of transaction control methods:

  1. Snapshot transactions: which are read-only transactions and will read repeatable data using Spanner snapshot from some timestamp.
  2. Pessimistic transactions: which directly use Spanner's transaction and will require F1 server to acquire and hold locks.
  3. Optimistic transactions: which are like a OCC way that would do a confirmation in the final write phase and abort if found something updated. This kind of transactions would never acquire Spanner locks. And F1 would use a column of lock to represent locks of different granularity.

Foreign Keys

Supported

F1 supports foreign key as well as indexing.

Isolation Levels

Snapshot Isolation

F1 provides strong consistency by using snapshot isolation.

System Architecture

Shared-Nothing

The F1 architecture contains F1 servers, F1 queriers pool, Spanner Storage servers and GFS. Spanner relies on Paxos based quorum to gain failure tolerant replicas.

Query Compilation

Not Supported

Query Interface

SQL

F1 provides users with SQL interfaces and NoSQL Key-Value style interfaces. For SQL interfaces, besides traditional SQL queries, F1 also supports joining operations with outer data source like CVS files.

Joins

Hash Join

F1 supports joining operation on not only the data source from Spanner but also from other remote data source such as CSV files and BigTable.

Storage Architecture

Hybrid

F1 is co-developed with Spanner and uses GFS as its lowest level storage system. F1 servers would not hold data but Spanner does.

Website

http://dl.acm.org/citation.cfm?id=2213954

Developer

Google Inc

Country of Origin

US

Project Type

Commercial

Written in

C++

Supported languages

C++