Better HN
topnewbestaskshowjobs
Log inSign up

voidmain

1,781 karma · joined Jul 17, 2009 (17y ago) · 402 submissions

Software engineer, entrepreneur

Co-founder of Antithesis

Co-founder of FoundationDB

Co-founder of Visual Sciences

Submissions

comment 13y ago · link · parent

We have been told by people who should know that Clustrix does not provide serializable transactions, but since this claim is unspecific and not based on publically available information we haven't put it on the page.

comment 13y ago · link · parent

As we disclaim on the page itself, we aren't experts on all of these databases, so it's possible that we've made a mistake. We are relying on the documentation of other products (but on the specific documented claims rather than whether they throw around the term "ACID").

'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

Spanner can do partition-spanning transactions with a useful throughput.

comment 13y ago · link · parent

As far as we know, Datomic's (noninteractive) transactions are ACID. You would do better to ask them, though. The list isn't intended to be exhaustive!

comment 13y ago · link · parent

(Jonathan, please read this comment in a completely respectful tone of voice, because I'm not, and I'm sure Nick was not, trying to start a FoundationDB vs Datastax pissing contest!)

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

FoundationDB (https://foundationdb.com) provides optimistic transactions-- the client does reads from a consistent snapshot, and then tells the database what it wants to write and what serializable reads it did, and the database figures out whether the transaction can safely commit or whether it needs to be retried.

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

I agree. At FoundationDB, we're writing a coordination tool (working name "beastmaster") that provides service discovery, locking, leader election, etc on top of our transactional key/value store. It is higher level than these tools; our idea is to try to make it useful from a command line or DNS rather than have to be baked into every piece of software that needs service discovery.

    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/

comment 13y ago · link · parent

I'm the author of the post, if anyone has any questions (or corrections :-)

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

A database is going to do a query like that in one of two ways: scan over (all of|a column family of) the data, or look in some kind of index on "someproperty".

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

Quicksand (the physical fault testing environment) doesn't find our bugs because our simulation-based testing finds them first!

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

I love that someone is actually testing database fault tolerance in public, instead of just assuming that anything with replication is fault tolerant...

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

Random, uncached reads on the same dataset as the 90/10 - 1.6M/sec, limited by SSD throughput. Cached reads (from the same dataset, with a different distribution of read keys) you can see on our website at 3.2 M/sec. I should mention that the test clients also run on the same cluster, and in that workload they are a significant fraction of CPU.

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

You are right. Our API is strong enough that you could implement a SQL database on top of it efficiently. I have done it (using sqlite4 as the front end) as a proof of concept.

comment 14y ago · link · parent

I was nervous writing that sentence, because it's hard to be sure of the truth of any claim to be 'first'! But none of the examples you mention, to my knowledge, provide multi-key ACID transactions. A compare and set facility for an individual key/document/row/entity group/etc is a very useful feature, but cannot be used to provide atomicity or isolation for transactions that read or write more than one key.

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

The conflict resolution service assigns a global ordering to transactions as well as pass/fail. Transactions that fail don't do any writes. Transactions that pass still aren't durable, they could be rolled back by a subsequent failure until they get on disk in a few places.

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

We require a quorum over coordination servers to stay up. For example, if you only have two datacenters with actual DB servers, a third coordination server out in the cloud somewhere can act as a tiebreaker (it will be lightly loaded).

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

I can only speculate, because I have never used datomic.

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

FoundationDB co-founder here.

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

FoundationDB co-founder here.

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

FoundationDB co-founder here.

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

Here's my attempt (requires WebGL, realistically only works in Chrome):

http://www.glowscript.org/#/user/David/folder/Public/program...

comment 15y ago · link · parent

It appears to have no indirect load or store instruction. I don't think it's Turing complete!

comment 15y ago · link · parent

Why are you horrified by the idea that someone might suffer from their own mistakes, but not by the idea that they might suffer from the mistakes of others?

comment 15y ago · link · parent

I have co-founded one successful company and am a co-founder in a current startup. I do think explicitly about tax effects when making business decisions, and there are definitely tax rates that would have changed my decisions, particularly taxes on wealth or investment income that make it less valuable to have savings. High enough taxes could also cause me to leave the U.S.

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

I'm not an expert in this area, but since homomorphic encryption exists (though is still impractical) and obfuscators do not exist (http://www.iacr.org/archive/crypto2001/21390001.pdf), it follows that the former can't be used to construct the latter.

comment 16y ago · link · parent

I don't think the pressure _can_ be removed. Nothing in the article says this "material" is stable at ordinary pressures. They're just saying that the chemical structure changes as it is squeezed into a smaller and smaller space. If you let go, it presumably expands immediately.

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.

comment 16y ago · link · parent

It's a spring. You put in mechanical energy, you get back mechanical energy and heat. The engineering challenge, I think, is making something that can compress a useful quantity of the stuff.

comment 16y ago · link · parent

Sadly, what Corey did was probably illegal:

http://www.nytimes.com/2010/04/03/business/03intern.html

comment 16y ago · link · parent

I think the idea of one company controlling what people may do with computers is pretty horrible. I hope this doesn't happen, and would rather develop or invest in something that could make the iPad fail than something complementary to it.
1
1011121314