fdb-document-layer
foundationdb
Our great sponsors
fdb-document-layer | foundationdb | |
---|---|---|
5 | 21 | |
204 | 13,971 | |
0.5% | 1.3% | |
0.0 | 9.8 | |
almost 3 years ago | about 24 hours ago | |
C++ | C++ | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fdb-document-layer
-
Turning SQLite into a Distributed Database
This is exactly what the engineers behind FoundationDB (FDB) wanted when they open sourced. For those who don't know, FDB provides a transactional (and distributed) ordered key-value store with a somewhat simple but very powerful API.
Their vision was to build the hardest parts of building a database, such as transactions, fault-tolerance, high-availability, elastic scaling, etc. This would free users to build higher-level APIs (Layers) APIs [1] / libraries [2] on top.
The beauty of these layers is that you can basically remove doubt about about the correctness of data once it leaves the layer. FoundationDB is one of the most (if not the) most tested databases out there. I used it for over 4 years in high write / read production environments and never once did we second guess our decision.
I could see this project renamed to simply "fdb-sqlite-layer"
[1] https://github.com/FoundationDB/fdb-document-layer
-
Cloudant/IBM back off from FoundationDB based CouchDB rewrite
https://github.com/FoundationDB/fdb-document-layer .and you get the transaction Al integrity.
I stopped using MongoDB and switched to this.
- FoundationDB Document Layer
- A truly open-source MongoDB alternative
- FoundationDB: A Distributed, Unbundled, Transactional Key Value Store [pdf]
foundationdb
-
Figma's Databases team lived to tell the scale
Actually, Apple does this for iCloud! They use FoundationDB[1] to store billions of databases, one for each user (plus shared or global databases).
See: https://read.engineerscodex.com/p/how-apple-built-icloud-to-...
Discussed on HN at the time: https://news.ycombinator.com/item?id=39028672
[1]: https://github.com/apple/foundationdb https://en.wikipedia.org/wiki/FoundationDB
-
Maybe Getting Rid of Your QA Team Was Bad
Is this the language in question? https://github.com/apple/foundationdb/blob/main/flow/README....
-
WASM by Example
> I wondered if perhaps this WASM use case for a cross-language library was already just as possible and ergonomic using language bindings and maybe thats why this use case doesnt seem like a big deal to people.
Yeah that’s the reason. You don’t notice it a lot of the time, but FFIs are everywhere already. The most common foreign function interface is basically the ability to call C code, or have functions made available to C code. C is used because everyone knows it and it’s simple. And most languages either compile to native code (eg rust) - which makes linking to C code easy. Or the runtime is implemented in C or C++ (eg V8, Ruby). In languages like that, the standard library is already basically implemented via a FFI to C/C++ code.
I’ve got an iOS app I’m working on that’s half rust and half swift, with a touch of C in the middle. The bindings work great - the whole thing links together into one binary, even with link time optimizations. But the glue code is gross, and when I want to fiddle with the rust to Swift API I need to change my code in about 4 different places.
Most FFIs are a one to many relationship in that if you write a clean C API, you can probably write bindings in every language. But you don’t actually want to call naked C code from Ruby or Javascript. Good bindings will make you forget everything is done via ffi. Eg numpy. I haven’t looked at the wasm component model proposal - I assume it’s trying to make this process cleaner, which sounds lovely.
I maintain the nodejs bindings for foundationdb. Foundationdb bindings are all done via ffi linking to their C code. And the API is complex, using promises and things. I find it really interesting browsing their official bindings to go, Java, Python and Ruby. Same bindings. Same wrapped api. Same team of authors. Just different languages. And that’s enough to make the wrapper wildly different in every language. From memory the Java ffi wrapper is 4x as much code as it is in Ruby.
https://github.com/apple/foundationdb/tree/main/bindings
-
JDK 21 Release Notes
Isn’t apple server on C/C++?
They have their own db in that
https://github.com/apple/foundationdb
-
How FoundationDB works and why it works
> Any meaningful technology is open source.
Clearly untrue, however FoundationDB is open source, with a permissive license.
https://github.com/apple/foundationdb
So is much of the operational tooling for it:
https://github.com/FoundationDB/fdb-kubernetes-operator
-
FoundationDB: A Distributed Key-Value Store
I don't recall any of those details but the test involved injecting a bogus block device that always returns garbage, and noting that this results in garbage records returned from client queries. And I don't think those kinds of issues have been eradicated, browsing through their github issues there are people trying to recover corrupted clusters. https://github.com/apple/foundationdb/issues/2480
- Apple/FoundationDB: FoundationDB
- FoundationDB Design Internals
-
Install FoundationDB in Gentoo
For my current job, I have to install FoundationDB (they have a github repo) as a dependency for the project's code.
-
Anna: Key-Value Store for Any Scale
To clarify, FoundationDB has some documented multi-region features, but it's not at all clear that anybody who runs it at scale relies on those multi-region features [1]. Even if they do, it's not obvious they run this Fearless DR mode at any appreciable latency.
Geo-replication is an area where Anna really shines, and foundation pays severe costs. All of the concurrency control problems have contention footprints on the order of round-trips. Fully optimistic concurrency control needs to expose backoffs quite a few round-trips to be live. Even pessimistic concurrency control requires some number of round trips, probably at least 1.5 optimally, but in practice in most tuned systems, probably 3. A heck of a lot of use cases make sense at 0 global RTTs and don't at 1+. The ability to tell the database how to manage concurrency, and then providing causal is ultimately the best you can do. That's awesome.
At the end of the day, I have to believe that there's a whole big mess of applications we'll build this, on systems in the portion of the design space Anna is choosing, one day. This is only recently not cutting edge research, but it's definitely still research. We don't know how to model these concepts at a high-level and in a composable way where the masses of software developers can engage with them.
It's interesting to think about how long ago we were graced with BAYOU [2], that thing was ahead of its time. I suspect it's going to take a little while longer before these sorts of techniques make their way into data storage primitives we think of as part of the standard vernacular, but I believe we'll get there eventually.
Databases are fun!
[1] https://github.com/apple/foundationdb/wiki/Multi-Region-Repl...
What are some alternatives?
mvsqlite - Distributed, MVCC SQLite that runs on FoundationDB.
swift-evolution - This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.
badger - Fast key-value DB in Go.
FASTER - Fast persistent recoverable log and key-value store + cache, in C# and C++.
wasmer-postgres - 💽🕸 Postgres library to run WebAssembly binaries.
password-manager-resources - A place for creators and users of password managers to collaborate on resources to make password management better.
npm-registry-couchapp - couchapp bits of registry.npmjs.org
fdb-kubernetes-operator - A kubernetes operator for FoundationDB
mosql - MongoDB → PostgreSQL streaming replication
docker - Docker - the open-source application container engine
dev-example-nosql-listener - This repository contains information on how to create and use a MariaDB MaxScale NoSQL Listener with MariaDB Community Server.
anna - A low-latency, cloud-native KVS