
RethinkDB 2.0 is amazing - TheMissingPiece
http://rob.conery.io/2015/04/17/rethinkdb-2-0-is-amazing/
======
dmgbrn
MongoDB has just done so much to erode my trust in novel databases. My knee
jerk reaction is always "NOPE stickin with Postgres!". So I'm going to hold
off on checking this one out, even though it seems from the comments that it's
avoided many of Mongo's horrible design flaws.

Just my 2 cents of Mongo hate :-)

~~~
mrinterweb
I realize it is popular these days to hate on Mongo, but the FUD is getting a
bit old.

~~~
danbmil99
really, the MongoDB haters are pathological at this point. 10gen must have
really pissed off the HN crowd early on (I missed that cycle) but today, in
the real world, mongo is a useful tool for what it does best. It's time to
move on from early impressions and angst about their hype fails, and give them
a few crumbs of credit for being the defacto leader in a new space, and
working through the inevitable rough patches.

~~~
gasping
I don't think you understand how badly 10gen overmarketed Mongo as something
that it isn't. I personally believe the people at 10gen deserve legal
repercussions (I expect we'll see this in the coming years), even
incarceration for the pure lies they spouted that cost companies so much.
MongoDB is a trojan horse, a trap, completely incapable of serving any real-
world need. If someone thinks MongoDB is working from them, they just don't
realize yet how it's subtly broken.

~~~
threeseed
Sorry have you just woken up and missed the last 20 years ?

Almost every single IT company exaggerates claims, says their product is "the
best" and "amazing" and suitable for every use case under the sun. Oracle did
it. Microsoft did it. Mongo did it. And thousands of companies in the future
will do it in the future. It's called Marketing.

And I think you should speak to all these customers
([http://www.mongodb.com/who-uses-mongodb](http://www.mongodb.com/who-uses-
mongodb)) and tell them they don't serve any real world need. I would imagine
a few would ask the same question of you.

~~~
ryanlol
I think "ORGANIZATIONS CREATING APPLICATIONS NEVER BEFORE POSSIBLE" about sums
it up on their "who uses" page... There's nothing in particular that mongo
does better than it's competitors.

------
army
'When you query with ReQL you tack on functions and “compose” your data, with
SQL you tell the query engine the steps necessary (aka prescribe) to return
your data:'

... what? ReQL and SQL are both declarative query languages: I don't really
see the author is getting at. Is there an implication that SQL isn't
declarative?

The only real difference is that the API is based around chaining function
calls rather than expressing what is needed as a string - there are many SQL
query builder APIs that will let you build SQL queries by chaining together
function calls.

~~~
TylerE
Let me give you an arbitrary, unknown sql string in a variable `s`, and I'll
do the same with a ReQL query.

The challenge is to make sure the column/field `age` is more than 20.

My code is:

    
    
       query.filter(r.row['age'] > 20)
    

What's yours? (Hint: start by writing a compliant SQL parser)

~~~
joevandyk
using ActiveRecord:

    
    
        query.where('age > ?', 20)
    

If I'm understanding you correctly.

~~~
TylerE
That's moving the goalposts. The original challenge was take an arbitrary SQL
query stored in a string.

~~~
scott_s
I believe army's point was that when using an SQL query builder API, one does
not _start_ with a string, but something which allows them to do a similar
check that you showed.

I'm also not sure how your comment replies to army's point. The point, as I
understood it, is that it is not accurate to characterize SQL queries as steps
that tell the engine what to do. SQL is declarative, and leaves the execution
plan up to the database itself. army's comments about the API and strings were
trying to point out the only perceived difference, which is not relevant to
the question of declarative versus imperative.

------
jfroma
There is some FUD in this blogpost as well as in the comments in this thread.

I think the current status quo for databases is canned software. And this
isn't necessarily bad because neither of the three databases mentioned hide
their specs or default settings, the three have very good docs and community
willing to help, in addition to companies giving commercial support. Whats
your excuse to misuse these products?

RethinkDB writes your data to disk before acknowledging the write but on the
other hand can't elect a new primary in case of failure, two completely
different features/limitations that might work for someone and not for other
ones. Is that hard to understand? Did mongo documentation lie you at some
point?

Accept that you are "buying" a general purpose product, the designers thought
that their users will need those features, deal with it.

Otherwise build your own database, I know this might sound very hard but I
guess in the future we will see smaller building blocks that let you build
something that handle your needs like this:

[https://github.com/rvagg/node-
levelup/wiki/Modules#plugins](https://github.com/rvagg/node-
levelup/wiki/Modules#plugins)

~~~
NhanH
I was just thinking about this issue in the last few days. I'm working on a
side project, due to the nature of the data model, converting back and forth
to fit into a relational database is kind of annoying, so I was looking around
for other databases.

Right now, the situation with database is that we have to convert our internal
data structure into a representation that fit the data model of the database
we're using (ie rows for relational, document/key for the NoSQL group). I can
see the reason the data model has to be that way for scaling, distributed
etc... But if I'm happy to scale my database up, and would prefer to have the
database storing the data as close to the memory data structure as possible
(similar to object databases -- albeit with a boarder definition of "object"),
is there any database that could do that?

Otherwise, is there any suggestion on how I could get started to build one?

~~~
mrkurt
Redis is good at storing various data structures. Sets, sorted sets, hashes,
etc. As long as "scaling up" means adding memory it's good.

------
j4mie
It's pretty amusing that "it writes your data to disk before acknowledging the
write" is something that has to be described as "impressive" and written in
bold text when talking about a _database_. MongoDB really has lowered the bar.

That said, I love the look of Rethink and I can't wait to give it a try.

~~~
reqres
There's a lot of FUD going around when it comes to MongoDB write durability.
Please read the manual.

Mongo lets the user decide whether or not to wait for fsync when writing to an
individual node. This is _not_ the default configuration. If you want it, you
can enable it. You may complain that Mongo has bad defaults for your
particular use case. It continues to have bad defaults to this day. Saying
Mongodb is unable to acknowledge writes to disk is pure FUD.

Let the downvotes ensue.

~~~
eloff
It's like if MySQL shipped with libeatmydata configured by default. The
defaults should be safe. Mongo made not just a bad choice, but a really
idiotic decision to make their default configuration non durable.

~~~
omni
> The defaults should be safe.

That's one opinion fitting one set of use cases. There are plenty of use cases
where speed is more important than durability.

Hell, Redis default configs don't enable the append-only log, but you don't
see the HN hate train jumping all over Redis. This is because Redis use cases
typically don't require that level of durability.

edit for source: cmd+f for "appendonly"
[https://raw.githubusercontent.com/antirez/redis/2.8/redis.co...](https://raw.githubusercontent.com/antirez/redis/2.8/redis.conf)

~~~
eloff
Redis doesn't market itself as a general purpose database, more as an advanced
memcached, which is why those make sense. People who value performance over
durability can of course change the setting, being aware of what they are
getting into. That's very different from someone who doesn't realize that just
because his database seems to save his data doesn't mean it won't eat it
tomorrow because he didn't know to change the configuration. I stand by my
judgment of hopelessly stupid.

------
pluma
The API syntax isn't _that_ special. The ArangoDB Query Builder (aqb on npm)
for example is even more straightforward (no functions needed):

    
    
        a.for("album").in("catalog").filter(
          a.eq("album.details.media_type_id", 2)
        ).return("album")
    

Or in plain AQL (ArangoDB's query language):

    
    
        FOR album IN catalog
        FILTER album.details.media_type_id == 2
        RETURN album
    

The "map" in the second example is simpler, too:

    
    
       ….return({artist: 'album.vendor.name'})
    

Or in plain AQL:

    
    
       … RETURN {artist: album.vendor.name}
    

Also, it doesn't really need drivers because the DB uses a REST API that works
with any HTTP client.

That said, the change feeds are pretty neat and RethinkDB is still a pretty
exciting project to follow.

(Full disclosure: I wrote the ArangoDB Query Builder without any prior
exposure to ReQL, so I may be biased)

~~~
coffeemug
You don't actually need to use functions in ReQL either (although you can).
For example

    
    
      r.table('users').filter(function(row) {
        return row('age').gt(30);
      })
    

Could be expressed as:

    
    
      r.table('users').filter(r.row('age').gt(30))
    

That being said aqb looks pretty cool and quite similar to ReQL.

~~~
pluma
Neat. I actually prefer the "infix" style for operators (i.e. having the
methods on the values instead of on the helper) and I'll see whether I can
adjust AQB to support that.

------
orthecreedence
I can echo this post. I've been using Rethink for a few years now on side
projects (as well as maintaining a driver, even if I skip a few server
versions here and there...but these guys move fast).

The composable queries alone are enough to make any developer happy. You can
pretty much treat your data as if it's in-memory because the drivers integrate
so well with the language. The relational model works really well.

Things I have not tried yet are clustering and the real-time support (still
need to build this into the lisp driver) but I'm trying to slot some time to
do this. One of the projects I'm working on
([https://turtl.it](https://turtl.it)) is going through a nice upgrade to
mobile right now, and this will include some server changes...I'm looking
forward to implementing changefeeds to solidify the collaboration aspect.

Overall I've been really impressed with Rethink over the years, and can't
express how excited I am they hit production ready. On top of the DB being
great, the team is really nice to work with. They are incredibly responsive on
github and were really helpful when I was first starting to build out my
driver.

Great post, and congrats to the Rethink team!

------
beefsack
Have used RethinkDB with a few projects now, mainly in Go with dancannon's Go
driver[1], and have found it very functional and robust and has become my go-
to schemaless database.

My largest project has been running a couple of years now and has accumulated
a significant amount of data, and RethinkDB hasn't had any trouble at all
scaling with my data growth. I'm running it on servers below the recommended
requirements too (512MB DO instances) and have been really impressed with how
it handles constrained resources.

[1]
[https://github.com/dancannon/gorethink](https://github.com/dancannon/gorethink)

------
shockzzz
"RethinkDB is interesting" \- absolutely

"RethinkDB is amazing" \- TBD

I don't even think Slava would call RethinkDB "amazing" yet. I have no idea
how to make a database, but I know there's a lot of work - and even more trial
and error - that goes into making one "amazing."

This is certainly a big step for RethinkDB. But I'd be careful to put
Petabytes of data across 200 nodes sharded 500 ways each.

------
hoodoof
There a common form of such posts by developers: "I've found database X and I
LOVE it, we're migrating all our systems." Then a year later "Things didn't
work out, here's how we migrated from database X to database Y."

Someone should make an index of such blog posts.

------
StevePerkins
Interesting that Wikipedia has no entry for RethinkDB.

I do see that RethinkDB has some "Overview" and "FAQ" links on its website.
However, when I encounter a new technology, I like to read its Wikipedia entry
first. Wikipedia is usually more impartial, informative, and actually makes it
easier to get a high-level sense of a technology than the tech's own website
in most cases. This has grown more and more true over the past five or so
years, as even developer-facing websites have devolved into "startup-y"
marketing nonsense.

I wonder if there WAS a Wikipedia entry, but it's been deleted by some
moderator with an axe to grind? I personally haven't contributed in years due
to how unpleasant it is to add new content through all of the Wiki-lawyering.
I've also noticed that 5 years ago, when you did a Google search you could
rely on the Wikipedia entry being one of the top 2 or 3 results. Lately I see
more and more instances where I have to scroll to the second or third pages of
results to see a Wikipedia link.

Anyhoo... apologies for the tangential aside. I'm just wondering whether the
lack of a Wikipedia entry says more about RethinkDB or about Wikipedia?

~~~
coffeemug
Slava @ Rethink here. There used to be a few Wikipedia articles that kept
getting deleted. I don't really understand the Wikipedia guidelines on this,
but I don't worry about it too much. As RethinkDB grows the article will get
added back, and it will get harder to make an argument that it should be
deleted.

~~~
tptacek
There should be zero trouble getting a RethinkDB article written now, because
it takes all of 5 seconds with NEWS.GOOGLE.COM to find reliable sources to
back a notability claim.

I can't find evidence of a deleted Rethink article in Wikipedia, but didn't
look hard.

~~~
pests
Its listed right on the article's page:

[https://en.wikipedia.org/wiki/RethinkDB](https://en.wikipedia.org/wiki/RethinkDB)

Reason:
[https://en.wikipedia.org/wiki/Wikipedia:Criteria_for_speedy_...](https://en.wikipedia.org/wiki/Wikipedia:Criteria_for_speedy_deletion#G11)
(G11. Unambiguous advertising or promotion)

~~~
tptacek
Weird, I tried searching and didn't get it (or the warning not to create a new
page for it).

Is there an archived copy of the original page? It's probably best to start
with a stub page that contains no advocacy for Rethink and minimal
information, and then grow it over time.

------
BringTheTanks
> Not earth-shattering, but with ReQL all I need to do is attach a function

Thing is, some SQL databases have columnar storage, and in there selecting
everything, then filtering with an attached function would eliminate the
performance benefit of not selecting all of the fields.

This is why SELECT looks like it does. Not to mention it's much shorter than
attaching a function for the purpose.

The author also himself acknowledges that:

> The downside is that your queries end up quite long and, for some, rather
> intimidating.

Ok so they're "quite long" and have less potential for optimizing the
performance of. Amazing?

His example of creating specific indexes and views is also not new to SQL.

> There are 3 official drivers: Python, Ruby and Node.

Amazing?

> The query itself didn’t change at all – I could copy and paste it right in.
> I had to wrap it with connection info and a run() function, but that’s it.

So just like an SQL query, except I can connect to an SQL RDBMS from virtually
any language I can think of, and not just a narrow selection of 3 script
languages.

I sympathize with author's excitement, but from all his examples SQL feels
like it has quite an edge both in availability and in terms of design and fit
for the domain than a bunch of JS functions composed together (as much as I
like composing functions together in JS).

I realize how much hard work the folks at RethinkDB have put into creating
their product. But technology adoption is not driven by pity, it's driven by
benefits. For a new type of DB to not be a flash in the pan it needs a lot
more than being "stable and fast". It needs to offer _significant additional
benefits_ when compared to existing DBs. And I ain't seeing it.

~~~
army
Do you know for sure that RethinkDB can't work out what columns are being
filtered by a function? In the examples it would certainly be possible with
some analysis.

~~~
BringTheTanks
It can't work them out because you compose the query in a third party
scripting language.

RethinkDB has no access to the structure of the source in order to analyze it
statically and work out an optimal I/O read plan. It interacts with the
language runtime by providing an API and receiving callbacks to the API from
the runtime.

SQL is parsed & analyzed statically at the server, a plan is created based on
that analysis and executed. So with SQL it is possible to do so.

With RethinkDB you compose your query in the script, basically, and all of the
optimization opportunities end with the exposed API (no function source
analysis).

It's not impossible to redesign the API to provide or even mandate static
details like requested fields to RethinkDB, and it has a bit of that, but it
allows freely mixing in client-side logic and even OP is confused about what
it means to have a client-side mapping function.

If they would allow complex expressions to run on the server, it'd become
quite verbose to compose that via an API in an introspective way, to the point
it'd warrant a DSL in a string... and we're back to SQL again.

~~~
turtle4
I don't think that's true. From what I perused of the driver implementations,
I think that as calls are made, the driver basically builds an AST up, and
then when you call run() it compacts it and sends it over to the DB. ie, when
you call filter() you aren't actually filtering, you're adding a filter
operation to the AST.

I would think that would allow Rethink to analyze the structure of the query
and perform appropriate optimizations.

~~~
BringTheTanks
I'm talking about map(), and you're talking about filter().

Here's the code in question:

    
    
      .map(function(album){
        return {artist : album("vendor")("name")}
      })
    

If this is simply adding a node to an AST, it could be expressed without a
function:

    
    
      .map({artist : ['album','vendor','name']})
    

Using a function for this would be quite superfluous.

~~~
coffeemug
You can express it both ways in RethinkDB, and they'd both do the same thing
-- add a node to the AST. The function is just a convenience syntax.

------
abhididdigi
Along with all of this, the team behind rethink DB is really very helpful.
Team was always patient when I was new. They always helped. This is one the
very few projects that I felt right at home. Rethink DB had(during the days I
was trying to use IRC) atleast one core developer available on IRC every day
from Monday to Friday. Congratulations team!

------
mosselman
So I have a question for you all. But first a little background. I have been
playing with PouchDB, an in-the-browser implementation of CouchDB that is
mostly compatible with CouchDB. What I really like is its sync function, this
sets up no-brainer practically real-time sync between my local (offline)
PouchDB database. It is very cool!

I am very impressed by RethinkDB's cluster management, etc, so I would like to
explore it as an option, but is there an easy way to sync my offline (browser
based) localstorage-like database to rethink and back again? PouchDB makes
this dead easy.

~~~
coffeemug
There isn't a good way to do that yet. We've been playing with some ideas, but
offline sync like this is a surprisingly challenging problem -- it's easy to
make something that works, but dramatically harder to make something that
works at scale.

~~~
mosselman
I can imagine that. I have seen some sync implementations for Backbone.js for
instance a while back, but nothing that really worked well. Again, I am very
surprised of how well PouchDB performs in this. Additionally, you get all
(most) the features of CouchDB in the browser, you can even use the design
documents that you create on the server.

------
Ciantic
I can't imagine using RethinkDB until the query language ensures type safety.
The article touts about SQL being full of strings, but ironically there are
fully typed query builders for SQL but not for RethinkDB. All DB tables has
schema even though it's not listed anywhere, and schemaless databases can't
have fully typed query language either.

~~~
coffeemug
Many core RethinkDB developers are huge fans of type safety. Check out the
RethinkDB Haskell driver ([https://github.com/atnnn/haskell-
rethinkdb](https://github.com/atnnn/haskell-rethinkdb)), and the .NET driver
([https://github.com/mfenniak/rethinkdb-
net](https://github.com/mfenniak/rethinkdb-net)). ReQL works _really_ nicely
with type safety (and will work even better when we let people declare
optional schemas).

~~~
wereHamster
Check out my Haskell driver ([https://github.com/wereHamster/rethinkdb-client-
driver](https://github.com/wereHamster/rethinkdb-client-driver)). I think
think the first paragraph of the readme describes the differences between my
driver and atnnn's quite nicely:

> It differs from the other driver (rethinkdb) in that it uses advanced
> Haskell magic to properly type the terms, queries and responses.

For example the driver knows that this query returns a number, and tries to
parse it as such:

    
    
        call2 (lift (+)) (lift 1) (lift 2)
    

Here are a few more examples from my application:

    
    
        -- | The primary key in all our documents is the default "id".
        primaryKeyField :: Text
        primaryKeyField = "id"
    
        -- | Expression which represents the primary key field.
        primaryKeyFieldE :: Exp Text
        primaryKeyFieldE = lift primaryKeyField
    
        -- | Expression which represents the value of a field inside of an Object.
        objectFieldE :: (IsDatum a) => Text -> Exp Object -> Exp a
        objectFieldE field obj = GetField (lift field) obj
    
        -- | True if the object field matches the given value.
        objectFieldEqE :: (ToDatum a) => Text -> a -> Exp Object -> Exp Bool
        objectFieldEqE field value obj = Eq
            (objectFieldE field obj :: Exp Datum)
            (lift $ toDatum value)
    
        -- | True if the object's primary key matches the given string.
        primaryKeyEqE :: Text -> Exp Object -> Exp Bool
        primaryKeyEqE = objectFieldEqE primaryKeyField
    
    

My driver doesn't include all commands of the query language, just those which
I need in my product. And I haven't tested it with RethinkDB 2.0 yet.

~~~
pka
Still, you are supplying the record fields to match on as T.Text. Check out
[1] for a type-safer approach. I've been working on a typed expression builder
for just this purpose, but due to lack of time haven't been able to finish it
yet [2].

[1] [http://hackage.haskell.org/package/structured-
mongoDB-0.3](http://hackage.haskell.org/package/structured-mongoDB-0.3) [2]
[https://github.com/pkamenarsky/typesafe-
query](https://github.com/pkamenarsky/typesafe-query)

------
Scarbutt
I'm sure there are use cases where both RethinkDB and Postgresql can equally
provide a solution to some problem, but is it fair to compare them so blindly
where one has ACID guarantees and the other one does not?

~~~
robconery
OP here - I wanted to offer a comparison of _the SQL_ vs. the ReQL query.
Indeed if ACID is something you need, then yes a horizontally-scaling DB is
probably something that deserves longer thought.

This is a broader discussion to be sure, and it's been had. Given that PG now
supports jsonb, it does mean that yes, we get to have these discussions more.

------
DennisP
Realtime update notifications, official node.js API...sounds like it'd be
perfect as a second back end for Meteor.

~~~
natebrennand
There's been some talk of it but they haven't committed to anything.

[https://groups.google.com/forum/#!searchin/rethinkdb/meteor/...](https://groups.google.com/forum/#!searchin/rethinkdb/meteor/rethinkdb/XnzavMQvkO0/QJrHEP1Za9gJ)

------
zak_mc_kracken
It's a bit worrisome that there are no official Java drivers and the only
unofficial Java project has been abandoned by its only author because he no
longer uses Rethink.

~~~
danielmewes
Daniel @ RethinkDB here. We're going to ship an official Java driver very
soon. We decided to focus on a small number of core drivers first while the
protocol and query language were still undergoing rapid extension. Now that
the protocol is stable, we're going to expand our official driver support step
by step. The Java one will be first.

You can follow the progress on
[https://github.com/rethinkdb/rethinkdb/issues/3930](https://github.com/rethinkdb/rethinkdb/issues/3930)

~~~
e2e4
Thats great news. I love RethinkDB; but not having a Java driver made it a no-
go for a couple of projects.

------
pbz
What do you guys think of Aerospike
([http://www.aerospike.com/](http://www.aerospike.com/))? I heard of a few
cases that used it successfully. Any issues with it?

~~~
chupy
Aerospike - distributed key value store has a little bit different of a use
case than RethinkDB - distributed JSON document databases. Basically the only
valid use that I have seen for Aerospike, and that is the one that they are
advertising is a distributed key value profile store for Ad-tech or marketing
companies
([http://www.aerospike.com/overview/](http://www.aerospike.com/overview/)).
Keep in mind that to actually use all of Aerospike's features , especially the
one they are really proud about - the cross datacenter replication - you need
the commercial license.

So..I suggest you figure out what your requirements are and then use the best
tool for the job.

~~~
bbulkow
CTO at Aerospike here.

Aerospike is battle-tested in large deployments --- ad-tech, marketing-tech, a
few new ones in telecom and fin-serv. Pushing huge load with very, very little
downtime. That's what we're the most proud of --- and I'm proud that we're
able to offer this killer codebase as open source, after being closed source
for the first few years of the company.

Most applications have a huge core of key-value --- twitter, for example ---
and need a fast and scalable key-value component. You can start with a single
server (on your laptop with Vagrant) and scale up later.

We're adding more types, more cool operations, more indexes this year.

The fact that Aerospike has a basic query system, type safety, flash
optimization (Amazon has switched over to being very SSD/Flash centric)
support for every language under the sun (three contributed Scala layers ---
and we see a lot of Go use as well as the usual Java / Node / Python / PHP /
HHVM), Hadoop integration....

------
rdudekul
Here is OP's TekpubTV video on RethinkDB (2 years old):
[https://vimeo.com/60697270](https://vimeo.com/60697270)

~~~
junto
Rob Conery always blows my mind. I came across him years ago when he used to
evangelise .net stuff for MS. He wrote a great ORM with dB migrations that was
completely novel for me at the time. He seems to be a complete polyglot and
seems to he able to switch between so many different platforms, languages and
technologies without any problems. Much respect!

------
timmaxw
Note that the 9ms performance claim in this article is mistaken. The author
has issued a correction: [http://rob.conery.io/2015/04/17/rethinkdb-2-0-is-
amazing/](http://rob.conery.io/2015/04/17/rethinkdb-2-0-is-amazing/)

------
peterbe
I added a RethinkDB benchmark when used with the Python Tornado web server:
[http://www.peterbe.com/plog/fastestdb](http://www.peterbe.com/plog/fastestdb)
Scroll down for the update.

~~~
danielmewes
Note that (according to the linked commits), RethinkDB is using what we call
"hard" durability in this comparison. This is our default to ensure maximum
data safety.

Hard durability means that every individual write will wait for the data to be
written to disk before the next one is run (in this benchmark, since it only
does one at a time).

I don't think any of the other databases in this test is using a similarly
strict requirement, are they?

You'd have to run with the currently commented line
"rethinkdb.db('talks').table_create('talks', durability='soft').run(conn)" to
get more comparable results.

(Edit for clarification: `durability='soft'` is comparable to the `safe` flag
in many of the MongoDB drivers. It means that the server will acknowledge each
write when it has been applied, but not wait for disk writes to complete.)

------
DonnyV
I was interested in RethinkDB when I read the 2.0 release. But after looking
at that mess he had to do to write a simple query. No thanks, I'll stick with
Mongodb.

    
    
       db.catalog.find({ 'details.media_type_id': 2 })

~~~
SamReidHughes
What do you do when a document has a period in its key?

~~~
justrudd
Restrictions on Field Names Field names cannot contain dots (i.e. .) or null
characters, and they must not start with a dollar sign

[http://docs.mongodb.org/manual/reference/limits/#Restriction...](http://docs.mongodb.org/manual/reference/limits/#Restrictions-
on-Field-Names)

------
eternalban
SQL is not "a set of arbitrary commands put together into a string". It is a
bit ungainly and irregular in parts. It needs improvements[1].

Haskell (or F# or any FPL) are, of course and obviously, a perfect fit as
front end for a relational system.

[1]: [http://www.thethirdmanifesto.com](http://www.thethirdmanifesto.com)

------
nawariata
Does Rethink store keys with every record or uses more efficient mechanism?

~~~
mrits
While you could technically use JSON to have a more efficient storage I think
it safe to assume they use Key/Value.

[http://rethinkdb.com/docs/comparison-
tables/](http://rethinkdb.com/docs/comparison-tables/)

I can't believe new databases are still using this model. Some of my data
storage would be 90% keys and 10% data as JSON.

------
sanguy
The concern I have is that RethinkDB announced their death and vanished for 9+
months leaving everyone in a lurch, before resurfacing. The way they abandoned
their users was deplorable so why trust them again? If you are into S&M just
buy Oracle licenses...

~~~
coffeemug
Slava @ Rethink here.

I'm not entirely sure what you're referring to, but the closest I can think of
is the move from the memcached interface in 1.1 to the ReQL interface in 1.2.
If that's what you mean, I don't think it's fair to say we abandoned our users
at all.

The memcached interface had _very_ few people using it (literally single
digits). We tried really hard to make it work, but there just wasn't any
demand, so we decided to add a full query language, clustering, and rebuild
with the realtime architecture. We supported the binary for a while, and
helped most of the users migrate from the memcached interface to ReQL (which
was fairly easy).

We also helped people migrate to other memcached alternatives if they chose to
not to use ReQL. In almost all cases people could quite literally pick another
compatible product without changing any of their code.

We took our time, helped people migrate (either to the newer version of
RethinkDB, or to other products), and integrated the original architecture and
as much of the code as we could into the new and improved RethinkDB. All of
this was completely free of charge.

So respectfully, I really don't think you're being fair to us. I'm sorry if
this inconvenienced your company, but given the dire circumstances at the time
we really did the best we could (and arguably, much, much more than most
companies do in those circumstances).

------
dcre
I imagine the One Direction reference will be lost on most readers.

------
WorldWideWayne
All of the ReQL examples are completely unreadable relative to SQL.

Call it declarative, format it however you want - a purpose-built DSL like SQL
is always going to be easier to grok than a Javascript-inspired functional
language (for me at least).

~~~
TylerE
It's not a "javascript inspired language". It's the language you're _using_.
If you're using Rethink from Python, you write your queries in Python, etc.

See, for instance,
[http://rethinkdb.com/api/python/](http://rethinkdb.com/api/python/)

(You can easily translate most doc pages to the language of your choice using
the links at the top of each page.

~~~
rco8786
So, they're just shipping supported ORMs in multiple languages.

~~~
pests
Its not an "ORM" though and ReQL _is the language_.

~~~
lmm
How can you say it's "the language" if it's different from one language to
another?

