Rethinking temperature, sensors, and Raspberry Pi

Getting started on your first hardware project can be difficult. Luckily these days we have things like the Raspberry Pi. which put almost everything we need into a nice bundled package to get started on your first cool hardware project. Even better, the Raspberry Pi runs Rasbian, a variant of Debian, which makes it pretty familiar with those already comfortable with popular Linux distributions. The next step is to connect a sensor and it’s definitely easier than you think. But the question always remains, once I’m collecting my data, where will I store it and how do I easily setup some sort of notification service? In this post, I’ll tell you what you need to do to connect your first sensor, get RethinkDB going on your Raspberry Pi, and push that data to all your devices using PushBullet.

Read the full post

RethinkDB 2.1: high availability

Today we’re proud to announce RethinkDB 2.1 (Forbidden Planet). Download it now!

With over 200 enhancements and a major restructuring of the clustering layer to support high availability, this release is the culmination of over a year of development and many months of testing. The major features in RethinkDB 2.1 include:

  • Automatic failover – if a server fails or the cluster experiences a split-brain scenario, RethinkDB will automatically elect new servers and continue to operate without human intervention.
  • Always on – you can add and remove nodes from a live cluster without experiencing downtime.
  • Asynchronous APIs – asynchronous queries are now supported via EventMachine in Ruby and Twisted, Tornado, and asyncio frameworks in Python.
  • SSL access – official drivers now come with SSL support to make it easier to access RethinkDB clusters over the public internet.
  • More math commands – ReQL now supports more math operators including floor, ceil, and round.
Read the full post

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
prev Older posts