Live data from Hacker News

RethinkDB: An open-source distributed database built with love over three years

rethinkdb.com

241–247 of 247 posts

Re: RethinkDB: An open-source distributed database built with love over three years

#241
post #240

Earlier quoted context omitted.

My point was that you don't have to do that with rethink because the entire query gets executed on the server. You don't have to take the value down to the client, make the change, and then send it back. The entire update gets evaluated on the server and the server handles atomicity in various ways (depending on the query).

Do you think something like the following should work with RethinkDB? r.table('foo') .get(5) .update({ '_rev': r.branch(r['_rev'] == 5, r('_rev').add(1), r.error("invalid revision") ), 'name': "awesome name" }) the basic idea is that `name` should be update to "awesome name" and `_rev` should be incremented by 1, but only if `_rev` is 5, otherwise an "invalid revision" error should be thrown.

Yes, this will work.

Re: RethinkDB: An open-source distributed database built with love over three years

#242
post #240

Earlier quoted context omitted.

Do you think something like the following should work with RethinkDB? r.table('foo') .get(5) .update({ '_rev': r.branch(r['_rev'] == 5, r('_rev').add(1), r.error("invalid revision") ), 'name': "awesome name" }) the basic idea is that `name` should be update to "awesome name" and `_rev` should be incremented by 1, but only if `_rev` is 5, otherwise an "invalid revision" error should be thrown.

Yes, this will work.

awesome, thanks!

Re: RethinkDB: An open-source distributed database built with love over three years

#243

Earlier quoted context omitted.

Releasing a project like this means working very hard for a long time without anybody patting you on the back saying you're doing a good job. It's exhausting, a labour of love. Get it now?

I reckon $1.2 million in funding helped soften the pain :)

True, but nothing beats positive reinforcement, for me at least. The whole happiness vs money thing.

Re: RethinkDB: An open-source distributed database built with love over three years

#244
post #240

Earlier quoted context omitted.

My point was that you don't have to do that with rethink because the entire query gets executed on the server. You don't have to take the value down to the client, make the change, and then send it back. The entire update gets evaluated on the server and the server handles atomicity in various ways (depending on the query).

Do you think something like the following should work with RethinkDB? r.table('foo') .get(5) .update({ '_rev': r.branch(r['_rev'] == 5, r('_rev').add(1), r.error("invalid revision") ), 'name': "awesome name" }) the basic idea is that `name` should be update to "awesome name" and `_rev` should be incremented by 1, but only if `_rev` is 5, otherwise an "invalid revision" error should be thrown.

That would work. I didn't realize you can raise error on the row. Good work!

Re: RethinkDB: An open-source distributed database built with love over three years

#245
post #163

Earlier quoted context omitted.

But there's no standard way of representing the dates as strings, or indicating that this field here is a date and not a string that happens to look like one, so nothing can rely on what you do. You can represent literally anything with a string, but you lose type information when you do.

There is a standard for representing string (see sibling comment) and your type information is the field name. So you know your document has a type if you give it a d_type field for example and then based on that you know your tstamp field is the date.

I'm not saying I can't imagine how to work around it, I'm saying that we're forced to, and likely will do so in a variety of competing ways, which degrades its usefulness as an interchange format. It means your tools, at the end points or in the middle, don't know what the data in that field is and so can't do anything useful for you that you haven't explicitly taught it to do.

Re: RethinkDB: An open-source distributed database built with love over three years

#246

Earlier quoted context omitted.

there are tougher problems like high-performance cross-document distributed ACID, but I think the industry as a whole is relatively far away from that right now Megastore and Spanner solve that problem, with varying tradeoffs: http://research.google.com/pubs/pub36971.html http://research.google.com/archive/spanner.html

Our internal database does too (with a different design than Spanner, but stuff still comes "online" atomically for everyone across the globe at the same time, with similar latency). Unlike FoundationDB, and like Spanner, we're doing it with complex object graphs, not just key-values, and we also do it with consistent secondary indexing (I'm not sure if Spanner supports this or not). This isn't "the future", this is…

Hi Erich - I'm curious... you refer to your "internal database" doing distributed ACID but state that you're not with Google. Can you say who you're with? It's interesting to us to know who is also working on this problem.

Re: RethinkDB: An open-source distributed database built with love over three years

#247
post #96

Earlier quoted context omitted.

While technically correct I assume the parent was referring to hstore [0] which has both GIST and GIN indexes as well as btree and hash for equality. With some simple formatting functions (its just json after all) it's sixes to me. [0] http://www.postgresql.org/docs/9.2/static/hstore.html

hstore is great, I won't hear a word against it, but it doesn't deal with complex nested objects like JSON can (I would love to be wrong about this) - it's just a key/value store with indexing of the objects inside.

http://momjian.us/main/blogs/pgblog/2012.html#October_2_2012
Post reply on HN