riak and ruby
DESCRIPTION
TRANSCRIPT
basho
Riak and RubyGrant Schofield
Developer AdvocateBasho Technologies, Inc.
Friday, July 9, 2010
basho
Grant Schofield(@schofield)
basho
Friday, July 9, 2010
basho
NoSQL•Web 2.0, Cloud, Enterprise???
•Useful Reference Point
•Not AntiSQL
•Schemaless (Mostly)
•Diverse
•Thoughtful Data (Not just a NoSQL
Friday, July 9, 2010
basho
NoSQL Includes...
•Key Value Stores
•Document Databases
•Graphing Databases
•Column Databases
•Schemaless MySQL
Friday, July 9, 2010
basho
Prevalent Now
•Memcache???
•Session Data
•Caching Data
•Complements Traditional RDBMS
•Not The Magical Unicorn, but Pony Perhaps
Friday, July 9, 2010
basho
Riak•Open Source
•Erlang
•Dynamo and CAP Theorem Influenced
•Advanced Key Value Store
•Web Shaped
•Distributed by Nature
•Ops Obsessed
•A Platform
Friday, July 9, 2010
basho
Dynamo Paper•Key Value Store Built By Amazon for
Core Services
•Sacrifice Availability for Consistency
•Consistent Hashing
•Merkle Trees
•Vector Clocks
•Eventually Consistent
Friday, July 9, 2010
basho
CAP TheoremConsistency, Availability,
Partition Tolerance
•Dr. Eric Brewer
•At a Given Point You Get Two of the Three
•Riak is Tunable
•Eventual Consistency - Not an Excuse to Lose Data
Friday, July 9, 2010
basho
Advanced Key Value Store?
•Not Just PUT and GET Key/Values
•Multiple Interfaces
•Links
•Document Like
•Pluggable Backend
•Map/Reduce
•Distributed
Friday, July 9, 2010
basho
Web Shaped
•Biggest Distributed System Ever
•Works Like the Web
•Links
•Talks HTTP Restfully
•Load Balances Just Like Web Stuff
Friday, July 9, 2010
basho
Fundamentally Distributed
•Built From The Start
•Masterless
•Homogenous
•Consistent Hashing
•Scales Horizontally
•Fault Tolerant (Hinted Handoff)
Friday, July 9, 2010
basho
Consistent Hashing
2160/2
2160/4
node 0
node 1
node 2
node 3
hash(<<"beer">>,<<"dns">>)
Friday, July 9, 2010
basho
N, R, and W•N = Number of Replicas
•R = Number of Replicas Needed for a Read
•W = Number of Replicas Needed for a Write
•DW = Number of Replicas Needed for a Durable Write
•N Configurable Per Bucket
•R and W Configurable Per Request
Friday, July 9, 2010
basho
R Valueget(<<"beer">>,<<"dnr">>,
R=2)
{ok, Object}(N=3)
X
Friday, July 9, 2010
basho
W Valueput(<<"beer">>,<<"dnr">>,
W=2)
ok(N=3)
X
Friday, July 9, 2010
basho
N=10, R/W = 2get/put("beer", "dnr",
R/W=2)
{ok, Object}
(N=10)
X
XXX
X
XX
X
Friday, July 9, 2010
basho
Riak from CurlPutting Data In
Friday, July 9, 2010
basho
Taking Data Out
Friday, July 9, 2010
basho
Deleting The Data
Friday, July 9, 2010
basho
Finally, Ruby Stuff
•Sean Cribbs - RDRC Training
•riak-client - basic client
•ripple - associations, ActiveModel
•Really Elegant Code
Friday, July 9, 2010
basho
riak-clientgem install riak-client
Friday, July 9, 2010
basho
riak-clientget the data
Friday, July 9, 2010
basho
riak-clientmoar datas
Friday, July 9, 2010
basho
riak clientgot beer
Friday, July 9, 2010
basho
riak-clientwhy yes, I do
Friday, July 9, 2010
basho
Link Walkinghttp://localhost:8098/riak/beers/dnr/bars,_,1
http://localhost:8098/riak/bars/blue_note/beers,tap,1
http://localhost:8098/riak/areas/midtown//bars,tap,_/beers,_,1
Friday, July 9, 2010
basho
riak-clientfind me a dnr!
Friday, July 9, 2010
basho
riak-clientwhat does the Fry have on tap?
Friday, July 9, 2010
basho
riak-clientin a bottle?
Friday, July 9, 2010
basho
riak-clientok, via ruby
Friday, July 9, 2010
basho
riak clientvia ruby with map reduce
Friday, July 9, 2010
basho
riak-clientmap
Friday, July 9, 2010
basho
riak-clientmap and reduce
Friday, July 9, 2010
basho
ripplegem install ripple
Friday, July 9, 2010
basho
schema design
peoplepeopletweetstweets
riak_20100705riak_20100705
riak_20100704riak_20100704
nosql_20100705nosql_20100705
mongodb_20100705mongodb_20100705
Friday, July 9, 2010
bashoFriday, July 9, 2010
bashoFriday, July 9, 2010
basho
A Model
Friday, July 9, 2010
basho
Other Features
Friday, July 9, 2010
basho
Riak as a Platform
Friday, July 9, 2010
basho
What’s Coming
Friday, July 9, 2010