SlideShare a Scribd company logo
1 of 19
Download to read offline
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

What's hot

OrientDB the graph database
OrientDB the graph databaseOrientDB the graph database
OrientDB the graph database
Artem Orobets
 
dataviz on d3.js + elasticsearch
dataviz on d3.js + elasticsearchdataviz on d3.js + elasticsearch
dataviz on d3.js + elasticsearch
Mathieu Elie
 

What's hot (20)

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

Viewers also liked

Presentation1ggggg
Presentation1gggggPresentation1ggggg
Presentation1ggggg
RehmanB
 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web WisdomErlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web Wisdom
guest3933de
 

Viewers also liked (11)

Riak Search - Berlin Buzzwords 2010
Riak Search - Berlin Buzzwords 2010Riak Search - Berlin Buzzwords 2010
Riak Search - Berlin Buzzwords 2010
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
 
Riak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoopRiak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoop
 
Riak map reduce for beginners
Riak map reduce for beginnersRiak map reduce for beginners
Riak map reduce for beginners
 
Everybody Polyglot! - Cross-Language RPC with Erlang
Everybody Polyglot! - Cross-Language RPC with ErlangEverybody Polyglot! - Cross-Language RPC with Erlang
Everybody Polyglot! - Cross-Language RPC with Erlang
 
Presentation1ggggg
Presentation1gggggPresentation1ggggg
Presentation1ggggg
 
2010 Business Planning 2
2010  Business  Planning 22010  Business  Planning 2
2010 Business Planning 2
 
TEW4 Yatce deprecated slides
TEW4 Yatce deprecated slidesTEW4 Yatce deprecated slides
TEW4 Yatce deprecated slides
 
Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010
 
Erlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughputErlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughput
 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web WisdomErlang plus BDB: Disrupting the Conventional Web Wisdom
Erlang plus BDB: Disrupting the Conventional Web Wisdom
 

Similar to Riak from Small to Large

Introduction to Riak and Ripple (KC.rb)
Introduction to Riak and Ripple (KC.rb)Introduction to Riak and Ripple (KC.rb)
Introduction to Riak and Ripple (KC.rb)
Sean Cribbs
 

Similar to Riak from Small to Large (20)

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

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

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