SlideShare ist ein Scribd-Unternehmen logo
1 von 58
Downloaden Sie, um offline zu lesen
Riak from Small to Large
Strange Loop · October 2010

    Rusty Klophaus (@rklophaus)
         Basho Technologies
Riak is a Dynamo-inspired,
open-sourced, key/value datastore
built to scale predictably and easily.




                    2
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.




                         3
NoSQL




  4
5
http://www.flickr.com/photos/ghewgill/129950124
NoSQL has changed like Keanu hasn’t.




                           6
        http://www.youtube.com/watch?v=nEubt6HpGhs
Companies, Funding, Customers, Awareness...




                                 7
         http://www.flickr.com/photos/free-stock/4791385567
“NoSQL? Yeah, it’s this really cool technology,
   you probably haven’t heard of it yet.”




                                 8
             http://www.flickr.com/photos/slava/285199203
“Johnson! Get me a memo on
    this ‘No sequal’ thing!”




                          9
    http://www.flickr.com/photos/proimos/4045973322
Why?



 10
Because NoSQL is driven by
 narcissism, voyeurism, and
         materialism.
The catalyst for NoSQL
      is the data
generated or consumed
      by humans.


          12
Photos, music, and video...




            13
Constantly connected devices...




              14
Social Networks...




                       15
http://www.flickr.com/photos/hanspoldoja/5001818922
Your Grandmama...




                   16
 http://www.flickr.com/photos/mega/7358278
Requirements That Confound an RDBMS
Large Data Objects                  Changing Schemas
 BLOBs?                              Auto-generated DDL?
                                     Generic Columns?

High-Availability Systems           Non-Standard Access
 Bi-Directional Replication?         Recursive SQL?
 Log shipping?

High-Capacity Systems
 Shards?
 Vertical Partitioning?

                               17
The roots of NoSQL are practical,
         not academic.




               18
Turning Point


Scratch an Itch ➮ Build a Company



                19
Four Important Things
1. Broad Knowledge
 Learn from the past, both DB *and* non-DB worlds.

 •   VP Technical Services, Akamai
 •   Senior Architect, Akamai
 •   Chief of Operations, Snapfish
 •   Release Manager, Engine Yard
 •   Bob Ippolito (CTO/CoFounder MochiMedia)
 •   Dr. Eric Brewer (CAP Theorum)


                         20
Four Important Things
  2. Strong Community
    Stay in touch with real problems.




          Mark Phillips
Basho Community Manager



                              21
Four Important Things
3. Agility
 Evolve to solve new problems.




                         22
Four Important Things
4. Restraint
 No solution can do it all well.




                            23
Back to Riak




     24
What characteristics of Riak become
important at different cluster sizes?




                 25
Single Box Riak



          Simplicity


                  26
Single Box Riak
Simple Key/Value Store, Flexible Schema

client = RiakClient(host, port)
bucket = client.bucket('mybucket')

obj = bucket.new('foo', 'bar')
obj.store()

obj2 = bucket.get(‘foo’)


                       27
Single Box Riak
Clients in Many Languages




                      28
Single Box Riak
Predictable Development Interface


                                Riak        Riak
     Riak       ===            Riak          Riak
                                     Riak


 Development                        Production

                      29
Single Box Riak
Configurable Buckets



                      !=

       Profile               Audio
       Bucket               Bucket

                       30
Single Box Riak
Links (Lightweight Data Relations)




     Profile         Projects         Comments



                        31
Small Riak Cluster



 Parallelism and Power


                32
Small Riak Cluster
Expanding the Cluster



bin/riak-admin join riak@hostname




                        33
Small Riak Cluster
Expanding the Cluster



bin/riak-admin join riak@hostname




                        34
Small Riak Cluster
Expanding the Cluster



bin/riak-admin join riak@hostname

                               Hello ladies, can your
                             datastore grow like mine?
                                 *monocle smile*


                        34
Small Riak Cluster
Distributed Queries




                      35
Small Riak Cluster
Distributed Queries




                      36
Small Riak Cluster
 Javascript-Based Map/Reduce

          Map
          Map
                     Reduce
          Map
Keys                           Reduce   Output
          Map
                     Reduce
           ...
          Map

                       37
Small Riak Cluster
Well-Behaved HTTP
                                              Client
     Client

                         nginx
Browser

