[Haskell-cafe] ANNOUNCE: rethinkdb 0.1.0

Etienne Laurin etienne at atnnn.com
Sat Nov 24 01:03:28 CET 2012


Greetings,

I am pleased to announce a Haskell client library for RethinkDB[1].
RethinkDB[2] is a newly released, open source, distributed database.
Its simple yet powerful API seemed well suited to be accessed from a
language like Haskell. This haskell library is modelled upon the
existing Javascript and Python API and adds static type checking.

Here is an example from the RethinkDB javascript tutorial[3] ported to Haskell:

run h $ orderBy ["reduction"]
       . groupedMapReduce (! "Stname") mapF (0 :: NumberExpr) (R.+)
       . filter' filterF
       . pluck ["Stname", "POPESTIMATE2011", "Dem", "GOP"]
       . zip'
       $ eqJoin (table "county_stats") "Stname" (table "polls")

       where mapF doc = ((doc ! "POPESTIMATE2011") R.*
                             ((doc ! "GOP") R.- (doc ! "Dem"))) R./ (100 :: Int)
             filterF doc = let dem = doc ! "Dem" :: NumberExpr; gop =
doc ! "GOP" in
                               (dem R.< gop) `and'` ((gop R.- dem) R.<
(15::Int))

What is the advantage of RethinkDB? [4]

"What's really special about all RethinkDB queries is that the program
you wrote gets sent to the server, broken up into chunks, sent to
relevant shards, executed completely in parallel (to the degree that
the query makes possible -- complex queries often have multiple
parallelization and recombination stages), but as a user you don't
have to care about that at all. You just get the results.

[...]

Of course the visceral experience you get from using RethinkDB isn't
just about the query language, or parallelization, or pleasant client
libraries. It's about hundreds upon hundreds of examples like it, some
large, some small, that add up to a completely different product. The
team is fastidious about every command, every pixel, every algorithm,
sometimes even every assembly instruction, so that people can use the
product and at every step say `Wow, I can't believe how easy this was,
how do they do that?!!' "

I hope this library can help other Haskell programmers use this new database.

Etienne Laurin

[1] http://hackage.haskell.org/package/rethinkdb
[2] http://www.rethinkdb.com
[3] http://www.rethinkdb.com/docs/tutorials/elections/
[4] http://www.quora.com/RethinkDB/What-is-the-advantage-of-RethinkDB-over-MongoDB



More information about the Haskell-Cafe mailing list