Hacker News new | past | comments | ask | show | jobs | submit login

Does RethinkDB do multiple atomic updates?



Nope, operations on a single document are atomic, but not on multiple documents. MongoDB works the same way.

AFAIK, the only NoSQL DB with support for multi-doc transactions is HyperDex [0].

[0] - http://hyperdex.org/


Our (Tokutek) build of MongoDB with Fractal Tree indexes has atomic multi-document updates: http://www.tokutek.com/2013/04/mongodb-transactions-yes/ Come talk to us if you want to give it a spin!

Don't mean to steal the thunder from RethinkDB, they're doing great work too.


hyperdex says they have multi-server transaction while you still have single server (according to the comments on the blog post)


Yep, we aren't doing sharded transactions yet. Still trying to nail down the basics.


Also http://www.rethinkdb.com/docs/advanced-faq/. RethinkDB started out as a MySQL driver that was lock-free and did schema updates non-stupidly, but it sounds like they've abandoned ACID and schema enforcement entirely like almost all NoSQL systems (as if what I wanted is faster wrong answers).


I see this tude' among DB guys quite often -- unless the database guarantees unconditionally that it will always give the right answer and that no data is ever lost then it is worse than useless and most be nuked from orbit.

Quite frankly that is pretty arrogant. ACID may be required for a banks transactions, but in far the majority of cases it isn't required (yes, even in your business) -- nothing of any consequence is going to happen if your A/B testing DB lose a couple houndred entries because those weren't flushed to the cache.

As for non-schema enforcement, well you have too add a few if statements to your database model class -- and that is it.


To be clear, RethinkDB doesn't give wrong answers, and doesn't lose data. ACID isn't as much about right vs wrong answers, as it is about defining what "right answer" means and what constraints you're willing to give up in exchange for performance.

ACID is a great, but unfortunately it isn't free (especially in distributes systems).


Banks do their transactions with reorderable increments and decrements, and reconciliation after the fact - they are "eventually consistent".

More realistic example of stuff actually mattering: you sold product and took the money. People will be annoyed if they don't get their goods.


And each of those individual operations must be preserved. The example of account credit/debit is not used because it reflects reality 100%, but because its a simple-to-understand example to illustrate the power of transactions. Most developers should be able to look beyond that simplification and see how they can put transactions to work (or see that they are unnecessary).


If you want schemas and transactions, just use NewSQL.


OrientDB also has multi-document transactions, I believe.


http://foundationdb.com/ supports multiple doc transactions.


And HyperDex only supports them via a proprietary plug-in.


I believe MarkLogic does too.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: