Wrap your SQL Head Around RIAK & MAPREDUCE
summary
Riak exposes a MapReduce API that runs JavaScript or Erlang functions for low-latency queries (not long batch jobs), with built-ins like map_by_fields and react.reduce.sort to emulate SQL: select -> map, where -> map/keyfilters/search, order+limit -> reduce then reduce_limit. An example job computes top-5 friends-in-common by fanning out friend lists, sorting and limiting; it runs snappily and returns integer counts (examples shown: 84 and 266). Performance note: JavaScript vs Erlang matters and avoid full-bucket scans.
AI-written summary · about
chapters (16)
- 0:00Introduction and speaker intro
- 1:03What is Riak KV store
- 4:14MapReduce basics and use cases
- 7:26When not to use MapReduce
- 9:12Riak MapReduce features
- 13:30Simple MapReduce query example
- 15:20SQL to MapReduce: SELECT
- 16:49SQL to MapReduce: WHERE
- 19:40SQL to MapReduce: JOIN
- 21:27SQL to MapReduce: ORDER BY
- 22:32SQL to MapReduce: LIMIT
- 23:36SQL to MapReduce: GROUP BY
- 25:46Practical MapReduce example
- 31:25Running the example and results
- 32:28Best practices for MapReduce
- 33:33Resources and Q&A
