SlideShare a Scribd company logo
Riak from Small to Large
(about 2 minutes until start)
  Berlin Buzzwords · June 2010

      Rusty Klophaus (@rklophaus)
           Basho Technologies
Introduction
   Riak at Scale
Using the Riak API




        2
There are 47 different
  NoSQL projects...




Where does Riak fit in?
          3
Riak is a Dynamo-inspired,
open-sourced, key/value datastore
built to scale predictably and easily.




                    4
Riak is a Dynamo-inspired
open-sourced, key/value datastore
built to scale predictably and easily.
 Your ops guy: calm, relaxed, and wearing a party hat.
What characteristics of Riak become
important at different cluster sizes?




                  6
Single Box Riak




•   NoSQL - Key/Value, Flexible Schema
•   Clients in Ruby, Python, Javascript, Java, PHP, Erlang
•   Development Interface === Production Interface
•   Configurable Buckets - “A Profile is not an .mp3”
•   Links - Lightweight Data Relations
                               7
Small Riak Cluster (~3 boxes)




•   Distributed Queries for Performance / Capacity
•   Javascript-based Map/Reduce (mini-Hadoop)
•   Pre- and Post- Commit Hooks
•   Well-Behaved HTTP
    • nginx proxy config - http://gist.github.com/323048
• Protocol Buffers
                               8
Large Riak Cluster (10+ boxes)




•   Homogenous - No special nodes
•   Laugh in the face of machine failure
•   Scale by adding machines
•   Self-Contained Installation
                            9
Enterprise ($$$ / ~10’s of boxes)




•   On-Call Support 24x7x365
•   Management Tools
•   SNMP Monitoring
•   Multi-site Replication

                        10
Enterprise ($$$ / ~10’s of boxes)




•   On-Call Support 24x7x365
•   Management Tools
•   SNMP Monitoring
•   Multi-site Replication

                        11
Tutorial
Get Riak
Connect with a Client
Store Data
Store an Object with Links
Linkwalking
Map/Reduce


                        12
Get Riak
Download
 http://downloads.basho.com/riak

Start Riak
 cd riak
 bin/riak start




                     13
Connect with Python
# Code is at http://hg.basho.com
import riak

# Connect
client = riak.RiakClient('127.0.0.1', 8098)




                      14
Store Data
mybucket = client.bucket('mybucket')

# Create an object...
obj = mybucket.new('myobject')
obj.set_data({ 'foo' : 1, 'bar' : 2 })
obj.store()

# Read the object...
obj = mybucket.get('myobject')
print obj.get_data()

# Or, open a web browser...
http://127.0.0.1:8098/riak/mybucket/myobject


                      15
Store an Object with Links
bands = client.bucket('bands')
albums = client.bucket('albums')
members = client.bucket('members')

# Store a band, link to album and members...
obj = bands.new('Winger') 
    .add_link(albums.new('Pull', 1275922).store()) 
    .add_link(albums.new('IV', 542731).store()) 
    .add_link(albums.new('Karma', 200170).store()) 
    .add_link(members.new('Kip Winger').store()) 
    .add_link(members.new('Reb Beach').store()) 
    .add_link(members.new('John Roth').store()) 
    .add_link(members.new('Rod M.').store()) 
    .store()




                          16
Linkwalking
# Get the albums...
albums = obj.link('albums').run()

# Get the songs (assumes data is present)...
songs = obj.link('albums').link('songs').run()

# Get the members...
members = riak.MapReduce(client) 
    .add('bands', 'Winger') 
    .link('members') 
    .run()




                      17
Map/Reduce
# Count the number of sales...
result = obj 
    .link('albums') 
    .map("function(v) { return [v.values[0].data]; }") 
    .reduce("Riak.reduceSum") 
    .run()




                           18
Thanks! Questions?
Next Steps
 Read more at http://wiki.basho.com
 Download binaries from http://downloads.basho.com
 Get source code from http://hg.basho.com
 Join the public mailing list at riak-users@lists.basho.com
 Mailing list archives at http://riak.markmail.org

Thanks!
 Rusty Klophaus (@rklophaus)

                             19

More Related Content

PDF
Querying Riak Just Got Easier - Introducing Secondary Indices
PDF
CouchDB Open Source Bridge
PDF
Intro To Couch Db
PDF
NoSQL - An introduction to CouchDB
PDF
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
PDF
Relevance trilogy may dream be with you! (dec17)
PDF
OrientDB introduction - NoSQL
PDF
Icinga 2009 at OSMC
Querying Riak Just Got Easier - Introducing Secondary Indices
CouchDB Open Source Bridge
Intro To Couch Db
NoSQL - An introduction to CouchDB
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Relevance trilogy may dream be with you! (dec17)
OrientDB introduction - NoSQL
Icinga 2009 at OSMC

