RethinkDB 1.14: binary data, seamless migration, and Python 3 support
rethinkdb.com
rethinkdb.com
"RethinkDB's performance has degraded significantly after the addition of the clustering layer, but we hope we'll be able to restore it over the next several releases."
They could have tried to gloss over that. I like that they weren't afraid to put that out there.
One thing I would really love to see more time put into is integration of a real consensus protocol like Paxos or Raft for properly recovering from failure.
Currently tables will become unwritable after a single machine fails and you need to update the blueprint/semilattice to use a new master manually. This is error prone (due to race conditions in replication of blueprint updates that can cause vector clock conflicts if you update it from more than one place) and generally not all that fun.
Error handling in these cases could also be better, the initscript it ships with doesn't make this much better (would be nicer if it used a symlink hack or something similar to have different initscripts for each db instance). Currently it's hard to tell without manual inspection why a RethinkDB server crashed or didn't start without manual intervention.
That being said, I love using RethinkDB, ReQL is great - infact it's so good that it's generally justification enough for me to use it for new projects.
If clustering could be given more love it would be my #1 datastore for all projects probably. (See the Jepsen by aphyr series for an idea of what I am looking for here)
We restarted heavy development on the clustering infrastructure two months ago, and just yesterday I played with the prototype of the first upcoming upgrade. It's a WIP but is absolutely delightful (you can see my tongue in cheek review of it at https://github.com/rethinkdb/rethinkdb/issues/2957).
Here are the parts that are already done and will be shipped soon:
- Vector clocks conflicts are now resolved automatically, no
more manual conflict resolution
- There is now a ReQL API for clustering that's dramatically
better than the current `rethinkdb admin` tool
- Much love has been put into presenting the abstractions to
users. Everything is cleaned up and simplified, it's easier
to understand and change, and even in advanced cases you
won't have to know anything about blueprints/semilattices.
- Really, this is about to get dramatically better. I can't
summarize it in a bullet point, we put an enormous amount of
effort into this in a thousand different places.
Here's what's coming immediately after that: - Automatic failover
- Always-on resharding (no more resharding downtime)
(The reason why these latter updates are coming after the API overhaul is because they require a lot of simplification/refactoring/redesign internally as well as externally, and we wanted to do it piecemeal).Thanks for writing up your feedback and sticking with RethinkDB despite the limitations of clustering 1.x. Multiple people are currently working very hard on this, and things are about to get a lot better.
Any chance of a clue as to the kind of timeframe for this? Even a very rough idea would be fine as I can appreciate you might not want to (or be able to) commit to anything yet.
it's hard to give precise estimates looking that far out
Absolutely! I just wanted some kind of ballpark idea, which you've given me - thanks!
I know I have popped up on IRC and Github about these things before so it's really great to see you guys are making progress.
Keen to check out the new ReQL methods for manipulating the cluster state.
At the moment we are using the mostly undocumented HTTP API to make clustering changes etc.
Even though it's suggested to use RethinkDB on a 2GB+ machine (http://rethinkdb.com/faq/#what-are-the-system-requirements) it's run just fine on a machine with 1GB of memory.
Looking forward to all the new changes. I'm especially happy about the binary support with r.http, going to make life easy!
If you have any questions about the release, product roadmap, or anything RethinkDB-related, please ask! I'll be around all day to answer questions and incorporate your comments into the development roadmap.
What are the plans for supporting java/clojure/scala and go-lang?
We've been working really hard to keep the surface area of the product minimal so the dev team can stay nimble, which so far allowed us to ship features and stability improvements very quickly. We have a lot of really exciting updates planned for the next few releases, so we'd like to stick to the current model for now. After that, we'll start expanding the dev team and bringing some of the community drivers under the official RethinkDB umbrella. I don't have an ETA for this yet, but I expect this will happen within a year or so.
Here is how the R&D projects have worked thus far. We implemented a RethinkDB protocol compatible server in JavaScript (which is surprisingly easy), so that a lightweight version of the server can run in the browser. If you use the JS driver in the browser with this server, all queries continue to just work.
Behind the scenes the in-browser server can sync up data with the real server, so everything can work while the browser/mobile device goes offline.
It's not too hard to build a prototype (and we've seen a few), but getting it to production involves a non-trivial effort; plus we'd have to support the feature indefinitely which would add a significant development cost.
Lots of people have asked for this, so I'd like to find a way to make it happen. @neumino has a version of this in the works right now, so we might just polish it up and release it to the community.
I followed the relevant issues on GitHub closely, and for what it's worth I think you made the right choice - certainly this fits the way I want to store binary data in the database. It's a better system than even CouchDB attachments, what I'm currently using[0], and so much better than GridFS, a great solution to the wrong problem of how to engineer a storage layer on top of MongoDB, when my actual problem is: "how do I store this avatar image alongside this user as simply as possible."
Knowing how much attention was paid to "getting it right" on this one feature I paid particular attention to significantly bolsters my faith[1] in the engineering quality of the project as a whole.
[0] and what ultimately made me chose Couch over Rethink for my current project
[1] which was already high.
FYI, the filesystem feature is still on the horizon. The current implementation is good for small files like avatars, the upcoming one will be good for large files like videos. The distributed FS will almost certainly be use `r.binary` as a building block, which will result in a neatly modularized design overall.
I should have a better idea of what the comparison looks like after we get a little further along.
The only annoyance so far has been data migration between versions; the elimination of this is excellent news.
If you're considering taking Rethink for a spin, now is a better time than any before.
1: https://registry.hub.docker.com/u/dockerfile/rethinkdb/docke...
EDIT: note that you won't necessarily be able to run with indexes from multiple versions back. We'll almost certainly prune the backwards compatibility code to only a few releases to keep the codebase clean and nimble, and to keep difficult to diagnose bugs to a minimum. But it's still a very convenient feature release-to-release, as you can upgrade, and then rebuild indexes at your convenience.
There are a few limitations we'd like to work out (e.g. right now the implementation doesn't support compound geo indexes), but we're well on track to shipping 1.15.
Studying RethinkDB source code may not be the best way to study distributed systems, though. There is an enormous gap between a working system and a production quality product, and most of the code in that gap has to do with relatively mundane issues like error checking/error reporting, monitoring tools/APIs, lots of polish, edge case handling, etc.
It's a lot of fun to get into the guts of the system, but it's fairly large, so it's a non-trivial undertaking. If you do decide to do it, we'd love to help you out on IRC (#rethinkdb on freenode), and would appreciate if you documented your experience so we could make the process easier for others in the community!
Coming from CouchDB, support for attachments (=binary data) was the only thing I was missing.
Eh, update. After looking back in my terminal window when I wrote that sentence, it seems this is already done. All I can say is: :o
Advancing through versions from the early days back in 1.2 this has of course been one annoyance. Just want to say to the team: awesome job!
Thanks again
Congratulations to the team