Exploring the Future Potential of AI-Enabled Smartphone Processors
Riak and Ruby
1. Riak and Ruby
Grant Schofield
Developer Advocate
Basho Technologies, Inc.
basho
Friday, July 9, 2010
2. Grant Schofield
(@schofield)
basho
basho
Friday, July 9, 2010
3. NoSQL
•Web 2.0, Cloud, Enterprise???
•Useful Reference Point
•Not AntiSQL
•Schemaless (Mostly)
•Diverse
•Thoughtful Data (Not just a NoSQL
basho
Friday, July 9, 2010
4. NoSQL Includes...
•Key Value Stores
•Document Databases
•Graphing Databases
•Column Databases
•Schemaless MySQL
basho
Friday, July 9, 2010
5. Prevalent Now
•Memcache???
•Session Data
•Caching Data
•Complements Traditional RDBMS
•Not The Magical Unicorn, but Pony
Perhaps
basho
Friday, July 9, 2010
6. Riak
•Open Source
•Erlang
•Dynamo and CAP Theorem Influenced
•Advanced Key Value Store
•Web Shaped
•Distributed by Nature
•Ops Obsessed
•A Platform
basho
Friday, July 9, 2010
7. Dynamo Paper
•Key Value Store Built By Amazon for
Core Services
•Sacrifice Availability for Consistency
•Consistent Hashing
•Merkle Trees
•Vector Clocks
•Eventually Consistent
basho
Friday, July 9, 2010
8. CAP Theorem
Consistency, 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
basho
Friday, July 9, 2010
9. Advanced Key
Value Store?
•Not Just PUT and GET Key/Values
•Multiple Interfaces
•Links
•Document Like
•Pluggable Backend
•Map/Reduce
•Distributed
basho
Friday, July 9, 2010
10. Web Shaped
•Biggest Distributed System Ever
•Works Like the Web
•Links
•Talks HTTP Restfully
•Load Balances Just Like Web Stuff
basho
Friday, July 9, 2010
11. Fundamentally
Distributed
•Built From The Start
•Masterless
•Homogenous
•Consistent Hashing
•Scales Horizontally
•Fault Tolerant (Hinted Handoff)
basho
Friday, July 9, 2010
13. 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
basho
Friday, July 9, 2010
14. R Value
get(<<"beer">>,<<"dnr">>,
R=2)
(N=3)
{ok, Object}
X
basho
Friday, July 9, 2010
15. W Value
put(<<"beer">>,<<"dnr">>,
W=2)
(N=3)
ok
X
basho
Friday, July 9, 2010
16. N=10, R/W = 2
get/put("beer", "dnr",
R/W=2)
(N=10)
{ok, Object}
X X
X
X X
X X X
basho
Friday, July 9, 2010
17. Riak from Curl
Putting Data In
basho
Friday, July 9, 2010