distributed key-value stores- featuring riak

32
CSS LABS Distributed Key-Value Stores Featuring Riak

Upload: samof76

Post on 12-Nov-2014

3.937 views

Category:

Technology


4 download

DESCRIPTION

Distributed Key-Value stores are the new breed of Clustered databases for the Internet.

TRANSCRIPT

Page 1: Distributed Key-Value Stores- Featuring Riak

CSS LABS

Distributed Key-Value StoresFeaturing Riak

Page 2: Distributed Key-Value Stores- Featuring Riak

Story of a 5 Node ClusterStory of a 5 Node Cluster

Hi, i am qiak

Hi, i am piak

Hi, i am riak Hi, i am siak

Hi, i am tiak

Once upon time there were five nodes...

CSS LABS

... and they formed a Ring

Page 3: Distributed Key-Value Stores- Featuring Riak

Qiak, I willTake care.

Too drunk!

All is well! I am hit!

Siak! I amthere!

They together kept a lot of data...

Story of a 5 Node ClusterStory of a 5 Node Cluster

CSS LABS

... some shared, some not ...... they were always willing to cover up

Page 4: Distributed Key-Value Stores- Featuring Riak

Well, hello!

Hi Viak!

Great tohave you!

Ah! did youknow?

Guys! This isviak.

They were welcoming...

Hi, i am viak!

Story of a 5 Node ClusterStory of a 5 Node Cluster

CSS LABS

... they were together called Riak!

Page 5: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* Decentralized

* Key-Value Store

* Document Oriented * Map-Reduce

* RESTful API: jiak

* Erlang Advantage

CSS LABS

Page 6: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* Decentralized * No master

* Node Independence

* Failure Tranperancy

CSS LABS

Page 7: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* Key-Value Store* NoSQL

* Memory Footprint

* Logical data

CSS LABS

Page 8: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* Document Oriented

* No Tables

* Field Flexibilty

* Extensible

CSS LABS

Page 9: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* Erlang Advantage* Designed to Distribute

* Concurrent Processes

* No Shared State

CSS LABS

Page 10: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* RESTful API: jiak* In Thing

* Small Learning Curve

* Web 2.0

CSS LABS

Page 11: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Features

* Map-Reduce

* Already Key-Value

* Huge Data

* Clustered

CSS LABS

Page 12: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

A.C.I.D.* C.A.P.+

* Atomicity Consistency Isolation Durability

+ Consistency Availability Partition Tolerance

CSS LABS

Page 13: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

CSS LABS

Page 14: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E B's Key range: Range

EB

A's Key range: Range

BA

Keys map onto points, on the ring, determined by

some hash function

CSS LABS

Page 15: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E B's Key range. Range

EB

A's Key range. Range

BA

B Crashes, now the range?Range

EA

CSS LABSKeys map onto points, on the ring, determined by

some hash function

Page 16: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E B's Key range: Range

EB

A's Key range: Range

BA

The Key is hashed onto the ring, in Range

BA

Hence data stored in A

Replicas of the data are

maintained.

CSS LABSKeys map onto points, on the ring, determined by

some hash function

Page 17: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E B's Key range: Range

EB

A's Key range: Range

BA

F

New Node F, Splits the range.

RangeDF

& RangeFC

The Key is hashed onto the ring, in Range

BA

Hence data stored in AReplica of

RangeBA

is

moved here

Drops the replica of Range

BA

CSS LABSKeys map onto points, on the ring, determined by

some hash function

Page 18: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E

F

N = 3CSS LABS

Page 19: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E

F

W = 2CSS LABS

Page 20: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

D

A

B

C

E

F

R = 2CSS LABS

Page 21: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

DocV0

CSS LABS

Page 22: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

DocV0

DocV0

CSS LABS

Page 23: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

DocV1

DocV0

DocV1

CSS LABS

Page 24: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

DocV0

DocV1

DocV1

CSS LABS

Page 25: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

DocV0

DocV0

DocV1a

DocV1b

CSS LABS

Page 26: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Concepts

DocV1b

DocV1a

CSS LABS

Page 27: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterOperating on it.

CSS LABS

Page 28: Distributed Key-Value Stores- Featuring Riak

?Riak ClusterRiak Cluster

The Competition.

CSS LABS

Page 29: Distributed Key-Value Stores- Featuring Riak

Riak ClusterRiak ClusterThe Competition.

CSS LABS

Cassandra

Voldemort

CouchDB

Scalaris

Page 30: Distributed Key-Value Stores- Featuring Riak

?

CSS LABS

Riak ClusterRiak ClusterUse cases

Page 31: Distributed Key-Value Stores- Featuring Riak

CSS LABS

Riak ClusterRiak ClusterUse cases

Log Aggregation

Photo Store

Session Store

Tag Clouds

Page 32: Distributed Key-Value Stores- Featuring Riak

CSS LABS

Thank You!