Skip to content

Comment on RethinkDB (YC S09) Raises $1.2 Million For Its Database For Solid-State Drives

Comments

i was looking at this the other day. how do they address (what i assume are) the larger space requirements of append-only databases with the lower capacities of ssds? am i wrong about the space requirements, or is moore's law going to fix it, or is there some kind of background compaction?

A couple of points:

- We garbage collect (see Mendel Rosenblum's Ph.D. thesis on log-structured systems)

- Our customers care about cost per IOPS, not cost per GB.

- The hot real-time stuff is usually handled by a different database and/or storage system than the older, less frequently accessed data anyway.

thanks. if anyone else is curious, this seems to be the thesis - http://www.eecs.berkeley.edu/Pubs/TechRpts/1992/6267.html

Is there really a need for segment cleaning as Rosenblum lays it out?

They clean segments to reduce fragmentation and allow for decent-sized extents to write new data into. Since your writes don't need to be long and contiguous, do you really need to empty the live data out of segments?

You DO need to identify which snapshots are stale, and consequently mark certain blocks as free. But I see no need for compaction.

Will you guys be able to support all isolation levels?

Isolation levels are really a poor design decision, because they imply the use of locks. Serializable is great, but impossible to implement efficiently. Repeatable read, read committed, and read uncommitted can be implemented efficiently, but allow for various unpleasant isolation artifacts.

The one we're implementing is really the one everyone wants - snapshot isolation. It can be implemented very efficiently, and is stronger than repeatable read, read committed, and read uncommitted (so you should never want these three). It's not as strong as serializable, but nobody can give you a scalable serializable isolation level.

Snapshot isolation also guarantees consistency, but requires all transactions to be idempotent (so they could be rerun in case of a conflict). It's the best of both worlds, in practice most other databases already behave this way anyway.

so for inserts do you need to have some kind of uniqueness constraint that makes sure that a repeated insert is rejected (the first example that came into my head when i read "idempotent" was a simple insert, which isn't, as far as i can tell)?

[sorry if this seems like an interrogation - it's just interesting stuff you're doing...]

Essentially, it means that any transaction might potentially be rolled back and rerun. This isn't a problem for SQL, but suppose I select some stuff, get back into the host programming language, fire off some rockets into space from the Kennedy Space Center, and then insert some data about the launch into the database. This is a big problem, because if the insertion fails because of potential conflicts, the whole thing needs to be rolled back (including the rocket launch), and rerun. A lot of software is written to account for this (i.e. don't perform any external state modification you can't roll back until you've confirmed the transaction is committed), but a lot of software isn't. To really have great isolation and performance, you need to write software this way. For people that don't, we'll support serializable level, but there are very strong limitations as to how efficient this can be.

ah, ok, i misunderstood how broadly you were using the word "transaction". makes sense, thanks.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.