SlideShare a Scribd company logo
1 of 87
Download to read offline
Polyglot
Persistence
Majid Fatemian
R E D V E N T U R E S
@majidfn
Relational Non-Relational Key-Value Big Data
Application
Relational
Application
Relational Relational Non-Relational
Relational
BIG
DATA
Capture
Search
Storage
Q u e r y
Privacy
Visualize
Analysis
Non-Relational
1 2 3
Non-Relational Cluster Schemaless
2 x
1 x
1 x
2011
2012
2013
2014
2011
2012
2013
2014
Application
ACID
Normalized
{Consistency
Relational
Player ID Map ID Difficulty Score
1000 223 E 5
2000 673 H 4.5
1000 451 M 4
2000 980 H 3
Activity
Player ID Name Location
1000 John US
2000 Catherine CA
3000 Paul CA
4000 Kylee US
Profile
Replication
Fault Tolerance
Availability
{Relational
OPs / DBAs
Tools
Devs{DevOps
Relational
2011
2012
2013
2014
Scalability
Relational
Distribution
Relational
Data C
Data B
Data A
Data Access Layer
Schema
Relational
{

player_id: 1234,

* level: 40,

* duration: 75,
* activity: activity,

game_id: 4001,

platform: WiiU,
difficulty_level: medium,

repetition: 178,

score: 450,

endurance:3

}
{

player_id: 1234,

level: 12,

duration: 120,
activity: activity

}
Total
Detailed
stats
stats
Players Profiles
Individual Activities
Aggregated
stats
Categorized
ACID
Transaction
Partitioning
Replication
Tools
OPs
Data Volume
Fixed Schema
Scale Up
Manual Sharding
+ -
NoSQL
...
mongoDB
1 2 3
OPs Devs Community
Schema-less
Non-Relational
player_id: 1234,

* level: 40,

* duration: 75,
* activity: activity,
game_id: 4001,

platform: WiiU,
difficulty_level: 2,

repetition: 178,

score: 450,

endurance:3
player_id: 1234,

level: 75,

duration: 120,
activity: activity

Scalability
Non-Relational
Scalability
Non-Relational
+
Sharding
Non-Relational
Data A
{key}
Sharding
Non-Relational
Data A
A
Data B
B
Data C
C
{key}
Map/Reduce
Non-Relational
Query
K, V
K,V1 K,V2 K,V3
Map/Reduce
Non-Relational
Map
K,V1 K,V2 K,V3
Map/Reduce
Non-Relational
Result
ReduceMap
K,V1 K,V2 K,V3
Denormalized
Non-Relationalread /
}write
Disk Space
Player ID Map ID Difficulty Score
1000 223 E 5
2000 673 H 4.5
1000 451 M 4
2000 980 H 3
Activity
Player ID Name Location
1000 John US
2000 Catherine CA
3000 Paul CA
4000 Kylee US
Profile
{Name: John, game:1, activity: Mission01, Score: 1245}
{Name: John, game:3, activity: Mission04, score: 5431}
{Name: John, game:1, activity: Mission01, Score: 1245}
Data Model
Non-RelationalQuery
Aggregation
}
Eventual-
Consistency
Non-Relational
X2
W
X1 X1
X2
Eventual-
Consistency
Non-Relational
X2
W
X1 X1
R
X1
X2
Eventual-
Consistency
Non-Relational
X2
W
X2
X2
R
X2
X2
Balancer
Non-Relational
Balancer
Non-Relational
+
Balancer
Non-Relational
Non-Relational
Resilience
A B C
Non-Relational
Resilience
A C
Locking
Non-RelationalDB Level (2.2)
}Document Level (3.x)
Backup
Non-Relational
Point-in-time
Denormalized data
Disk Space
Expertise
Complex Querying

Eventual Consistency
Resource Usage
DB-Level Locking
-
Schema-Less
Aggregated Data
Large Scale Data
Sharding
Map/Reduce
Memory Storage
Journaling
+
Random Profile

Search

(1M)
Full History
Retrieval

(6M)
Insert

(6M)
Aggregation

Map/Reduce

(6M)
0
0.003
0.005
0.008
0.01
MySQL
MongoDB
Persistence
Polyglot
Players Profile
Leaderboards
Activity Details
Relational Data
Schema-less
Sharding
Total Sum
Activity 1
Activity n
Activity m
……
Shard1
Shard2
Config
Data Access Layer
Application
The
Challenge
Inconsistency1
Data Access Layer
W
Pending
Commit
2-Phase
Data Access Layer
Pending
W
Commit
2-Phase
Data Access Layer
Done
Commit
2-Phase
2 Latency
vs. Consistency
Operations3 Exponential complexity
Availability4 Plan for failure
Data Access Layer
Data Access Layer
Data Access Layer
Data Integrity5 Backward compatibility
Unit
{TEST Integration
Functional
Data Migration6
Profile
History }
{
profile:
{
GUID:…,
platform:
{
name:’xbox’,
xuid:…
}
},
activity:…,
duration:…,
datetime:…
}
3rd Party
1 One-Shot Migration
4 hours !!
Live !!
2 Profile versioning
V
+1
1
V
+1
1
V
+1
2
Final
Results
Scalability
2011 2012 2013 2014
9x response time
3 years uptime
Go Hybrid!
Thoughtfully
>
Thank
YOU!
@majidfn
References
Polyglot Persistence
NoSQL Distilled

More Related Content

Similar to Polyglot Persistence - Confoo 2016

Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...
Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...
Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...Neo4j
 
GraphTour - How to Build Next-Generation Solutions using Graph Databases
GraphTour - How to Build Next-Generation Solutions using Graph DatabasesGraphTour - How to Build Next-Generation Solutions using Graph Databases
GraphTour - How to Build Next-Generation Solutions using Graph DatabasesNeo4j
 
CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...
CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...
CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...CloudIDSummit
 
Introducción a Neo4j
Introducción a Neo4jIntroducción a Neo4j
Introducción a Neo4jNeo4j
 
CIS14: Why Federated Access Needs a Federated Identity
CIS14: Why Federated Access Needs a Federated IdentityCIS14: Why Federated Access Needs a Federated Identity
CIS14: Why Federated Access Needs a Federated IdentityCloudIDSummit
 

Similar to Polyglot Persistence - Confoo 2016 (6)

Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...
Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...
Neo4j GraphTalk Helsinki - Next-Gerneation Telecommunication Solutions with N...
 
GraphTour - How to Build Next-Generation Solutions using Graph Databases
GraphTour - How to Build Next-Generation Solutions using Graph DatabasesGraphTour - How to Build Next-Generation Solutions using Graph Databases
GraphTour - How to Build Next-Generation Solutions using Graph Databases
 
CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...
CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...
CIS14: Creating a Federated Identity Service for ABAC and WebAccess Managemen...
 
Introducción a Neo4j
Introducción a Neo4jIntroducción a Neo4j
Introducción a Neo4j
 
CIS14: Why Federated Access Needs a Federated Identity
CIS14: Why Federated Access Needs a Federated IdentityCIS14: Why Federated Access Needs a Federated Identity
CIS14: Why Federated Access Needs a Federated Identity
 
Repairing Hidden Links in Linked Data
Repairing Hidden Links in Linked DataRepairing Hidden Links in Linked Data
Repairing Hidden Links in Linked Data
 

Recently uploaded

Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 

Recently uploaded (20)

Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 

Polyglot Persistence - Confoo 2016