1,781 karma · joined Jul 17, 2009 (17y ago) · 402 submissions
Co-founder of Antithesis
Co-founder of FoundationDB
Co-founder of Visual Sciences
comment 13y ago · link · parent
'Snapshot isolation' is a level of isolation guarantee, not an implementation technique. It means that a transaction will read values consistently at one point in history and then write values at a later point, even though the read values may change in between. To give a classic example, pure snapshot isolation doesn't allow you to soundly transfer $100 from Alice's account to Bob's account. FoundationDB uses MVCC and optimistic concurrency, but provides serializable isolation.
Besides this, and the asynchronous indexing that you mention, RavenDB uses an "XA" type technique for cross-node transactions which relies on the durability of an external transaction coordinator. Various public statements of the developers lead me to think that they don't find this arrangement more trustworthy than I do.
"Local" transactions on a single document don't qualify as ACID transactions; that's one of the primary messages of the page you are linking to.
comment 13y ago · link · parent
I can easily believe that adding CAS in combination with Cassandra's other features and design choices was harder than providing it in other contents, and that it required novel ideas! As an architect of a distributed, transactional, ordered, fault tolerant k/v store I know quite well that providing multiple properties in combination is usually superlinearly difficult :-) It's also clearly not true that open source projects only copy, unless you are inclined to believe that there is nothing new under the sun at all.
But in your view, do (for example) MongoDB, Zookeeper, HBase, Couchbase, and etcd also provide "lightweight transactions"?
If not, why not? If so, why is a new name for this feature necessary?
comment 13y ago · link · parent
Beastmaster is just a client that sits on top of FoundationDB's transactions and fault tolerance, and adds coordination-specific things like a global clock, fair locks with timeouts, and a data model for service discovery. And then provides useful command line tools and a simple DNS and REST server. We should have it on github soon.
comment 13y ago · link · parent
beast service --lock name=mailserver.foundationdb.com --run mailserver.sh &
beast service name=webserver.foundationdb.com --run webserver.sh &
ping mailserver.foundationdb.com
wget http://webserver.foundationdb.com/369.
7 Things That Make Google F1 and FoundationDB SQL Layer So Strikingly Similar(blog.foundationdb.com ↗)
4 points · by voidmain · 13y ago · discuss
comment 13y ago · link · parent
In our approach this kind of functionality is the responsibility of a higher "layer" of the system above our key/value API. There are lots of ways of organizing and indexing data with different tradeoffs between search and update performance for different kinds of queries. We support pretty much all of them-- not by building any of them into the core, but by providing a general transaction facility that permits arbitrary indices to be updated.
For example: in a database like Mongo, queries like that one don't scale linearly even if there is an index, because you have to ask every shard to look in its local index. In FoundationDB, you would store the index in the database as keys like (someproperty_index, "123", _id) and an index read would only need to go to a single server.
It can be a hassle to create all the higher level functionality yourself, though! Over time, we and others will be offering more "opinionated" layers to save you time.
comment 13y ago · link · parent
Our deterministic simulations cover all of the failure cases that quicksand can test and many more. The main reason we built quicksand is precisely to find out if our assumptions about the layers below us are wrong, since the simulator can't test its own assumptions. For example, there are hardware/software combinations out there where fsync() can't be trusted...
comment 13y ago · link · parent
Stateful distributed systems are really, really hard to get right. The only hope is to do a LOT of simulation. Not that testing is a substitute for designing things right, but no one is smart enough to be sure they've thought of all cases.
At FoundationDB we do this sort of testing millions of times over: http://foundationdb.com/white-papers/testing/
so that we can let people plug and unplug our servers at trade shows without fear (video): http://blog.foundationdb.com/post/50924738464/foundationdb-f...
and ultimately so that applications on top of our system face a somewhat less scary world.
comment 14y ago · link · parent
Read requests come to a storage server with a specific version number attached, so the storage server can reply authoritatively without any further communications. Starting a transaction requires selecting a version number for the read snapshot, and that incurs some latency to deal with the concerns you mention (but scales fine).
comment 14y ago · link · parent
We plan to write something longer talking about the different levels of support that various products provide for A,C,I, and D.
comment 14y ago · link · parent
Each machine doesn't have its own commit log at the level of the distributed database. (The key/value store where we locally store data on each node happens to also use write ahead logging, but this is not an architectural requirement). Ideally transactions just have to be made durable in some N places to be considered committed. In practice, we elect specific machines to a transaction logging role, among other reasons because SSDs do better at providing fast durable commits if they aren't also serving random reads.
Each machine is authoritative for reads for some ranges of the keyspace and for the range of versions it knows about. It proactively fetches writes for newer versions. If it gets a request for a version it hasn't managed to get the writes for yet, the read has to wait while that storage server catches up. In practice this lag is very small, as you can see from our latency measurements.
comment 14y ago · link · parent
These coordination servers do paxos, but are only needed when there are failures or role changes - they don't participate at all in committing individual transactions. Normally, we only need a single geographic ping time to do a durable transaction if it originates in the current 'primary' datacenter.
For further improved latency, we plan to allow each individual transaction to decide whether it needs multi-datacenter durability. The commit process is the same, but we can notify the client of success earlier if it is willing to take the risk that a WAN partition or meteor strike violates its 'D' guarantee. ACI are guaranteed either way.
comment 14y ago · link · parent
Like FoundationDB, datomic does appear to separate transaction processing from storage.
A few relevant differences:
- Datomic provides transaction isolation through stored procedures which run on its single "transactor", while FoundationDB provides interactive transactions.
- To my knowledge datomic does not claim to be interested in high write scalability, which we definitely are.
- Datomic is designed to keep multiversion history indefinitely, while FoundationDB keeps it just long enough to execute short transactions.
comment 14y ago · link · parent
I'll try to address your questions. This isn't a complete explanation of how our system works!
Most people trying to solve this problem have approached it by trying to take multiple machines, each capable of processing transactions, and do distributed transactions between them. This leads to systems that do local transactions fast but global transactions much more slowly, and a tradeoff between the quality of fault tolerance (paxos=good, 2-phase=bad) and commit performance.
Our approach is instead to decouple the first job you mention (checking if transactions conflict to provide isolation) from the second job (making transactions durable). These can then be scaled independently.
The first job, conflict resolution, is a small fraction of the total work and needs access only to the key ranges used by each transaction, not the existing contents of the database or the actual values being written. This allows it to be very fast.
The rest of the system is a consistent, durable distributed store that has to preserve a predetermined ordering of writes, and provide a limited window of MVCC snapshots for reads.
Does that help at all?
comment 14y ago · link · parent
As other posters have already guessed, we don't support long-running transactions (we only keep multi-version information for a short time). So if you keep a transaction open for a long time it will not commit (after a while reads will start to fail, too).
It's not architecturally impossible for us to support long-running read snapshots, but it is expensive for our storage servers to keep snapshots alive for a long time. So our backup solution instead works by backing up transaction logs while doing a non-isolated read of the database. At restore time we will replay the logs to get back a consistent point-in-time snapshot.
The reason that we see higher burst than steady state performance has nothing to do with transactions. We have to do reads from SSD as the application requests them, and we have to make writes durable by logging them right away, but as you surmise we can defer the hard work of doing random writes to our btrees for a while. Even a workload that is 90% reads benefits a lot from deferring writes because writes have to be 3x replicated and because consumer SSDs are comparatively slow at mixed read/write workloads. Read only workloads will not see any initial burst (and might see a ramp-up time from cold cache effects).
comment 14y ago · link · parent
As any ACID database must, we choose Consistency over Availability in the CAP theorem sense. This means that when a datacenter is disconnected or poorly connected to the internet, the database is not available for writes in that datacenter. If you are serving a web site to the internet, and need it to stay available if one Amazon AZ fails, this isn't too bad.
Some applications really do need disconnected operation, and thus 'AP' semantics. (For example, a grocery list for a mobile phone, or an application that must be available everywhere if the entire Internet partitions.)
comment 15y ago · link · parent
http://www.glowscript.org/#/user/David/folder/Public/program...
comment 15y ago · link · parent
Regulation, however, is a much bigger impediment to innovation than (current levels of) taxes - there are no companies that I have not started because of taxes, but there are a dozen that I haven't started because regulations would make them impractical or make political influence more competitively important than good execution.
comment 15y ago · link · parent
comment 16y ago · link · parent
To be clear, I also think the energies they are storing in their experiment are a small fraction of a joule. The "energy density" is high because the sample is very small.