RethinkDB 2.1 beta: announcing automatic failover

RethinkDB 2.1 beta is now available for testing. Download it now!

The upcoming 2.1 release will introduce important improvements, including support for automatic failover. Although we’re still hard at work on the finishing touches that will make the new features ready for production use, the beta offers an opportunity to get an early look.

The 2.1 beta release is a culmination of over a year of development effort. It satisfies three major requirements:

  • If a primary replica fails, RethinkDB will automatically fail over to another replica without human intervention.
  • You can reshard your tables live with only a few seconds of unavailability when the server switches over a shard to a new server.
  • The RethinkDB administration API remains the same. You don’t need to learn anything to take advantage of the new features.

Automatic failover increases the reliability of RethinkDB clusters, reducing the risk of downtime when individual servers fail or drop out of the network. When a server with a primary shard experiences failure, the servers with remaining replicas elect an acting primary to take its place until the wayward server is either restored or permanently removed from the table configuration. As long as a majority of replicas remain operational to elect an acting primary, the loss of a primary shard will no longer compromise database availability.

Read the full post

Using PassportJS OAuth with RethinkDB

I’ve run into many people who have problems setting up authentication on their Node.js applications. Even with a library as great as Passport, it can be tough to setup authentication in your app. Yet, while it’s tempting to avoid it, authentication is essential for many types of applications.

In this short tutorial, we’ll go over how to set up a simple app that uses the OAuth standard and the Passport Node.js library for authentication. OAuth is an open standard that lets a user ‘secure and delegated access’ using an account from a major trusted site. Using OAuth, a developer can create an application that lets users sign in with their GitHub, Twitter, or Facebook accounts rather than forcing them to create yet another account. Passport is a developer-friendly abstraction for setting up OAuth authentication and supports many major companies out of the box. It takes away a lot of the boilerplate behind user authentication.

In this post, we’ll use a boilerplate repo to get all the hard parts of authentication out of the way. This is the easiest way to get started with Passport and OAuth! Users will be able to login, see their username and avatar, and logout. That’s it. By keeping the functionality of the app as simple as possible, we can focus on just the authentication.

Read the full post

Go driver for RethinkDB hits 1.0, production-ready

Dan Cannon’s GoRethink project provides a RethinkDB driver for the Go language. Earlier this week, Dan released GoRethink 1.0 and announced that the driver is now ready for use in production environments.

GoRethink is among the most popular and well-maintained third-party client drivers for RethinkDB. It supports the latest RethinkDB features while offering clean integration between ReQL and Go’s native syntax. In addition to standard driver functionality, GoRethink also includes a number of advanced features like connection pooling.

Read the full post

Getting started with RethinkDB and Python 3

This post originally appeared on Giant Flying Saucer, Chad Lung’s blog.

I’ve been keeping an eye on RethinkDB for a while now and recently began working with it. There is a lot to like about RethinkDB like the ability to easily cluster and scale your deployment but what I’m going to focus on today is something called Changefeeds. I’ll start this blog article off with installing a development server running RethinkDB and then move onto a quick tutorial. From there we will look at Changefeeds.

Like some of my other articles I’ve created a Github repo with the scripts needed to get a Vagrant instance running a single RethinkDB node. Simply go to the repo, clone it, and follow the instructions.

Once the Vagrant RethinkDB server is running you’ll want to create a Python 3 project folder to work out of. To see how I usually setup my project folders you can see this article.

Make sure to install the RethinkDB Python client (version 1.14 and above works with Python 3):

$ pip install rethinkdb

At this point I’ll assume you have your Vagrant based RethinkDB server running and Python 3 project set up. Let’s start with a real simple example to create a new database and a table to test with.

Read the full post

Hands-on with build realtime apps with less backend code

The developers at Hoxton One recently released deepstream, a new open source framework for realtime web application development. The framework, which is built with Node.js and, helps developers build frontend web applications that perform realtime updates while requiring minimal backend code.

The deepstream framework comes with a client library for the browser that lets the developer create and update data records on the fly. The client library relays updates to the server, which propagates the new data to other subscribed clients. The developer doesn’t have to write any specialized backend code to handle the changes or propagate the events.

The developers behind deepstream provide an optional RethinkDB data connector, which lets the framework use RethinkDB for data persistence. As the frontend client updates records, the deepstream backend stores the changes in RethinkDB documents.

Read the full post
prev Older posts