SlideShare a Scribd company logo
1 of 39
Download to read offline
This presentation includes information that is confidential and
proprietary to Basho Technologies and should not be forwarded or
distributed without Basho's prior written consent. © 2014. Basho
Technologies, Inc. All Rights Reserved.
This presentation includes information that is confidential and proprietary to
Basho Technologies and should not be forwarded or distributed without Basho's
prior written consent. © 2014. Basho Technologies, Inc. All Rights Reserved.
Matt Brender
Developer Advocate
From
Relational to Riak
Relational databases give
us a lot
Relationships
Transactions
Schemas
Ad-hoc queries (SQL)
RDBMS BE LIKE
4
=>
RDBMS BE LIKE
5
OR
It’s not about NoSQL
What we really need..
is a database that makes
my app faster
Enter Riak
Scalable
Key => Value
Schema-less
Eventually Consistent
Highly Available
Key => Value
Masterless
Schema-less
Fault Tolerant
High Availability
Queries & Search
Scalable
Riak has a masterless architecture in which every node in a cluster
is capable of serving read and write requests.
Requests are routed to nodes using standard load balancing
appliances or software like Nginx or HAProxy.
Scalable
Data is guaranteed to be evenly distributed.
Instead of manually sharding (partitioning) data Riak automatically
distributes data evenly across a cluster by hashing keys using the
SHA-1 algorithm that converts the key (bucket/key combination)
into a number from:
0 - 1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976
or
0 - 2160
Scalable
Consistent Hashing – The Ring
0 - 2160
•  Linear Scaling

Riak scales in a near-linear
fashion so increasing the number
of a nodes in a cluster increases
the number of reads and writes a
cluster can handle in a predictable
fashion.
If 10 nodes can serve:

40,000 Writes/Second
Then 20 nodes should serve:

72,000+ Writes/Second
“To enable rapid
iteration at scale, Riot
moved to Riak to
support millions of
concurrent players at
any moment.”
Scalable
RELATIONAL SCALABILITY
16
•  Designed for vertical scale
•  Cost Considerations a key element
of vertical scaling
•  Sharding or re-distribution is I/O
intensive
A - K L - P Q - Z
Key => Value
Riak stores data as a combination of keys and values in buckets
•  Keys – simply binary values
used to identify Objects.*
•  Values – can be numbers,
strings, objects, binaries, etc.
•  Buckets – used to define a
virtual namespace for storing
Riak objects.
Key => Value
curl http://127.0.0.1:8098/types/places/buckets/country/keys/US
{
"Alpha2_s": "US”,

"Alpha3_s": "USA”,

"EnglishName_s": "United States”,

"NumericCode_i": 840

}
Riak offers both HTTP and Protocol Buffers APIs. The following
HTTP API example uses curl to retrieve a value by key:
Note: Protocol buffers are Google's language-neutral, platform-
neutral, extensible mechanism for serializing structured data –
think XML, but smaller, faster, and simpler.
There are a diverse group of client libraries for Riak that support
both the HTTP and Protocol Buffer APIs:
Key => Value
Basho Supported Libraries:
•  Java
•  Ruby
•  Python
•  PHP
•  Erlang
•  .NET
•  Node.js
Community Libraries:
•  C
•  Clojure
•  Go
•  Perl
•  Scala
•  R
Schemas are not enforced by Riak, but by your application.
Schema-less
You still:
•  Design a schema
•  Denormalize dependent
data types
But get:
•  Single reads for common
access patterns
•  Richer, simpler data
structures
curl http://127.0.0.1:8098/types/places/buckets/country/keys/US
{
"Alpha2_s": "US”,

"Alpha3_s": "USA”,

"EnglishName_s": "United States”,

"NumericCode_i": 840

}
Schemas are not enforced by Riak, but by your application.
Schema-less
Application Type Key Value
Session User/Session ID Session Data
Advertising Campaign ID Ad Content
Logs Date Log File
Sensor Date, Date/Time Sensor Updates
User Data Login, email, UUID User Attributes
Content Title, Integer Text, JSON/XML/
HTTP document,
images, etc.
Eventually Consistent
C = Consistency
A = Availability
P = Partition Tolerance
Client Client
DBDBDB
Network Partition
Cap theorem states that a distributed system can at most support
2 out of these 3 properties
Eventually Consistent
Read repair operations take place
on every successful read, which
updates replicas copy that may be
out of sync.
Active anti-entropy (AAE) is a
background operation that
compares Merkle trees to repair
operations.
Nodes periodically send their
current view of the ring state to a
randomly selected peer over
gossip protocol.
get(“bucket/key”)
Eventually Consistent
Dotted Version Vectors are a tool used by Riak to track the logical
sequence of updates to a key/value pair (versus the chronological
order of events) and manage the process of merging siblings
created as one of the side effects of eventual consistency.
A:1 B:1
A:1
C:1
B:1
C:2
B:1
C2
C1
> curl http://127.0.0.1:8098/types/places/buckets/country/keys/US

