Questions tagged [rethinkdb]

RethinkDB is a scalable, open-source, distributed database system built to store JSON documents. It features a query language that has useful queries like table joins and group by, a highly parallelized architecture, and web tools for managing clusters.

RethinkDB is a scalable, open-source, distributed database system built to store JSON documents. It features a query language that has useful queries like table joins and group by, a highly parallelized architecture, and web tools for managing clusters.

Programming model:

  • JSON data model and immediate consistency
  • Distributed joins, subqueries, aggregation, atomic updates
  • Hadoop-style map/reduce
  • Secondary, compound, and arbitrarily computed indexes.

Administration:

  • Web and command-line adminstration tools
  • Tools to handle machine failure and network interrupts
  • Multi-datacenter replication and failover

Scalability:

  • Sharding and replication to multiple nodes
  • Automatically parallelized and distributed queries
  • Lock-free operation via MVCC concurrency

Useful Links:

Books:

1436 questions
4
votes
1 answer

Limit nested objects results in rethinkdb query

I would like to limit the number of nested objects inside a Rethinkdb query. Suppose I have conversations with nested messages. [conversations] [{ id: "fgh675", name: "Some conversation", messages: [{ id:"jhu432", …
Romain Bruckert
  • 2,546
  • 31
  • 50
4
votes
0 answers

rethinkdb match inside an array

I have a table called 'conditions' which contains JSON documents structured as such: { "keyA": "valueA", "keyB": "valueB", "symptoms": ["foobar", "bar", "cough", "itch"] } I simply would like to execute a query which returns all documents that…
vderelle
  • 41
  • 4
4
votes
2 answers

RethinkDB / Horizon: Integration with Express: Access Horizon data server-side?

There is an example of express integration on the Horizon.io Github as shown here: Horizon express server example I understand what this example is showing: if you have an existing Express server you can add a horizon server, which exposes a route…
JEDev
  • 43
  • 4
4
votes
1 answer

Rethinkdb predicate function 'contains' for multiple values not working

I have a data schema that looks like this: { "datetime": "1453845345493", "someIds": ["id2000-4", "id1000-34"] } Where the array someIds can contain many different values. Filtering based on one id using the following query works without issue…
Brideau
  • 4,564
  • 4
  • 24
  • 33
4
votes
1 answer

Will mapping in RethinkDB compute the same thing multiple times for same value?

I am using RethinkDB Java driver and wanted to computer Mean Deviation for every value of a particular field. So, I wrote this code: public static ReqlExpr avgdev(ReqlExpr expr, String field) { return expr.map( entry ->…
Chetan Bhasin
  • 3,503
  • 1
  • 23
  • 36
4
votes
1 answer

How to delete an element in an array with RethinkDB

I have a table that contains Lobbys which are essentially just Party Rooms, it has a Members array and a Messages array, this is an example: { "id": "a77be9ff-e10f-41c1-8a4c-66b5a55d823c" , "members": [ "Gacnt" , "Gacnt" , "Gacnt" , "Gacnt"…
Datsik
  • 14,453
  • 14
  • 80
  • 121
4
votes
0 answers

rethinkdb google-compute-engine disconnects

Hi I run a rethinkdb setup on an google-compute-engine instance. I use mostly change feeds (socket connections) to the db and connect to these from my local computer or apps. to do this I use the npm packages rethinkdb-websocket-server and…
Stellan
  • 183
  • 11
4
votes
1 answer

Rethinkdb 2.2 changefeeds with include_initial

For the simplest example possible, let's say I'm pushing a list of my favorite foods to everyone who subscribes. r.table('food').changes().run(conn, (err, cursor) => { cursor.each((err, change) => { io.emit('NEW_FAVORITE', change); …
Matt K
  • 4,813
  • 4
  • 22
  • 35
4
votes
2 answers

How do I unsubscribe or change a changefeed in rethinkdb?

Is there a way to unsubscribe or change an existing changefeed observer in rethinkdb? Setting the return value of the changes() function to null doesn't seem to do anything, is there a unsubscribe() function? What I'd ideally like to do is change…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
4
votes
4 answers

Auto increment in Rethinkdb

Does RethinkDb support AUTO_INCREMENT on a integer column similar to AUTO_INCREMENT in Mysql. https://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
user462455
  • 12,838
  • 18
  • 65
  • 96
4
votes
1 answer

How to filter on array size in rethinkdb?

I have a table with a bunch of documents that are updated regularly (in part). What I'm essentially trying to do is create another table (called changes below) that stores the latest N changes to each of those documents. I'm thus doing…
pythonator
  • 384
  • 2
  • 12
4
votes
2 answers

Rethinkdb convert an array of objects to a single object

How would one convert the following: [{ "name": "annoying data", "status": "evil", "frustration": [ { "name": "foo", "value": 1 }, { "name": "bar", "value": 2 }, { "name": "baz", "value":…
scull7
  • 105
  • 1
  • 5
4
votes
1 answer

Clojure RethinkDB subscribe to a changefeed

I am using the Clojure driver for RethinkDB. I want to get change feeds from a query. Here is what I have so far : (defn change-feed [conn] (loop [changes (future (-> (r/db "mydb") (r/table "mytable") …
nha
  • 17,623
  • 13
  • 87
  • 133
4
votes
1 answer

Why RethinkDB's count operation is so slow?

I am trying to benchmarking task for some queries in RethinkDB. I really did not get good answer of a question Why RethinkDB's count() operation is so slow? I have a query with 2GB of data: r.db("2GB").table("table").between(40, r.maxval,…
Prakash Thapa
  • 1,285
  • 14
  • 27
4
votes
1 answer

MongoDB realtime query

I've heard about RethinkDB and since I'm developing a multi-player online game I think if MongoDB pushes the changes (let's say new rows) instead of pulling rows, it would be much faster for both server-side and client-side. Is there any wrapper or…
Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201