SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
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

Más contenido relacionado

Destacado

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
 

Destacado (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
 

Similar 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
 

Similar 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
 

Más 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
 

Más 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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Polyglot Persistence