Client                                      Riak     Riak
                   Squid                  Riak         Riak
                                              Riak

                                  38
         nginx proxy config - http://gist.github.com/323048
Small Riak Cluster
Riak Full-Text Search
bin/search-cmd install mybucket

"converse AND category:shoes"


                                        Riak       Riak
                                      Riak           Riak
                                           Riak

                              39
     nginx proxy config - http://gist.github.com/323048
Large Riak Cluster



         Operations


                40
Large Riak Cluster
No Special Nodes



              Special
              Nodes

                   41
Large Riak Cluster
Laugh at Machine Failure


                  Riak        Riak
                Riak
                    Riak
                                X
                                Riak




                         42
Large Riak Cluster
Scale by Adding Nodes
                   Riak              Riak
          Riak
                  Riak        Riak      Riak

                 Riak
                                 Riak
          Riak      Riak
                                     Riak
                          Riak

                         43
Large Riak Cluster
Packages or Self-Contained Installation


sudo dpkg -i riak_0.13.0-2_amd64.deb

-or-

unzip riak.zip
riak/bin/riak start

                        44
$0.00
Order now, and     $0.00
  we’ll include an
extra Riak for free!*




*Offer limited to open-
source editions of Riak.
Enterprise ($$$ / ~10’s of boxes)




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

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




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

                        48
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)
 Mark Phillips (@pharkmillups)

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


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

Start Riak
 cd riak
 bin/riak start




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

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




                      53
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


                      54
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()




                          55
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()




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




                           57

Weitere ähnliche Inhalte

Was ist angesagt?

Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC Project
Saltlux Inc.
 
Handling Kernel Upgrades at Scale - The Dirty Cow Story
Handling Kernel Upgrades at Scale - The Dirty Cow StoryHandling Kernel Upgrades at Scale - The Dirty Cow Story
Handling Kernel Upgrades at Scale - The Dirty Cow Story
DataWorks Summit
 

Was ist angesagt? (17)

ECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp TerraformECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp Terraform
 
Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC Project
 
GoldenGate Monitoring - GOUSER - 4/2014
GoldenGate Monitoring - GOUSER - 4/2014GoldenGate Monitoring - GOUSER - 4/2014
GoldenGate Monitoring - GOUSER - 4/2014
 
A Journey to Reactive Function Programming
A Journey to Reactive Function ProgrammingA Journey to Reactive Function Programming
A Journey to Reactive Function Programming
 
Extreme Replication - RMOUG Presentation
Extreme Replication - RMOUG PresentationExtreme Replication - RMOUG Presentation
Extreme Replication - RMOUG Presentation
 
Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15
 
Akka Cluster in Production
Akka Cluster in ProductionAkka Cluster in Production
Akka Cluster in Production
 
Oracle Database on Docker - Best Practices
Oracle Database on Docker - Best PracticesOracle Database on Docker - Best Practices
Oracle Database on Docker - Best Practices
 
Cowboy dating with big data TechDays at Lohika-2020
Cowboy dating with big data TechDays at Lohika-2020Cowboy dating with big data TechDays at Lohika-2020
Cowboy dating with big data TechDays at Lohika-2020
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
 
Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2
 
Handling Kernel Upgrades at Scale - The Dirty Cow Story
Handling Kernel Upgrades at Scale - The Dirty Cow StoryHandling Kernel Upgrades at Scale - The Dirty Cow Story
Handling Kernel Upgrades at Scale - The Dirty Cow Story
 
Mysteries of the binary log
Mysteries of the binary logMysteries of the binary log
Mysteries of the binary log
 
Building a High-Performance Database with Scala, Akka, and Spark
Building a High-Performance Database with Scala, Akka, and SparkBuilding a High-Performance Database with Scala, Akka, and Spark
Building a High-Performance Database with Scala, Akka, and Spark
 
Elliptics
EllipticsElliptics
Elliptics
 
Batchloading solutions
Batchloading solutionsBatchloading solutions
Batchloading solutions
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
 

Andere mochten auch (7)

Relational Databases to Riak
Relational Databases to RiakRelational Databases to Riak
Relational Databases to Riak
 
Riak a successful failure
Riak   a successful failureRiak   a successful failure
Riak a successful failure
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing Riak
 
Riak Operations
Riak OperationsRiak Operations
Riak Operations
 
Riak (Øredev nosql day)
Riak (Øredev nosql day)Riak (Øredev nosql day)
Riak (Øredev nosql day)
 
