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
3
votes
1 answer

RethinkDB update transaction performance

I'm a newbie here and also newbie for rethinkdb. First of all, I'm sorry for my bad english and I have a questions about update transaction performance of rethinkdb. Im using Nodejs with Native JS API of rethinkdb. I need to handle with read file…
Pikachu
  • 31
  • 3
3
votes
1 answer

Should I explicitly close RethinkDB connections?

I'm a little hazy on how connections in RethinkDB work. I'm opening a new connection every time I execute queries without closing them once the queries finish. Is this a good practice? Or should I be explicitly closing connections once queries are…
wle8300.com
  • 2,588
  • 1
  • 23
  • 29
3
votes
2 answers

Create or append to an array in a rethinkdb document

How should we append an item to an array if the array exists, or create an array and insert to it. I tried the merge command but that doesn't allow merging arrays, only replacing…
anandaravindan
  • 2,401
  • 6
  • 25
  • 35
3
votes
1 answer

How can I do some matrix addition in rethinkDB?

So essentially I have this variable question[1] where question[1] is: [[1, 0, 0], [1, 0, 0], [0,1,0] ...] I want to be able to add them vertically so I get one array like so [1,0,0]+[1,0,0]=[2,0,0] + [0,1,0] = [2,1,0] + .... Additionally, the…
Brady Auen
  • 215
  • 3
  • 13
3
votes
0 answers

Authenticating app with koajs, passport using google oauth2

I am trying to use Google's sign in api using koa and passport. I'm creating a new GoogleStrategy and that seems to work fine my issue is in the routes I don't want to redirect the user just yet, I want to send some user's info from my DB to the…
3
votes
1 answer

Chain filter conditions dynamically

How to chain multiple conditions in RethinkDB? This is what I got right now and what works if I only pass live or sports as a parameter. As soon as I pass the live and sports parameter, sports obviously always overwrites the filter variable and the…
Chris
  • 4,255
  • 7
  • 42
  • 83
3
votes
2 answers

How do I query a document by a nested value in RethinkDB?

The ReThinkDB docs mention: Documents can be filtered in a variety of ways—ranges, nested values, boolean conditions, and the results of anonymous functions. Say I have: { name: 'Joe' orders: [ { id: 123456, date:…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
3
votes
1 answer

RethinkDB - Is this a valid optimistic locking implementation

I am trying out a lot of new ideas (DDD, Event Sourcing and CQRS) and evaluating RethinkDB as a potential data store for the Domain Events. In DDD, an aggregate is set of objects that work together to provide a specific behaviour. Each aggregate is…
3
votes
2 answers

RethinkDb changefeeds not working when including `.pluck`

I have a changefeed that works fine until I use the pluck() projection. If I use pluck, it doesn't pick up changes form inserts and deletes in my followers embedded collection. r.table('users') .getAll(name, {index: 'followers'}) …
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
3
votes
1 answer

Merge 2 arrays of objects subdocs based on id field

I have a M-N relation of users and teams & I'm trying to use a subdoc strategy instead of a standard 3-table SQL strategy. user = { id: 'user1', teams: [{'team1', roles: ['admin']}, {'team2', roles: ['editor']}] } team = { id: 'team1', …
Matt K
  • 4,813
  • 4
  • 22
  • 35
3
votes
1 answer

How to do 'getNearest' geospatial query in RethinkDB?

I was going through RethinkDB docs and found out about geospatial queries. So I thought, why not give it a try to build an UBER kind of database to get Drivers near a User. So here is how I approached: Creating the Customer and…
anmol-idf
  • 69
  • 6
3
votes
1 answer

Rethinkdb change feed only return the changes

I am using rethinkdbdash in Node js connecting to the rethinkdb. Using the below code I get the whole document that has been changed (old and new values). r.db(db).table('test') .changes() .run() .then(function(feed){ …
Big Skinny
  • 53
  • 7
3
votes
1 answer

How to create a parallel loop using aiohttp or asyncio in Python?

I would like to use rethinkdb .changes() feature to push some messages to users. The messages should send without any requests from the users. I am using rethinkdb with aiohttp and websockets. How it works: User sends message Server puts it into…
3
votes
1 answer

Filter items newer than 1 hour with RethinkDB and Python

I have a Python-script gathering some metrics and saving them to RethinkDB. I have also written a small Flask-application to display the data on a dashboard. Now I need to run a query to find all rows in a table newer than 1 hour. This is what I got…
liasis
  • 96
  • 8
3
votes
1 answer

How do i prevent duplicate records on rethinkdb using python

I want to only insert records on to a table if there arent previous records like for example i have a table users and i want to only add unique users with phone numbers {"name":"john smith", "Age":30 , "phone_number": "556"} if another user with…