What's hot (20)

PDF
02 20180605 meetup_fdw_v1
PDF
CouchDB
PDF
Search@airbnb
PDF
OrientDB
PPTX
Couch db
PPTX
OrientDB the graph database
PDF
CouchDB – A Database for the Web
PDF
NoSQL and JavaScript: a Love Story
PPTX
NoSQL Introduction
PDF
N hidden gems in hippo forge and experience plugins (dec17)
PDF
Elastify you application: from SQL to NoSQL in less than one hour!
ODP
PDF
N hidden gems in forge (as of may '17)
PPTX
Cross-Platform Mobile Apps & Drupal Web Services
KEY
MongoDB at GUL
PPTX
Discover the Power of the NoSQL + SQL with MySQL
PDF
FITC presents: Mobile & offline data synchronization in Angular JS
PPTX
Webinar: Building Your First Application with MongoDB
PDF
dataviz on d3.js + elasticsearch
PDF
Code decoupling from Symfony (and others frameworks) - PHP Conference Brasil ...
02 20180605 meetup_fdw_v1
CouchDB
Search@airbnb
OrientDB
Couch db
OrientDB the graph database
CouchDB – A Database for the Web
NoSQL and JavaScript: a Love Story
NoSQL Introduction
N hidden gems in hippo forge and experience plugins (dec17)
Elastify you application: from SQL to NoSQL in less than one hour!
N hidden gems in forge (as of may '17)
Cross-Platform Mobile Apps & Drupal Web Services
MongoDB at GUL
Discover the Power of the NoSQL + SQL with MySQL
FITC presents: Mobile & offline data synchronization in Angular JS
Webinar: Building Your First Application with MongoDB
dataviz on d3.js + elasticsearch
Code decoupling from Symfony (and others frameworks) - PHP Conference Brasil ...
Ad

Viewers also liked (11)

PDF
Riak Search - Berlin Buzzwords 2010
KEY
Winning the Erlang Edit•Build•Test Cycle
PDF
Riak - From Small to Large - StrangeLoop
PDF
Riak map reduce for beginners
PDF
Everybody Polyglot! - Cross-Language RPC with Erlang
PPT
Presentation1ggggg
PPT
2010 Business Planning 2
KEY
TEW4 Yatce deprecated slides
PDF
Riak Search - Erlang Factory London 2010
PDF
Erlang as a cloud citizen, a fractal approach to throughput
PPS
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Riak Search - Berlin Buzzwords 2010
Winning the Erlang Edit•Build•Test Cycle
Riak - From Small to Large - StrangeLoop
Riak map reduce for beginners
Everybody Polyglot! - Cross-Language RPC with Erlang
Presentation1ggggg
2010 Business Planning 2
TEW4 Yatce deprecated slides
Riak Search - Erlang Factory London 2010
Erlang as a cloud citizen, a fractal approach to throughput
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Ad

Similar to Riak from Small to Large (20)

PDF
Getting Started with Riak - NoSQL Live 2010 - Boston
KEY
Introduction to Riak and Ripple (KC.rb)
PDF
Riak - From Small to Large
KEY
Riak with Rails
PDF
PUT Knowledge BUCKET Brain KEY Riak
PDF
Just one-shade-of-openstack
PDF
Os riak1-pdf
PPTX
Coding with Riak (from Velocity 2015)
PDF
What is Apache Kafka and What is an Event Streaming Platform?
PDF
Rack
KEY
Adding Riak to your NoSQL Bag of Tricks
PDF
Guillotina
PDF
Puppet at Pinterest
PDF
"Wix Serverless from inside", Mykola Borozdin
PPTX
Dask: Scaling Python
PDF
Hugfr SPARK & RIAK -20160114_hug_france
PDF
Riak at The NYC Cloud Computing Meetup Group
PDF
Introduction to interactive data visualisation using R Shiny
PDF
Apache Spark Overview
PPT
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015
Getting Started with Riak - NoSQL Live 2010 - Boston
Introduction to Riak and Ripple (KC.rb)
Riak - From Small to Large
Riak with Rails
PUT Knowledge BUCKET Brain KEY Riak
Just one-shade-of-openstack
Os riak1-pdf
Coding with Riak (from Velocity 2015)
What is Apache Kafka and What is an Event Streaming Platform?
Rack
Adding Riak to your NoSQL Bag of Tricks
Guillotina
Puppet at Pinterest
"Wix Serverless from inside", Mykola Borozdin
Dask: Scaling Python
Hugfr SPARK & RIAK -20160114_hug_france
Riak at The NYC Cloud Computing Meetup Group
Introduction to interactive data visualisation using R Shiny
Apache Spark Overview
Apache Spark™ + IBM Watson + Twitter DataPalooza SF 2015

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
A Presentation on Artificial Intelligence
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
August Patch Tuesday
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TLE Review Electricity (Electricity).pptx
Network Security Unit 5.pdf for BCA BBA.
Group 1 Presentation -Planning and Decision Making .pptx
A Presentation on Artificial Intelligence
A comparative study of natural language inference in Swahili using monolingua...
Digital-Transformation-Roadmap-for-Companies.pptx
August Patch Tuesday
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
Assigned Numbers - 2025 - Bluetooth® Document
Heart disease approach using modified random forest and particle swarm optimi...
Advanced methodologies resolving dimensionality complications for autism neur...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Univ-Connecticut-ChatGPT-Presentaion.pdf
Empathic Computing: Creating Shared Understanding
SOPHOS-XG Firewall Administrator PPT.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf

Riak from Small to Large

  • 1. Riak from Small to Large (about 2 minutes until start) Berlin Buzzwords · June 2010 Rusty Klophaus (@rklophaus) Basho Technologies
  • 2. Introduction Riak at Scale Using the Riak API 2
  • 3. There are 47 different NoSQL projects... Where does Riak fit in? 3
  • 4. Riak is a Dynamo-inspired, open-sourced, key/value datastore built to scale predictably and easily. 4
  • 5. Riak is a Dynamo-inspired open-sourced, key/value datastore built to scale predictably and easily. Your ops guy: calm, relaxed, and wearing a party hat.
  • 6. What characteristics of Riak become important at different cluster sizes? 6
  • 7. Single Box Riak • NoSQL - Key/Value, Flexible Schema • Clients in Ruby, Python, Javascript, Java, PHP, Erlang • Development Interface === Production Interface • Configurable Buckets - “A Profile is not an .mp3” • Links - Lightweight Data Relations 7
  • 8. Small Riak Cluster (~3 boxes) • Distributed Queries for Performance / Capacity • Javascript-based Map/Reduce (mini-Hadoop) • Pre- and Post- Commit Hooks • Well-Behaved HTTP • nginx proxy config - http://gist.github.com/323048 • Protocol Buffers 8
  • 9. Large Riak Cluster (10+ boxes) • Homogenous - No special nodes • Laugh in the face of machine failure • Scale by adding machines • Self-Contained Installation 9
  • 10. Enterprise ($$$ / ~10’s of boxes) • On-Call Support 24x7x365 • Management Tools • SNMP Monitoring • Multi-site Replication 10
  • 11. Enterprise ($$$ / ~10’s of boxes) • On-Call Support 24x7x365 • Management Tools • SNMP Monitoring • Multi-site Replication 11
  • 12. Tutorial Get Riak Connect with a Client Store Data Store an Object with Links Linkwalking Map/Reduce 12
  • 14. Connect with Python # Code is at http://hg.basho.com import riak # Connect client = riak.RiakClient('127.0.0.1', 8098) 14
  • 15. Store Data mybucket = client.bucket('mybucket') # Create an object... obj = mybucket.new('myobject') obj.set_data({ 'foo' : 1, 'bar' : 2 }) obj.store() # Read the object... obj = mybucket.get('myobject') print obj.get_data() # Or, open a web browser... http://127.0.0.1:8098/riak/mybucket/myobject 15
  • 16. Store an Object with Links bands = client.bucket('bands') albums = client.bucket('albums') members = client.bucket('members') # Store a band, link to album and members... obj = bands.new('Winger') .add_link(albums.new('Pull', 1275922).store()) .add_link(albums.new('IV', 542731).store()) .add_link(albums.new('Karma', 200170).store()) .add_link(members.new('Kip Winger').store()) .add_link(members.new('Reb Beach').store()) .add_link(members.new('John Roth').store()) .add_link(members.new('Rod M.').store()) .store() 16
  • 17. Linkwalking # Get the albums... albums = obj.link('albums').run() # Get the songs (assumes data is present)... songs = obj.link('albums').link('songs').run() # Get the members... members = riak.MapReduce(client) .add('bands', 'Winger') .link('members') .run() 17
  • 18. Map/Reduce # Count the number of sales... result = obj .link('albums') .map("function(v) { return [v.values[0].data]; }") .reduce("Riak.reduceSum") .run() 18
  • 19. Thanks! Questions? Next Steps Read more at http://wiki.basho.com Download binaries from http://downloads.basho.com Get source code from http://hg.basho.com Join the public mailing list at riak-users@lists.basho.com Mailing list archives at http://riak.markmail.org Thanks! Rusty Klophaus (@rklophaus) 19