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

Hands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake AnalyticsHands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake AnalyticsAmazon Web Services
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsFrederic Descamps
 
Oracle RAC 12c Best Practices with Appendices DOAG2013
Oracle RAC 12c Best Practices with Appendices DOAG2013Oracle RAC 12c Best Practices with Appendices DOAG2013
Oracle RAC 12c Best Practices with Appendices DOAG2013Markus Michalewicz
 
The Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationThe Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationMarkus Michalewicz
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Sparkdatamantra
 
Snapshot in Hadoop Distributed File System
Snapshot in Hadoop Distributed File SystemSnapshot in Hadoop Distributed File System
Snapshot in Hadoop Distributed File SystemBhavesh Padharia
 
Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...
Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...
Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...Simplilearn
 
Hadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive ArchitectureHadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive ArchitectureSkillspeed
 
Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...
Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...
Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...Amazon Web Services
 
OSMC 2021 | Introduction into OpenSearch
OSMC 2021 | Introduction into OpenSearchOSMC 2021 | Introduction into OpenSearch
OSMC 2021 | Introduction into OpenSearchNETWAYS
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsAnil Nair
 
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...Simplilearn
 
Light-weighted HDFS disaster recovery
Light-weighted HDFS disaster recoveryLight-weighted HDFS disaster recovery
Light-weighted HDFS disaster recoveryDataWorks Summit
 
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...Simplilearn
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisArnab Mitra
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Sandesh Rao
 
HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...
HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...
HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...Simplilearn
 

What's hot (20)

Hands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake AnalyticsHands-on Lab: Data Lake Analytics
Hands-on Lab: Data Lake Analytics
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
Oracle RAC 12c Best Practices with Appendices DOAG2013
Oracle RAC 12c Best Practices with Appendices DOAG2013Oracle RAC 12c Best Practices with Appendices DOAG2013
Oracle RAC 12c Best Practices with Appendices DOAG2013
 
The Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationThe Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - Presentation
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
Snapshot in Hadoop Distributed File System
Snapshot in Hadoop Distributed File SystemSnapshot in Hadoop Distributed File System
Snapshot in Hadoop Distributed File System
 
InnoDb Vs NDB Cluster
InnoDb Vs NDB ClusterInnoDb Vs NDB Cluster
InnoDb Vs NDB Cluster
 
Apache Hadoop 3
Apache Hadoop 3Apache Hadoop 3
Apache Hadoop 3
 
Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...
Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...
Hadoop Ecosystem | Hadoop Ecosystem Tutorial | Hadoop Tutorial For Beginners ...
 
Elasticsearch Introduction
Elasticsearch IntroductionElasticsearch Introduction
Elasticsearch Introduction
 
Hadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive ArchitectureHadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
Hadoop Hive Tutorial | Hive Fundamentals | Hive Architecture
 
Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...
Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...
Deep Dive on Amazon Aurora with PostgreSQL Compatibility (DAT305-R1) - AWS re...
 
OSMC 2021 | Introduction into OpenSearch
OSMC 2021 | Introduction into OpenSearchOSMC 2021 | Introduction into OpenSearch
OSMC 2021 | Introduction into OpenSearch
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
 
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
 
Light-weighted HDFS disaster recovery
Light-weighted HDFS disaster recoveryLight-weighted HDFS disaster recovery
Light-weighted HDFS disaster recovery
 
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
 
HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...
HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...
HBase Tutorial For Beginners | HBase Architecture | HBase Tutorial | Hadoop T...
 

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

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

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