Siblings:

47fGOQwxRzq6wsbM7idvFB

2mJD0DEGoxdxdHUqS3bYt3

7Y68tqVG99xHBDu7AKtmb4
> curl -H "Accept: multipart/mixed" http://127.0.0.1:8098/types/places/
buckets/country/keys/US
--RigRoRk6lkPXYIqBOv1jKEacnlr

Content-Type: application/json

Link: </buckets/country>; rel="up”

Etag: 47fGOQwxRzq6wsbM7idvFB

Last-Modified: Wed, 05 Nov 2014 22:44:00 GMT

{"Alpha2_s":"US","Alpha3_s":"USA","EnglishName_s":"United
States","NumericCode_i":840}



--RigRoRk6lkPXYIqBOv1jKEacnlr

Content-Type: application/json

Link: </buckets/country>; rel="up”
...
Eventually Consistent
Riak Data Types (Convergent Replicated Data Types or CRDTs)
are a developer-friendly way to keep track of updates in an
eventually consistent environment:
•  Map

Supports the nest of and of
the Riak Data Types.
•  Register

A named binary field that can
only be used as part of a
Map.
•  Counter

Keeps tracks of increments
and decrements on an integer
•  Flag

Values limited to enable or
disable
•  Set

A collection of unique binary
values that supports add and
remove operations on one or
more values
Eventually Consistent
Hinted handoff allows Riak nodes
to temporarily take over storage
operations for a failed node and
update that node with changes
when it comes back online.
put(“bucket/key”)
High Availability
RELATIONAL AVAILABILITY
28
•  Master/Replica Architecture
•  Assumption of Transactional
Consistency
•  What happens under failure
conditions?
master
replica replica replica
coordination
X
X
Write/
Read
Write/
Read
WAIT
master
coordination
Riak automatically replicates
between clusters
•  Configurable number of
remote replicas
•  Options for real-time sync and
full sync
•  Spanning tree support for
cascading replication
Geo-Data Locality allows
localized data processing
•  Reduced latency to 

end-users
•  Allows sub 5ms responses
•  Active-Active ensures
continuous user experience
High Availability
Riak Multi-Datacenter (MDC) Replication
IN REVIEW
RDBMS BE LIKE
32
OR
CV CV
NoSQL
Database
Unstructured Data
No pre-defined Schema
Small and Large Data Sets
on Commodity HW
Many Models:
K/V, document store, graph
Variety of Query Methods
RELATIONAL & NOSQL
What’s the difference?
Relational
Database
Structured Data
Defined Schema
Tables with
Rows/Columns
Indexed
w/ Table Joins
SQL
33
Biggest change for dev:
reads
Biggest change for ops:
administration
THE COST OF DOWNTIME
36
WHAT YOU WILL GAIN
37
More flexible, fluid designs
More natural data representations
Scaling without pain
Reduced operational complexity
RIAK DEPLOYED
WORLDWIDE
39
Questions

More Related Content

What's hot

Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlJiangjie Qin
 
Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리Jeong-gyu Kim
 
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Amazon Web Services
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?confluent
 
Assessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business ContinuityAssessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business ContinuityAmazon Web Services
 
Evaluation of TPC-H on Spark and Spark SQL in ALOJA
Evaluation of TPC-H on Spark and Spark SQL in ALOJAEvaluation of TPC-H on Spark and Spark SQL in ALOJA
Evaluation of TPC-H on Spark and Spark SQL in ALOJADataWorks Summit
 
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...Amazon Web Services
 
Microservice Architecture Patterns, by Richard Langlois P. Eng.
Microservice Architecture Patterns, by Richard Langlois P. Eng.Microservice Architecture Patterns, by Richard Langlois P. Eng.
Microservice Architecture Patterns, by Richard Langlois P. Eng.Richard Langlois P. Eng.
 
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Real-Life Use Cases & Architectures for Event Streaming with Apache KafkaReal-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Real-Life Use Cases & Architectures for Event Streaming with Apache KafkaKai Wähner
 
Amazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | Edureka
Amazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | EdurekaAmazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | Edureka
Amazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | EdurekaEdureka!
 
Couchdb + Membase = Couchbase
Couchdb + Membase = CouchbaseCouchdb + Membase = Couchbase
Couchdb + Membase = Couchbaseiammutex
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET MicroservicesVMware Tanzu
 
Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019
Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019
Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019Amazon Web Services
 
Service Mesh - Why? How? What?
Service Mesh - Why? How? What?Service Mesh - Why? How? What?
Service Mesh - Why? How? What?Orkhan Gasimov
 
Introduction to Amazon Web Services
Introduction to Amazon Web ServicesIntroduction to Amazon Web Services
Introduction to Amazon Web ServicesAmazon Web Services
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastDataWorks Summit
 

What's hot (20)

Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise Control
 
Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리
 
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?
 
Cloud Computing Architecture
Cloud Computing ArchitectureCloud Computing Architecture
Cloud Computing Architecture
 
Assessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business ContinuityAssessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business Continuity
 
Evaluation of TPC-H on Spark and Spark SQL in ALOJA
Evaluation of TPC-H on Spark and Spark SQL in ALOJAEvaluation of TPC-H on Spark and Spark SQL in ALOJA
Evaluation of TPC-H on Spark and Spark SQL in ALOJA
 
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
 
Microservice Architecture Patterns, by Richard Langlois P. Eng.
Microservice Architecture Patterns, by Richard Langlois P. Eng.Microservice Architecture Patterns, by Richard Langlois P. Eng.
Microservice Architecture Patterns, by Richard Langlois P. Eng.
 
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Real-Life Use Cases & Architectures for Event Streaming with Apache KafkaReal-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
 
Amazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | Edureka
Amazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | EdurekaAmazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | Edureka
Amazon AWS | What is Amazon AWS | AWS Tutorial | AWS Training | Edureka
 
Couchdb + Membase = Couchbase
Couchdb + Membase = CouchbaseCouchdb + Membase = Couchbase
Couchdb + Membase = Couchbase
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET Microservices
 
Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019
Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019
Building Serverless Analytics Pipelines with AWS Glue - AWS Summit Sydney 2019
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Service Mesh - Why? How? What?
Service Mesh - Why? How? What?Service Mesh - Why? How? What?
Service Mesh - Why? How? What?
 
Introduction to Amazon Web Services
Introduction to Amazon Web ServicesIntroduction to Amazon Web Services
Introduction to Amazon Web Services
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the Beast
 

Viewers also liked

Distributed Key-Value Stores- Featuring Riak
Distributed Key-Value Stores- Featuring RiakDistributed Key-Value Stores- Featuring Riak
Distributed Key-Value Stores- Featuring Riaksamof76
 
Riak (Øredev nosql day)
Riak (Øredev nosql day)Riak (Øredev nosql day)
Riak (Øredev nosql day)Sean Cribbs
 
Riak - From Small to Large
Riak - From Small to LargeRiak - From Small to Large
Riak - From Small to LargeRusty Klophaus
 
Riak in Ten Minutes
Riak in Ten MinutesRiak in Ten Minutes
Riak in Ten MinutesJon Meredith
 
Riak Training Session — Surge 2011
Riak Training Session — Surge 2011Riak Training Session — Surge 2011
Riak Training Session — Surge 2011DstroyAllModels
 
Riak Operations
Riak OperationsRiak Operations
Riak Operationsgschofield
 
Riak a successful failure
Riak   a successful failureRiak   a successful failure
Riak a successful failureGiltTech
 
Introduction to Riak - Red Dirt Ruby Conf Training
Introduction to Riak - Red Dirt Ruby Conf TrainingIntroduction to Riak - Red Dirt Ruby Conf Training
Introduction to Riak - Red Dirt Ruby Conf TrainingSean Cribbs
 

Viewers also liked (8)

Distributed Key-Value Stores- Featuring Riak
Distributed Key-Value Stores- Featuring RiakDistributed Key-Value Stores- Featuring Riak
Distributed Key-Value Stores- Featuring Riak
 
Riak (Øredev nosql day)
Riak (Øredev nosql day)Riak (Øredev nosql day)
Riak (Øredev nosql day)
 
Riak - From Small to Large
Riak - From Small to LargeRiak - From Small to Large
Riak - From Small to Large
 
Riak in Ten Minutes
Riak in Ten MinutesRiak in Ten Minutes
Riak in Ten Minutes
 
Riak Training Session — Surge 2011
Riak Training Session — Surge 2011Riak Training Session — Surge 2011
Riak Training Session — Surge 2011
 
Riak Operations
Riak OperationsRiak Operations
Riak Operations
 
Riak a successful failure
Riak   a successful failureRiak   a successful failure
Riak a successful failure
 
Introduction to Riak - Red Dirt Ruby Conf Training
Introduction to Riak - Red Dirt Ruby Conf TrainingIntroduction to Riak - Red Dirt Ruby Conf Training
Introduction to Riak - Red Dirt Ruby Conf Training
 

Similar to Relational Databases to Riak

Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDBBrian Ritchie
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails SiddheshSiddhesh Bhobe
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling ResolutionDEEPAK KHETAWAT
 
Riak seattle-meetup-august
Riak seattle-meetup-augustRiak seattle-meetup-august
Riak seattle-meetup-augustpharkmillups
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & RestoreLadies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restoregemziebeth
 
Riak Intro at Munich Node.js
Riak Intro at Munich Node.jsRiak Intro at Munich Node.js
Riak Intro at Munich Node.jsPhilipp Fehre
 
distributing over the web
distributing over the webdistributing over the web
distributing over the webNicola Baldi
 
Innovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open InterfacesInnovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open InterfacesSteve Speicher
 
Apache web-server-architecture
Apache web-server-architectureApache web-server-architecture
Apache web-server-architectureIvanGeorgeArouje
 
The other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needsThe other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needsgagravarr
 
aip-workshop1-dev-tutorial
aip-workshop1-dev-tutorialaip-workshop1-dev-tutorial
aip-workshop1-dev-tutorialMatthew Vaughn
 
grlc: Bridging the Gap Between RESTful APIs and Linked Data
grlc: Bridging the Gap Between RESTful APIs and Linked Datagrlc: Bridging the Gap Between RESTful APIs and Linked Data
grlc: Bridging the Gap Between RESTful APIs and Linked DataAlbert Meroño-Peñuela
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsKonveyor Community
 
Adding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIsAdding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIsMichael Petychakis
 

Similar to Relational Databases to Riak (20)

Os riak1-pdf
Os riak1-pdfOs riak1-pdf
Os riak1-pdf
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
The Glory of Rest
The Glory of RestThe Glory of Rest
The Glory of Rest
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling Resolution
 
Riak seattle-meetup-august
Riak seattle-meetup-augustRiak seattle-meetup-august
Riak seattle-meetup-august
 
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & RestoreLadies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
Ladies Be Architects - Integration - Multi-Org, Security, JSON, Backup & Restore
 
Riak Intro at Munich Node.js
Riak Intro at Munich Node.jsRiak Intro at Munich Node.js
Riak Intro at Munich Node.js
 
distributing over the web
distributing over the webdistributing over the web
distributing over the web
 
Deep Dive on ArangoDB
Deep Dive on ArangoDBDeep Dive on ArangoDB
Deep Dive on ArangoDB
 
Innovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open InterfacesInnovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open Interfaces
 
Apache web-server-architecture
Apache web-server-architectureApache web-server-architecture
Apache web-server-architecture
 
The other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needsThe other Apache Technologies your Big Data solution needs
The other Apache Technologies your Big Data solution needs
 
aip-workshop1-dev-tutorial
aip-workshop1-dev-tutorialaip-workshop1-dev-tutorial
aip-workshop1-dev-tutorial
 
Redis tutoring
Redis tutoringRedis tutoring
Redis tutoring
 
grlc: Bridging the Gap Between RESTful APIs and Linked Data
grlc: Bridging the Gap Between RESTful APIs and Linked Datagrlc: Bridging the Gap Between RESTful APIs and Linked Data
grlc: Bridging the Gap Between RESTful APIs and Linked Data
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy Applications
 
Adding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIsAdding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIs
 

More from Basho Technologies

Data Modeling IoT and Time Series data in NoSQL
Data Modeling IoT and Time Series data in NoSQLData Modeling IoT and Time Series data in NoSQL
Data Modeling IoT and Time Series data in NoSQLBasho Technologies
 
A Zen Journey to Database Management
A Zen Journey to Database ManagementA Zen Journey to Database Management
A Zen Journey to Database ManagementBasho Technologies
 
Vagrant up a Distributed Test Environment - Nginx Summit 2015
Vagrant up a Distributed Test Environment - Nginx Summit 2015Vagrant up a Distributed Test Environment - Nginx Summit 2015
Vagrant up a Distributed Test Environment - Nginx Summit 2015Basho Technologies
 
O'Reilly Webinar: Simplicity Scales - Big Data
O'Reilly Webinar: Simplicity Scales - Big Data O'Reilly Webinar: Simplicity Scales - Big Data
O'Reilly Webinar: Simplicity Scales - Big Data Basho Technologies
 
A little about Message Queues - Boston Riak Meetup
A little about Message Queues - Boston Riak MeetupA little about Message Queues - Boston Riak Meetup
A little about Message Queues - Boston Riak MeetupBasho Technologies
 
NoSQL Implementation - Part 1 (Velocity 2015)
NoSQL Implementation - Part 1 (Velocity 2015)NoSQL Implementation - Part 1 (Velocity 2015)
NoSQL Implementation - Part 1 (Velocity 2015)Basho Technologies
 
Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)Basho Technologies
 
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho and Riak at GOTO Stockholm:  "Don't Use My Database."Basho and Riak at GOTO Stockholm:  "Don't Use My Database."
Basho and Riak at GOTO Stockholm: "Don't Use My Database."Basho Technologies
 
