bryan maass


Rethinkdb and Clojure

Bryan Maass

Clojurians Slack escherize
Twitter @escherize
Telegram @escherize


RethinkDB is an open source, scalable database that makes building (realtime) apps dramatically easier.

It uses a reactive paradigm which allows it to push updates to clients(!).

Query structure based on S-expressions.

No SQL database.

"Works great" - Jepsen

Excellent ops interface (programatic + web-based)

Call me Maybe

Call me Maybe (Jepsen) Results: "As far as I can ascertain, RethinkDB’s safety claims are accurate. You can lose updates if you write with anything less than majority, and see assorted read anomalies with single or outdated reads, but majority/majority appears linearizable." - aphyr by Chris Zhang

  • Uses awesome (mostly) data-first query dsl
  • Uses the official Java Client. - Connecting:

(use '
(def conn (connect {:host "localhost"
                    :port 28015})) - Create a table:

(run conn
    [[:db "test"]
     [:table-create "movies"]]) - Import a table from json over http:

(run conn
      [[:table "movies"]
       [:insert [:http ""]]]) - Query for the top movie:

(run conn
  [[:table "movies"]
   [:without "id"]
   [:filter {:rank 1}]])
;;=> [{:title "The Shawshank Redemption"
;;     :year 1994,
;;     :rating 9.2,
;;     :rank 1,
;;     :votes 1262930,}]

clj-rethinkdb Erik Strömberg

Uses the http api, and a function-based interface.

Demo Repo:

Created by Bryan Maass