24 Nov 2012 01:03
ANNOUNCE: rethinkdb 0.1.0
Etienne Laurin <etienne <at> atnnn.com>
2012-11-24 00:03:28 GMT
2012-11-24 00:03:28 GMT
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
(Continue reading)
RSS Feed