Riak in Ten Minutes
Riak in Ten MinutesRiak in Ten Minutes
Riak in Ten Minutes
 
Distributed Key-Value Stores- Featuring Riak
Distributed Key-Value Stores- Featuring RiakDistributed Key-Value Stores- Featuring Riak
Distributed Key-Value Stores- Featuring Riak
 

Ähnlich wie Riak - From Small to Large

Behind the Curtain: Operating an OpenStack Powered Private Cloud
Behind the Curtain: Operating an OpenStack Powered Private CloudBehind the Curtain: Operating an OpenStack Powered Private Cloud
Behind the Curtain: Operating an OpenStack Powered Private Cloud
Niki Acosta
 
Riak seattle-meetup-august
Riak seattle-meetup-augustRiak seattle-meetup-august
Riak seattle-meetup-august
pharkmillups
 
The Next Generation IT Department MUST HAVE CLOUD
The Next Generation IT Department MUST HAVE CLOUDThe Next Generation IT Department MUST HAVE CLOUD
The Next Generation IT Department MUST HAVE CLOUD
Rackspace
 

Ähnlich wie Riak - From Small to Large (20)

Riak from Small to Large
Riak from Small to LargeRiak from Small to Large
Riak from Small to Large
 
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
 
Riak CS in Cloudstack
Riak CS in CloudstackRiak CS in Cloudstack
Riak CS in Cloudstack
 
Avatara: OLAP for Web-scale Analytics Products
Avatara: OLAP for Web-scale Analytics Products Avatara: OLAP for Web-scale Analytics Products
Avatara: OLAP for Web-scale Analytics Products
 
Getting started with Docker sandboxes for MariaDB
Getting started with Docker sandboxes for MariaDBGetting started with Docker sandboxes for MariaDB
Getting started with Docker sandboxes for MariaDB
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
 
Behind the Curtain: Operating an OpenStack Powered Private Cloud
Behind the Curtain: Operating an OpenStack Powered Private CloudBehind the Curtain: Operating an OpenStack Powered Private Cloud
Behind the Curtain: Operating an OpenStack Powered Private Cloud
 
Docker Containers for Continuous Delivery
Docker Containers for Continuous DeliveryDocker Containers for Continuous Delivery
Docker Containers for Continuous Delivery
 
PUT Knowledge BUCKET Brain KEY Riak
PUT Knowledge BUCKET Brain KEY RiakPUT Knowledge BUCKET Brain KEY Riak
PUT Knowledge BUCKET Brain KEY Riak
 
Riak perf wins
Riak perf winsRiak perf wins
Riak perf wins
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
 
Riak seattle-meetup-august
Riak seattle-meetup-augustRiak seattle-meetup-august
Riak seattle-meetup-august
 
Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010
Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010
Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010
 
MySQL - Open Database
MySQL - Open DatabaseMySQL - Open Database
MySQL - Open Database
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 
The Next Generation IT Department MUST HAVE CLOUD
The Next Generation IT Department MUST HAVE CLOUDThe Next Generation IT Department MUST HAVE CLOUD
The Next Generation IT Department MUST HAVE CLOUD
 
Rich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentationRich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentation
 
Running a Cost-Effective DynamoDB-Compatible Database on Managed Kubernetes S...
Running a Cost-Effective DynamoDB-Compatible Database on Managed Kubernetes S...Running a Cost-Effective DynamoDB-Compatible Database on Managed Kubernetes S...
Running a Cost-Effective DynamoDB-Compatible Database on Managed Kubernetes S...
 

Mehr von Rusty Klophaus

Mehr von Rusty Klophaus (7)

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
 
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
 
Querying Riak Just Got Easier - Introducing Secondary Indices
Querying Riak Just Got Easier - Introducing Secondary IndicesQuerying Riak Just Got Easier - Introducing Secondary Indices
Querying Riak Just Got Easier - Introducing Secondary Indices
 
Masterless Distributed Computing with Riak Core - EUC 2010
Masterless Distributed Computing with Riak Core - EUC 2010Masterless Distributed Computing with Riak Core - EUC 2010
Masterless Distributed Computing with Riak Core - EUC 2010
 
Riak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoopRiak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoop
 
Riak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRiak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared State
 
Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010
 

Kürzlich hochgeladen

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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Riak - From Small to Large