Day 3: Resolving Conflicts and Extending Riak

Today we delve into some of the edges of Riak. We’ve seen how Riak is a simple key-value database across a cluster of servers. When dealing with multiple nodes, data conflicts can occur, and sometimes we have to resolve them. Riak provides a mechanism to sort out which writes happened most recently by way of vector clocks and sibling resolution.

We’ll also see how we can validate incoming data by way of pre- and post-commit hooks. We’ll extend Riak into our own personal search engine with Riak search (with the SOLR interface) and faster queries with secondary indexing.

Resolving Conflicts with Vector Clocks

A vector clock[19] is a token that distributed systems like Riak use to keep the order ...

Get Seven Databases in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.