InfoQ Homepage News Apple Open Sources FoundationDB

Apple Open Sources FoundationDB

This item in japanese


Apple has open sourced its distributed database core, FoundationDB, which it acquired back in 2015 from the company of the same name. FoundationDB is designed to handle large volumes of data stored across clusters of commodity servers, and to favor data consistency by supporting fully global, cross-row ACID transactions.

FoundationDB, as its name implies, provides a low-level foundational interface for systems that need to store data by preserving consistency and being able to scale. The basic idea behind FoundationDB is to provide a datastore "core" that exposes an ordered key-value store with transactions, on top of which multiple database front-ends with different data models and query languages can be built. This includes, for example, an SQL database, a document database, a graph database, or more specialized APIs, such as Lucene/ElasticSearch, Zookeeper, and so on. All of them would use the underlying datastore core to ensure scalability and consistency of operation.

According to Apple, FoundationDB scales well as you add machines to the clusters, which are additionally able to automatically heal from hardware failures.

One of the founders of FoundationDB, the company that originally developed the FoundationDB datastore, provided a few more details about its design on Hacker News. FoundationDB uses optimistic concurrency, and handles the possibility of conflicts through lexicographic conflict ranges rather than using locks. Each range is an interval of one or more keys read or written by a transaction, with minimum granularity of a single key. Conflict ranges intersections are resolved by a set of internal microservices which partition up the key space independently of the way it is partitioned for data storage.

Furthermore, to improve scalability, FoundationDB represents indexes directly in the key/value store and keeps them consistent with the data through transactions. The benefit of this approach is it does not require the broadcast of indexes to all nodes. Another interesting feature of FoundationDB is strict serializable isolation with external consistency for all transactions.

Developers can interact with FoundationDB using API bindings available for a number of languages, including C, Go, Java, Python, and Ruby. Binary installers are available for macOS, Windows, and Linux. While the macOS platform is fully supported for development purposes, it is useful to keep in mind that production use is only supported by the Linux version.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.