Using Basho Bench to Load Test Distributed Applications
Using Basho Bench to Load Test Distributed ApplicationsUsing Basho Bench to Load Test Distributed Applications
Using Basho Bench to Load Test Distributed ApplicationsBasho Technologies
 

More from Basho Technologies (11)

Data Modeling IoT and Time Series data in NoSQL
Data Modeling IoT and Time Series data in NoSQLData Modeling IoT and Time Series data in NoSQL
Data Modeling IoT and Time Series data in NoSQL
 
A Zen Journey to Database Management
A Zen Journey to Database ManagementA Zen Journey to Database Management
A Zen Journey to Database Management
 
Vagrant up a Distributed Test Environment - Nginx Summit 2015
Vagrant up a Distributed Test Environment - Nginx Summit 2015Vagrant up a Distributed Test Environment - Nginx Summit 2015
Vagrant up a Distributed Test Environment - Nginx Summit 2015
 
O'Reilly Webinar: Simplicity Scales - Big Data
O'Reilly Webinar: Simplicity Scales - Big Data O'Reilly Webinar: Simplicity Scales - Big Data
O'Reilly Webinar: Simplicity Scales - Big Data
 
A little about Message Queues - Boston Riak Meetup
A little about Message Queues - Boston Riak MeetupA little about Message Queues - Boston Riak Meetup
A little about Message Queues - Boston Riak Meetup
 
