- Open-source database for building realtime web applications
- NoSQL database that stores schemaless JSON documents
- Distributed database that is easy to scale
- High availability database with automatic failover and robust fault tolerance
RebirthDB is a community-developed fork of RethinkDB which was the first open-source scalable database built for realtime applications. It exposes a new database access model -- instead of polling for changes, the developer can tell the database to continuously push updated query results to applications in realtime. RebirthDB allows developers to build scalable realtime apps in a fraction of the time with less effort.
To install RebirthDB on your machine (only the amd64
/ x86_64
architecture is currently supported), run the following:
$ source /etc/lsb-release && echo "deb https://dl.bintray.com/rebirthdb/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rebirthdb.list
$ wget -qO- https://dl.bintray.com/rebirthdb/keys/pubkey.gpg | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install rebirthdb
sudo wget https://dl.bintray.com/rebirthdb/rpm/stable/centos/7/x86_64/rebirthdb.repo \
-O /etc/yum.repos.d/rebirthdb.repo
sudo yum install rebirthdb
Run the following command from your terminal:
$ rebirthdb
...
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on cluster addresses: 127.0.0.1, ::1
Listening on driver addresses: 127.0.0.1, ::1
Listening on http addresses: 127.0.0.1, ::1
...
Server ready ...
Point your browser to localhost:8080. You’ll see an administrative UI where you can control the cluster (which so far consists of one server), and play with the query language.
Click on the Data Explorer tab in the browser. You can manipulate data using JavaScript straight from your browser.
By default, RebirthDB creates a database named test
. Let’s create a table:
r.db('test').tableCreate('tv_shows')
Use the “Run” button or Shift+Enter to run the query. Now, let’s insert some JSON documents into the table:
r.table('tv_shows').insert([{ name: 'Star Trek TNG', episodes: 178 },
{ name: 'Battlestar Galactica', episodes: 75 }])
We’ve just inserted two rows into the tv_shows table. Let’s verify the number of rows inserted:
r.table('tv_shows').count()
Finally, let’s do a slightly more sophisticated query. Let’s find all shows with more than 100 episodes.
r.table('tv_shows').filter(r.row('episodes').gt(100))
As a result, we of course get the best science fiction show in existence.
Congratulations on your progress! Now check out the documentation of any of our drivers below to dive deeper.
- Elixir - rebirthdb-elixir
- Go - rebirthdb-go
- Haskell - rebirthdb-haskell
- Java - rebirthdb-java
- JavaScript - rebirthdb-js
- Lua - rebirthdb-lua
- PHP - rebirthdb-php
- Python - rebirthdb-python
- Ruby - rebirthdb-ruby
- Rust - rebirthdb-rs
- TypeScript - rebirthdb-ts
More detailed and updated documentation is coming soon!
First install some dependencies. For example, on Ubuntu or Debian:
sudo apt-get install build-essential protobuf-compiler python \
libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
libncurses5-dev libjemalloc-dev libssl-dev wget m4 g++
Generally, you will need
- GCC or Clang
- Protocol Buffers
- jemalloc
- Ncurses
- Boost
- Python 2
- libcurl
- libcrypto (OpenSSL)
- libssl-dev
Then, to build:
./configure --allow-fetch
# or run ./configure --allow-fetch CXX=clang++
make -j4
# or run make -j4 DEBUG=1
sudo make install
# or run ./build/debug_clang/rebirthdb
Find us at Spectrum and on Twitter. You can also report an issue.
RebirthDB is currently being developed by a growing and passionate community. We could use your help too! Check out our contributing guidelines to get started.
We keep a list of changes and feature explanations here.
-
The development of data compression and RebirthDB's new art is sponsored by AIDAX:
-
Our test infrastructure is sponsored by DigitalOcean: