SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
POLYGLOT
PERSISTENCE
alex brandt
sr developer
Wednesday, August 21, 13
2
Wednesday, August 21, 13
3
Wednesday, August 21, 13
4
Wednesday, August 21, 13
5
RDBMS may not be the best fit
Wednesday, August 21, 13
6
Wednesday, August 21, 13
7
Wednesday, August 21, 13
INTRODUCTION TO
NOSQL
• NoSQL Database (1998)
• NoREL
• “Not only SQL”
• NoSQL (2009)
8
Wednesday, August 21, 13
9
5 Characteristics
Wednesday, August 21, 13
10
Non-relational
Wednesday, August 21, 13
11
Distributed
Wednesday, August 21, 13
12
Open-source
Wednesday, August 21, 13
13
Horizontally Scalable
Wednesday, August 21, 13
14
Schema-less
Wednesday, August 21, 13
orders
customers
order lines
credit cards
ID: 1001
line items:
customer: Ann
0321293533
0321601912
0131495054
2
1
1
$48 $48
$39
$51
$39
$51
payment details:
Card: Amex
CC #: 12345
expires: 04/2001
15
Wednesday, August 21, 13
16
Types in Detail
Wednesday, August 21, 13
Key/Value DatabaseS
17
Wednesday, August 21, 13
Key/Value DatabaseS
• Good Use Cases:
• Storing Session Information
• User Profiles & Preferences
• Shopping Cart Data
• Bad Use Cases:
• Data Relationships
•Multi-operation Transactions
•Query by Data
18
Wednesday, August 21, 13
Key/Value DatabaseS
• Good Use Cases:
• Storing Session Information
• User Profiles & Preferences
• Shopping Cart Data
• Bad Use Cases:
• Data Relationships
•Multi-operation Transactions
•Query by Data
19
Wednesday, August 21, 13
document Database
20
Wednesday, August 21, 13
document Databases
•Good Use Cases:
• Event Logging
• Blogging Platforms
• Real-time Analytics
• Article storage
• Bad Use Cases:
• Complex Transactions
•Queries against Varying
Aggregate Structures
21
Wednesday, August 21, 13
document Databases
•Good Use Cases:
• Event Logging
• Blogging Platforms
• Real-time Analytics
• Article storage
• Bad Use Cases:
• Complex Transactions
•Queries against Varying
Aggregate Structures
22
Wednesday, August 21, 13
COLUMN FAMILY
23
Wednesday, August 21, 13
24
Wednesday, August 21, 13
COLUMN-FAMILY
datastores
•Good Use Cases:
• Event Logging
• Blogging Platforms
• Counters (page visits)
• Expiring Usage
• Bad Use Cases:
• ACID transactions
required
• Early prototype
applications
25
Wednesday, August 21, 13
graph database
26
Wednesday, August 21, 13
Amanda
KNOWS
KNOWS
KNOWS
Robert
Gerry
Lamar
KNOWS
App 1
BUILT
BUILT
KNOWS
App 2
USES
BUILT
Christie
KNOWS
Destiny
Jessica
KNOWS
App 3
BUILT
USES
USES
USES
KNOWS
graph database
27
Wednesday, August 21, 13
graph databases
•Good Use Cases:
• Connected Data
• Location-based services
• Recommendation engines
• Bad Use Cases:
• Ability to update
specific aggregates
28
Wednesday, August 21, 13
Companies using
nosql
29
DATABASE COMPANIES
Wednesday, August 21, 13
THE FUTURE IS POLYGLOT
30
Neo4J
database
Cassandra
database
Couch
database
MongoDB
database
RELATIONAL
DATABASE
Graph-structured
domain rules
Columnar data
access with
decentralization
Document
structures
Document structures
with offline
processing
(Actors) (Actors)
(Actors)(Actors)
Asynchronous message passing
MODULE 1
MODULE 2
MODULE 3
MODULE 4
IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg
Wednesday, August 21, 13
31
POLYGLOT PATTERN: cache
ORDER
TAKING
RESTAURANT
MANAGEMENT
REDIS
CACHE
MYSQL
DATABASE
SECONDFIRST
CONSUMER
RESTAURANT
OWNER
Credit: @crichardson
Wednesday, August 21, 13
32
POLYGLOT PATTERN:
write to sql and NOSQL
NEW
TWEET
INSERT
LPUSHX
LTRIM
MySQL
TWEETS
FOLLOWS
FOLLOWERS
Redis: Timeline
FOLLOWER 1
FOLLOWER 2
FOLLOWER 3
Avoid
expensive
MySQL joins
Credit: @crichardson
Wednesday, August 21, 13
33
POLYGLOT PATTERN:
REPLICATE FROM
MYsql to NOSQL
QUERY
SERVICE
UPDATE
SERVICE
REDIS
MYSQL
DATABASE
SYSTEM
OF
RECORD
MATERIALIZED
VIEW
READER WRITER
replicate and
denormalize
query() update()
Credit: @crichardson
Wednesday, August 21, 13
34
Atomic
Consistent
Isolated
Durable
ACID to base
Basically Available
Soft state
Eventually consistent
Wednesday, August 21, 13

Mais conteúdo relacionado

Destaque

Enterprise Cloud Forum Rackspace IT: Journey to the Cloud
Enterprise Cloud Forum Rackspace IT: Journey to the CloudEnterprise Cloud Forum Rackspace IT: Journey to the Cloud
Enterprise Cloud Forum Rackspace IT: Journey to the Cloud
Rackspace
 
Top 8 assistant general manager hotel resume samples
Top 8 assistant general manager hotel resume samplesTop 8 assistant general manager hotel resume samples
Top 8 assistant general manager hotel resume samples
jomsgue
 
Jason Pannell Resume
Jason Pannell ResumeJason Pannell Resume
Jason Pannell Resume
Jason Pannell
 
Making Sense of NoSQL and Big Data Amidst High Expectations
Making Sense of NoSQL and Big Data Amidst High ExpectationsMaking Sense of NoSQL and Big Data Amidst High Expectations
Making Sense of NoSQL and Big Data Amidst High Expectations
Rackspace
 
Straight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food Genius
Straight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food GeniusStraight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food Genius
Straight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food Genius
Rackspace
 

Destaque (11)

Enterprise Cloud Forum Rackspace IT: Journey to the Cloud
Enterprise Cloud Forum Rackspace IT: Journey to the CloudEnterprise Cloud Forum Rackspace IT: Journey to the Cloud
Enterprise Cloud Forum Rackspace IT: Journey to the Cloud
 
Scaling Xen Within Rackspace Cloud Servers
Scaling Xen Within Rackspace Cloud ServersScaling Xen Within Rackspace Cloud Servers
Scaling Xen Within Rackspace Cloud Servers
 
Top 8 assistant general manager hotel resume samples
Top 8 assistant general manager hotel resume samplesTop 8 assistant general manager hotel resume samples
Top 8 assistant general manager hotel resume samples
 
vSphere with Openstack
vSphere with OpenstackvSphere with Openstack
vSphere with Openstack
 
Jason Pannell Resume
Jason Pannell ResumeJason Pannell Resume
Jason Pannell Resume
 
Making Sense of NoSQL and Big Data Amidst High Expectations
Making Sense of NoSQL and Big Data Amidst High ExpectationsMaking Sense of NoSQL and Big Data Amidst High Expectations
Making Sense of NoSQL and Big Data Amidst High Expectations
 
Behind The Scenes: New Rackspace Cloud Control Panel
Behind The Scenes:  New Rackspace Cloud Control PanelBehind The Scenes:  New Rackspace Cloud Control Panel
Behind The Scenes: New Rackspace Cloud Control Panel
 
Straight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food Genius
Straight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food GeniusStraight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food Genius
Straight Up Startup…Featuring Eli Rosenberg, COO & Co-Founder of Food Genius
 
Rackspace::Solve NYC - Solving for Rapid Customer Growth and Scale Through De...
Rackspace::Solve NYC - Solving for Rapid Customer Growth and Scale Through De...Rackspace::Solve NYC - Solving for Rapid Customer Growth and Scale Through De...
Rackspace::Solve NYC - Solving for Rapid Customer Growth and Scale Through De...
 
RMS Security Breakfast
RMS Security BreakfastRMS Security Breakfast
RMS Security Breakfast
 
6 Commonly Asked Questions from Customers Building on AWS
6 Commonly Asked Questions from Customers Building on AWS6 Commonly Asked Questions from Customers Building on AWS
6 Commonly Asked Questions from Customers Building on AWS
 

Semelhante a Polyglot Persistence

Unlocked London - Technical Track
Unlocked London - Technical TrackUnlocked London - Technical Track
Unlocked London - Technical Track
Wayne Walls
 
The data model is dead, long live the data model
The data model is dead, long live the data modelThe data model is dead, long live the data model
The data model is dead, long live the data model
Patrick McFadin
 

Semelhante a Polyglot Persistence (13)

Unlocked London - Technical Track
Unlocked London - Technical TrackUnlocked London - Technical Track
Unlocked London - Technical Track
 
Building Antifragile Applications with Apache Cassandra
Building Antifragile Applications with Apache CassandraBuilding Antifragile Applications with Apache Cassandra
Building Antifragile Applications with Apache Cassandra
 
Cassandra at scale
Cassandra at scaleCassandra at scale
Cassandra at scale
 
SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.
 
Making the Switch, Part 1: Top 5 Things to Consider When Evaluating Drupal
Making the Switch, Part 1: Top 5 Things to Consider When Evaluating DrupalMaking the Switch, Part 1: Top 5 Things to Consider When Evaluating Drupal
Making the Switch, Part 1: Top 5 Things to Consider When Evaluating Drupal
 
Couchbase 3.0.2 d1
Couchbase 3.0.2  d1Couchbase 3.0.2  d1
Couchbase 3.0.2 d1
 
Semi Formal Model for Document Oriented Databases
Semi Formal Model for Document Oriented DatabasesSemi Formal Model for Document Oriented Databases
Semi Formal Model for Document Oriented Databases
 
Crafting Solutions with the Elastic Stack: pragmatic takes and lessons learned
Crafting Solutions with the Elastic Stack: pragmatic takes and lessons learnedCrafting Solutions with the Elastic Stack: pragmatic takes and lessons learned
Crafting Solutions with the Elastic Stack: pragmatic takes and lessons learned
 
Mongo db
Mongo dbMongo db
Mongo db
 
What can we learn from NoSQL technologies?
What can we learn from NoSQL technologies?What can we learn from NoSQL technologies?
What can we learn from NoSQL technologies?
 
Introduction to Riak - Joel Jacobson
Introduction to Riak - Joel JacobsonIntroduction to Riak - Joel Jacobson
Introduction to Riak - Joel Jacobson
 
The data model is dead, long live the data model
The data model is dead, long live the data modelThe data model is dead, long live the data model
The data model is dead, long live the data model
 
Prague data management meetup 2018-02-27
Prague data management meetup 2018-02-27Prague data management meetup 2018-02-27
Prague data management meetup 2018-02-27
 

Mais de Wayne Walls

HubSpot Case Study
HubSpot Case StudyHubSpot Case Study
HubSpot Case Study
Wayne Walls
 
Everything as Code
Everything as CodeEverything as Code
Everything as Code
Wayne Walls
 
Cloudify Your Business
Cloudify Your BusinessCloudify Your Business
Cloudify Your Business
Wayne Walls
 
The 5 Pillars of Cloudiness
The 5 Pillars of CloudinessThe 5 Pillars of Cloudiness
The 5 Pillars of Cloudiness
Wayne Walls
 
Unlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part IIUnlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part II
Wayne Walls
 
Unlocked London - General Session
Unlocked London - General SessionUnlocked London - General Session
Unlocked London - General Session
Wayne Walls
 
Unlocked London - Case Studies
Unlocked London - Case StudiesUnlocked London - Case Studies
Unlocked London - Case Studies
Wayne Walls
 

Mais de Wayne Walls (9)

HubSpot Case Study
HubSpot Case StudyHubSpot Case Study
HubSpot Case Study
 
Everything as Code
Everything as CodeEverything as Code
Everything as Code
 
Cloudify Your Business
Cloudify Your BusinessCloudify Your Business
Cloudify Your Business
 
The 5 Pillars of Cloudiness
The 5 Pillars of CloudinessThe 5 Pillars of Cloudiness
The 5 Pillars of Cloudiness
 
Unlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part IIUnlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part II
 
Unlocked London - General Session
Unlocked London - General SessionUnlocked London - General Session
Unlocked London - General Session
 
Unlocked London - Case Studies
Unlocked London - Case StudiesUnlocked London - Case Studies
Unlocked London - Case Studies
 
Agile-Techture: Nimble Cloud Engineering at Rackspace
Agile-Techture:  Nimble Cloud Engineering at RackspaceAgile-Techture:  Nimble Cloud Engineering at Rackspace
Agile-Techture: Nimble Cloud Engineering at Rackspace
 
Cloud Technology Stack Comparison (OpenStack) - Cloud Connect Chicago 2012
Cloud Technology Stack Comparison (OpenStack) - Cloud Connect Chicago 2012Cloud Technology Stack Comparison (OpenStack) - Cloud Connect Chicago 2012
Cloud Technology Stack Comparison (OpenStack) - Cloud Connect Chicago 2012
 

Último

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Polyglot Persistence