RethinkDB — The Real-Time Document Database
RethinkDB is an open-source document database that pushes query results to your application in real time. Build live dashboards and collaborative apps without polling.
Installation agent prête
Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.
npx -y tokrepo@latest install 147bedb5-399f-11f1-9bc6-00163e2b0d79 --target codexÀ exécuter après confirmation du plan en dry-run.
What it is
RethinkDB is an open-source document database designed for real-time applications. Unlike traditional databases where your application polls for changes, RethinkDB pushes updated query results to your application automatically using changefeeds.
Developers building live dashboards, collaborative editing tools, multiplayer features, or any application that needs instant data updates will benefit from RethinkDB's push-based architecture.
How it saves time or tokens
RethinkDB eliminates the polling pattern entirely. Instead of writing timer-based queries that check for updates every N seconds, you subscribe to a changefeed once and receive updates as they happen. This reduces both server load and application complexity. No more websocket middleware to bridge the gap between your database and your frontend.
How to use
- Install RethinkDB from the official packages or run it via Docker.
- Start the server and open the web admin UI at port 8080.
- Create a database and tables using the Data Explorer or the client driver.
- Subscribe to changefeeds in your application code.
import rethinkdb as r
conn = r.connect('localhost', 28015)
r.db('myapp').table('messages').changes().run(conn, callback=lambda change:
print(f'New change: {change}')
)
Example
A real-time chat application with RethinkDB requires minimal code. Insert a message into the messages table, and every connected client subscribed to the changefeed receives it instantly:
// Node.js client subscribing to changes
const r = require('rethinkdb');
const conn = await r.connect({ host: 'localhost', port: 28015 });
r.db('chat').table('messages').changes().run(conn, (err, cursor) => {
cursor.each((err, change) => console.log('New message:', change.new_val));
});
Related on TokRepo
- Database tools — Explore database tools and integrations
- Self-hosted tools — Other self-hosted infrastructure components
Common pitfalls
- RethinkDB's community maintenance status means fewer frequent releases. Evaluate long-term support needs.
- Changefeeds consume server resources proportional to the number of subscriptions. Monitor connection counts.
- The ReQL query language has a learning curve if you come from SQL or MongoDB backgrounds.
Questions fréquentes
RethinkDB is maintained by its open-source community after the original company shut down in 2016. The Linux Foundation hosts the project. Development continues but at a slower pace than commercially backed databases.
Changefeeds let you subscribe to a query. When any document matching the query is inserted, updated, or deleted, RethinkDB pushes the change to your client connection. This works on single tables, filtered queries, and even aggregations.
Yes. RethinkDB supports automatic sharding and replication across multiple nodes. You can add servers to a cluster and the database redistributes data automatically.
RethinkDB uses ReQL, a query language embedded in your programming language. ReQL calls are chainable method calls in Python, JavaScript, Ruby, and other supported drivers, making queries feel native to your code.
Both are document databases, but RethinkDB is built for real-time push via changefeeds, while MongoDB requires polling or Change Streams (added later). RethinkDB prioritizes developer experience for real-time use cases.
Sources citées (3)
- RethinkDB GitHub— RethinkDB pushes query results to applications in real time
- RethinkDB Documentation— Changefeeds enable real-time subscriptions on queries
- RethinkDB Blog— RethinkDB joined the Linux Foundation after the original company closed
En lien sur TokRepo
Fil de discussion
Actifs similaires
GUN — Decentralized Real-Time Graph Database
A peer-to-peer, decentralized graph database for building offline-first and real-time applications without a central server.
Apache Doris — Modern MPP Analytical Database for Real-Time Reporting
Apache Doris is a high-performance real-time analytical database. It combines MySQL-compatible SQL, sub-second query latency, and support for federated queries across data lakes, Hive, Iceberg, and Hudi — the open-source answer to Snowflake and BigQuery.
Meteor — Full-Stack JavaScript Platform for Real-Time Web Apps
Meteor is an open-source full-stack JavaScript platform for building web and mobile applications with real-time data synchronization out of the box.
Materialize — Streaming SQL Database for Real-Time Analytics
A streaming database that maintains always-up-to-date materialized views using standard SQL, powered by Timely Dataflow and Differential Dataflow engines.