Riak

Riak

Riak is:

  • A Database (“NoSQL”)
  • A distributed key/value store based on Amazon’s Dynamo
  • Written (primarily) in Erlang
  • Scalable distributed storage system

DATA: Buckets, Keys, Values

Riak organizes data into Buckets, Keys, and Values.

  • Values (or objects) are identifiable by a unique key, and each key/value pair is stored in a bucket (DHT).

Buckets are essentially a flat namespace in Riak and have little significance beyond their ability to allow the same key name to exist in multiple buckets and to provide some per-bucket configurability for things like replication factor and pre/post-commit hooks.

Versioning

Each update to a Riak object is tracked by a vector clock. Vector clocks determine causal ordering and detect conflicts in a distributed system.

  • Each time a key/value pair is created or updated, a vector clock is generated to keep track of each version and ensure that the proper value can be determined in the event that there are conflicting updates.

For resolving update conflicts on Riak objects:

  • Allow the last update to automatically “win”
  • Return both versions of the object to the client. This gives the client the opportunity to resolve the conflict on its own.

Riak Cluster

A Riak cluster is a 160-bit integer space (a ring of size 2160) which is divided into equally-sized partitions (DHT).

Data Replication

Replication is fundamental and automatic in Riak, providing security that the data will still be there if a node on the cluster goes down. All data stored in Riak will be replicated to a number of nodes in the cluster according to the n_val property set on the bucket.

It is based on the N,R,W dynamo values:

  • N= number of replicas to store (on distinct nodes)
  • R= number of replica responses needed for a successful read (specified per-request)
  • W= number of replica responses needed for a successful write (specified per-request)

Advantages:

  • A distributed key/value storage based on Dynamo.
  • N, R and W configurable values.
  • Support of pluggable back-end storage systems.

Disadvantage:

Riak aims on Availability, and Partition (failure) tolerance. The problem is the eventually consistency camp.

Volunteer Systems:

Riak could be applicable to the volunteer computing, but there should be defined the size of files that the volunteer computer system uses in order to pick a suitable backend storage.

decentralized_storage_systems/riak.txt · Last modified: 2012/04/23 00:56 by julia
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki