News for hackers. Stuff that matters.
Re:Try RethinkDB in your browser by ebbv on Friday February 22, 2013 @02:22PM (#5266143)
I don't understand how this is giving any advantages over the standard object interface.

How is:

> r.table('tv_shows').insert([{ name: 'Star Trek TNG', episodes: 178 }, { name: 'Battlestar Galactica', episodes: 75 }]).run()

Easier than:

> db['tv_shows'].push([{ name: 'Star Trek TNG', episodes: 178 }, { name: 'Battlestar Galactica', episodes: 75 }]);

Seems to me like a totally unnecessary abstraction which only adds complication and potential points of failure and bugs.

EDIT:

Ok never mind this does actually create a real database. From the demo it seemed like it was just creating a JSON object.

Re:Try RethinkDB in your browser by coffeemug on Friday February 22, 2013 @02:40PM (#5266253)
In the former case you're creating a query (similar to SQL insert) that puts data into the database. You can then take advantage of indexing, sharding, durability guarantees, caching, a specialized query language, and all the other benefits of a database system.

In the latter case you're creating a data structure in the host language (which of course is immensely useful, but completely different).

Re:Try RethinkDB in your browser by ebbv on Friday February 22, 2013 @03:02PM (#5266410)
My mistake, from the demo I thought this was just creating a JSON object, and there was no actual backend database.
Re:Try RethinkDB in your browser by coffeemug on Friday February 22, 2013 @03:06PM (#5266434)
Right. The demo implements the backend database in Javascript, so you can run real queries against it. (Still, the whole thing is confusing and I'll make it much, much better)

slava @ rethink -- I was responsible for the tutorial

Re:Try RethinkDB in your browser by alexpopescu on Friday February 22, 2013 @02:47PM (#5266291)
The main difference is what happens if you chain together multiple operations. Are these executed one by one (each resulting in a roundtrip to the database) or executed all at once (single roundtrip to the db).

As a side note, each programming language has its own idioms. We tried to bring the ReQL query to each language in a way that felt as close as possible to the host PL (as opposed to say SQL which you need to use it as it is; and that led to the hundreds or thousands of wrapper libraries/ORMs. etc).

alex @ rethinkdb