FoundationDB is a distributed non-relational database that supports ACID transactions and OLTP workloads. FoundationDB decouples its data storage technology from its data model. All data is stored as an ordered key-value data structure and can be remapped to custom data models or indexes by using user-written layer module API. FoundationDB doesn’t have any separate query language, it only exposes API to access data.
FoundationDB was famous for having a very rigorous and thorough testing of their fault tolerance. They built their own [deterministic testing] (https://www.youtube.com/watch?v=4fFDFbi3toc) while developing their system to make sure their system implementation behaves correctly. The simulation was built to model real-life scenarios, such as a combination of transaction executions while having network failure, database configuration change, dumb system admin etc. Jepsen didn't even need to test FoundationDB because of FoundationDB’s rigorous simulation.
FoundationDB is built to handle high-load transaction processing with high-performance with strong guarantee (ACID).
FoundationDB is originally built in 2009 by three co-founders, Dave Rosenthal, Dave Scherer, Nick Lavezzo. The founders used to work for Visual Sciences; an analytics company (NASDAQ:VSCN, now is a subsidiary of Adobe). The company acquired Akiban. FoundationDB was acquired by Apple in 2015. In 2018, Apple open-sourced FoundationDB under Apache License 2.0.
Optimistic Concurrency Control (OCC)
FoundationDB uses Optimistic Concurrency Control (OCC) for writes and Multiversion Concurrency Control (MVCC) for reads. There are no blockings on reads or writes. Conflicting transactions will fail at commit and the client is responsible to retry the transactions.
The only way to model the data and query them is by writing layer. FoundationDB only allows the user to interact with the data through their custom API in Python, Ruby, Java, Go, or C.
A simple example to execute a transaction in Python:
@fdb.transactional
def example(tr):
# Read two values from the database
a = tr.get('a')
b = tr.get('b')
# Write two key-value pairs to the database
tr.set('c', a+b)
tr.set('d', a+b)
@fdb.transactional
is a decorator to make a transactional function.
https://github.com/apple/foundationdb/
https://apple.github.io/foundationdb/index.html
FoundationDB
2009
Apple