Open xumengpanda opened 4 years ago
To support FoundationDB as a storage engine of TiDB, there is some work to do. Here is the list I can think of:
TiDB From the aspect of TiDB, TiKV needs to conform to the same protocol with TiDB.
CmdPessimisticLock
), querying historical data (CmdMvccGetByStartTs
), and garbage collecting (CmdDeleteRange
). Besides, FoundationDB needs to support snapshot and RC isolation as TiKV does.tidb_enable_async_commit
), stale read, follower read (tidb_replica_read
). These features can be either implemented by FoundationDB or unsupported.tidb_isolation_read_engines
or hints). Obviously, TiDB can always use TP engine if FoundationDB has no plan to support a column-store storage engine.PD Both TiKV and TiDB highly rely on PD, which means, FoundationDB needs to be compatible with PD. See https://docs.pingcap.com/tidb/stable/pd-scheduling-best-practices.
Ecosystem tools TiDB and TiKV support various tools.
Feature Request
FoundationDB (https://github.com/apple/foundationdb) is a deterministic distributed database that supports ACID transactions. It is extremely reliable because it has a deterministic simulator to quickly check its correctness under various interleaving of failure scenarios. One end-to-end test in simulation typically takes less than 30 seconds and covers many interleaving failure scenarios. Once a failure is found, it can be easily reproduced on a single process, which makes development cadence super fast.
FoundationDB is widely used by many big companies, including Snowflake (https://www.snowflake.com/blog/how-foundationdb-powers-snowflake-metadata-forward/) and Wavefront (https://www.wavefront.com/wavefront-foundationdb-open-source-project/).
FoundationDB is also used as the backend storage layer for IBM CouchDB (https://www.youtube.com/watch?v=SjXyVZZFkBg) and eBay JanusGraph (https://www.youtube.com/watch?v=EtB1BPG00PE). The prominent reason why FoundationDB is its reliability, ACID transaction support and performance.
If TiDB can support FoundationDB as a backend storage layer, TiDB will become a very appealing SQL Layer for FoundationDB users. TiDB will also be able to benefit from FoundationDB's deterministic simulation capability.
Note: Previous discussion of SQL Layer support on FDB is at https://forums.foundationdb.org/t/sql-layer-in-foundationdb/94/12