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 scalability. And it maintains ACID guarantees and provides a distributed scalable database system.
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.
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:
F1 supports traditional relational data model. The Cluster Hierarchical Model would use repeated data (repeated ancestor's primary key) to store the data in a clustered way for fast joining process. The Cluster Hierarchical Model stores data like a tree with a root row, and then followed by its child rows and grand child rows.
F1 supports foreign key as well as indexing.
F1 directly uses a separated Spanner table to store index information. F1 has two kinds of indices which are Local Index and Global Index. Local Index requires to require root primary key as a prefix so that the index can be used to locate the row in the same Spanner Directory fast. Global Index is a costly index which can locate the data globally without prefix.
F1 provides strong consistency by using snapshot isolation.
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.
F1 uses change history named ChangeBatch to maintain triggers and to log changes. Every transaction will have a ChangeBatch stored with root row that stores all changes of all children rows that belongs to it. The ChangeBatch Table can be queried to do trigger or update stuff by clients.
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.
F1 is co-developed with Spanner and uses GFS as its lowest level storage system.
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.