tecFinal 451 webinar deck
tecFinal 451 webinar decktecFinal 451 webinar deck
tecFinal 451 webinar deck
 
NoSQL Implementation - Part 1 (Velocity 2015)
NoSQL Implementation - Part 1 (Velocity 2015)NoSQL Implementation - Part 1 (Velocity 2015)
NoSQL Implementation - Part 1 (Velocity 2015)
 
Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)Coding with Riak (from Velocity 2015)
Coding with Riak (from Velocity 2015)
 
Taming Big Data with NoSQL
Taming Big Data with NoSQLTaming Big Data with NoSQL
Taming Big Data with NoSQL
 
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
Basho and Riak at GOTO Stockholm:  "Don't Use My Database."Basho and Riak at GOTO Stockholm:  "Don't Use My Database."
Basho and Riak at GOTO Stockholm: "Don't Use My Database."
 
Using Basho Bench to Load Test Distributed Applications
Using Basho Bench to Load Test Distributed ApplicationsUsing Basho Bench to Load Test Distributed Applications
Using Basho Bench to Load Test Distributed Applications
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Relational Databases to Riak

  • 1. This presentation includes information that is confidential and proprietary to Basho Technologies and should not be forwarded or distributed without Basho's prior written consent. © 2014. Basho Technologies, Inc. All Rights Reserved. This presentation includes information that is confidential and proprietary to Basho Technologies and should not be forwarded or distributed without Basho's prior written consent. © 2014. Basho Technologies, Inc. All Rights Reserved. Matt Brender Developer Advocate From Relational to Riak
  • 7. What we really need..
  • 8. is a database that makes my app faster
  • 10. Scalable Key => Value Schema-less Eventually Consistent Highly Available
  • 11. Key => Value Masterless Schema-less Fault Tolerant High Availability Queries & Search
  • 12. Scalable Riak has a masterless architecture in which every node in a cluster is capable of serving read and write requests. Requests are routed to nodes using standard load balancing appliances or software like Nginx or HAProxy.
  • 13. Scalable Data is guaranteed to be evenly distributed. Instead of manually sharding (partitioning) data Riak automatically distributes data evenly across a cluster by hashing keys using the SHA-1 algorithm that converts the key (bucket/key combination) into a number from: 0 - 1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976 or 0 - 2160
  • 14. Scalable Consistent Hashing – The Ring 0 - 2160
  • 15. •  Linear Scaling
 Riak scales in a near-linear fashion so increasing the number of a nodes in a cluster increases the number of reads and writes a cluster can handle in a predictable fashion. If 10 nodes can serve:
 40,000 Writes/Second Then 20 nodes should serve:
 72,000+ Writes/Second “To enable rapid iteration at scale, Riot moved to Riak to support millions of concurrent players at any moment.” Scalable
  • 16. RELATIONAL SCALABILITY 16 •  Designed for vertical scale •  Cost Considerations a key element of vertical scaling •  Sharding or re-distribution is I/O intensive A - K L - P Q - Z
  • 17. Key => Value Riak stores data as a combination of keys and values in buckets •  Keys – simply binary values used to identify Objects.* •  Values – can be numbers, strings, objects, binaries, etc. •  Buckets – used to define a virtual namespace for storing Riak objects.
  • 18. Key => Value curl http://127.0.0.1:8098/types/places/buckets/country/keys/US { "Alpha2_s": "US”,
 "Alpha3_s": "USA”,
 "EnglishName_s": "United States”,
 "NumericCode_i": 840
 } Riak offers both HTTP and Protocol Buffers APIs. The following HTTP API example uses curl to retrieve a value by key: Note: Protocol buffers are Google's language-neutral, platform- neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler.
  • 19. There are a diverse group of client libraries for Riak that support both the HTTP and Protocol Buffer APIs: Key => Value Basho Supported Libraries: •  Java •  Ruby •  Python •  PHP •  Erlang •  .NET •  Node.js Community Libraries: •  C •  Clojure •  Go •  Perl •  Scala •  R
  • 20. Schemas are not enforced by Riak, but by your application. Schema-less You still: •  Design a schema •  Denormalize dependent data types But get: •  Single reads for common access patterns •  Richer, simpler data structures curl http://127.0.0.1:8098/types/places/buckets/country/keys/US { "Alpha2_s": "US”,
 "Alpha3_s": "USA”,
 "EnglishName_s": "United States”,
 "NumericCode_i": 840
 }
  • 21. Schemas are not enforced by Riak, but by your application. Schema-less Application Type Key Value Session User/Session ID Session Data Advertising Campaign ID Ad Content Logs Date Log File Sensor Date, Date/Time Sensor Updates User Data Login, email, UUID User Attributes Content Title, Integer Text, JSON/XML/ HTTP document, images, etc.
  • 22. Eventually Consistent C = Consistency A = Availability P = Partition Tolerance Client Client DBDBDB Network Partition Cap theorem states that a distributed system can at most support 2 out of these 3 properties
  • 23. Eventually Consistent Read repair operations take place on every successful read, which updates replicas copy that may be out of sync. Active anti-entropy (AAE) is a background operation that compares Merkle trees to repair operations. Nodes periodically send their current view of the ring state to a randomly selected peer over gossip protocol. get(“bucket/key”)
  • 24. Eventually Consistent Dotted Version Vectors are a tool used by Riak to track the logical sequence of updates to a key/value pair (versus the chronological order of events) and manage the process of merging siblings created as one of the side effects of eventual consistency. A:1 B:1 A:1 C:1 B:1 C:2 B:1 C2 C1
  • 25. > curl http://127.0.0.1:8098/types/places/buckets/country/keys/US
 Siblings:
 47fGOQwxRzq6wsbM7idvFB
 2mJD0DEGoxdxdHUqS3bYt3
 7Y68tqVG99xHBDu7AKtmb4 > curl -H "Accept: multipart/mixed" http://127.0.0.1:8098/types/places/ buckets/country/keys/US --RigRoRk6lkPXYIqBOv1jKEacnlr
 Content-Type: application/json
 Link: </buckets/country>; rel="up”
 Etag: 47fGOQwxRzq6wsbM7idvFB
 Last-Modified: Wed, 05 Nov 2014 22:44:00 GMT
 {"Alpha2_s":"US","Alpha3_s":"USA","EnglishName_s":"United States","NumericCode_i":840}
 
 --RigRoRk6lkPXYIqBOv1jKEacnlr
 Content-Type: application/json
 Link: </buckets/country>; rel="up” ... Eventually Consistent
  • 26. Riak Data Types (Convergent Replicated Data Types or CRDTs) are a developer-friendly way to keep track of updates in an eventually consistent environment: •  Map
 Supports the nest of and of the Riak Data Types. •  Register
 A named binary field that can only be used as part of a Map. •  Counter
 Keeps tracks of increments and decrements on an integer •  Flag
 Values limited to enable or disable •  Set
 A collection of unique binary values that supports add and remove operations on one or more values Eventually Consistent
  • 27. Hinted handoff allows Riak nodes to temporarily take over storage operations for a failed node and update that node with changes when it comes back online. put(“bucket/key”) High Availability
  • 28. RELATIONAL AVAILABILITY 28 •  Master/Replica Architecture •  Assumption of Transactional Consistency •  What happens under failure conditions? master replica replica replica coordination X X Write/ Read Write/ Read WAIT master coordination
  • 29. Riak automatically replicates between clusters •  Configurable number of remote replicas •  Options for real-time sync and full sync •  Spanning tree support for cascading replication Geo-Data Locality allows localized data processing •  Reduced latency to 
 end-users •  Allows sub 5ms responses •  Active-Active ensures continuous user experience High Availability Riak Multi-Datacenter (MDC) Replication
  • 31.
  • 33. CV CV NoSQL Database Unstructured Data No pre-defined Schema Small and Large Data Sets on Commodity HW Many Models: K/V, document store, graph Variety of Query Methods RELATIONAL & NOSQL What’s the difference? Relational Database Structured Data Defined Schema Tables with Rows/Columns Indexed w/ Table Joins SQL 33
  • 34. Biggest change for dev: reads
  • 35. Biggest change for ops: administration
  • 36. THE COST OF DOWNTIME 36
  • 37. WHAT YOU WILL GAIN 37 More flexible, fluid designs More natural data representations Scaling without pain Reduced operational complexity