SlideShare une entreprise Scribd logo
1  sur  30
Data Storage Solutions
            for SNS game
Dinh Nguyen Anh Dung – P2S – G6 – VNG
CONTENT
• SNS games and SQL-based databases
• NoSQL technology and Couchbase
• NoSQL does not come without challenges
• SNS Storage Engine (SSE)
SNS games AND SQL-based databases
SNS games characteristics
• Huge amount of concurrent requests but
  require low response time
• Accounts can be stored separately
  – No need for centralized storage
  – In most cases, no need to put strict constrains on
    data relationship
Native limitations of SQL-based DBMS
• Centralized fundamentally
  – Vertical scale up issue
• Schema
  – High risk (and cost) for updates
• Normalized data
  – Unnecessary overhead: join tables, locking, data
    constrain check,…
Native limitations of SQL-based DBMS




                          Source : NoSQL - WhitePaper
Native limitations of SQL-based DBMS
• SQL processing overhead at both DBMS and
  client side.
• Most data accesses end up at hard-disk
  – Very challenging to meet low response time
  – Internal caching does not help much
• Hard to distributed data across multiple-
  servers
NoSQL technology and Couchbase
NoSQL technology
• Persistent distributed hash-table
• Active set resides on RAM
  – Extremely fast response time
• Horizontal scale up
• Raw and direct data access
  – set, get, add, inc, dec : no overhead
NoSQL technology
                     Key               Value
                     Jack.Gold         50123
                     Jack.Exp          4670
                     Jack.Coin         700
                     Peter.Gold        7050
                     Peter.Exp         20005
                     Peter.Coin        1


Key          Value         Key             Value   Key          Value
Peter.Gold   7050          Jack.Gold       50123   Peter.Coin   1
Jack.Exp     4670                                  Jack.Coin    700
Peter.Exp    20005
Active set on RAM
                     CLIENT




                ACTIVE SET ON RAM


                          Lazy write



                    HDD
Couchbase server
• Based on membase technology
• Distributed
• Replica
• Since 1.8, have native client for PHP
• Bucket types
  – Couchbase (persistent)
  – Memcache (memory only)
NoSQL does not come without challenges
Our first SNS game with Couchbase
Architecture and design issues
• Transition from relational database design to
  key-value design
  – Account data => keys : how ?
• Only minimum support for
  locking, concurrency control
  – add : failed if exists - mutex
  – cas : read get cas, write failed if cas is out-dated
Architecture and design issues
• No transaction support
  – Data corruption becomes so easy!
• No high-level data support (e.g. list,queue,…)
• No tools for raw data viewing / editing
Pitfalls
• Too much freedom for developers
  – Anyone can add / modify any key any time
• Epic key design mindset
  – One key for all : bad performance, concurrency
    control is a true night mare
• Abuse the power of set
  – Never fail ! Developer LOVE it !
SSE – SNS Storage Engine
Our second SNS game with Couchbase
What is SSE ?
• A thin “layer” between developers and the
  all-mighty Couchbase
  – SSE is simply a PHP library
• Provide better support for locking and
  concurrency control
  – Basic support for : Begin – update - commit
• Provide high-level data structures
  – Collection, queue, stack, integer (gold), inc-only
    integer (exp), binary flags (quest)…
What is SSE ?
• Minimize the risk of weak concurrency support
  – Ability to rollback pending writes
• Schema
  – Limit freedom of developers!
  – No more nightmare for backup and raw data
    view/editing
• Buffers to eliminate repeated read / writes
Raw account view / editing tool
What is SSE ?
What is SSE ?
Multi-instance architecture
• Replica is too costly to performance
• One node failed means cluster failed
• Adding nodes requires rebalance
  – Only good when having clusters with large
    number of nodes (more than 20 nodes)
Multi-instance architecture
• One instance for index (user-to-instance
  mapping)
  – Use APC on logic servers to cache / reduce load
    to index instance
• Many instances of data
  – Dynamically adjust weight on each instance base
    on average load of instance
  – Node failure only affects part of the user-base
Multi-instance architecture

       Game Logic   Game Logic      Game Logic    Game Logic


              APC      APC             APC            APC




    Index                 Data          Data         Data
   Instance            Instance 1    Instance 2   Instance 3
Disavantages
• Lower performance of multi-get
• Not well balance between instances in terms
  of accesses
How good is SSE for us ?
• No more data loss due to concurrency
• No more data corruption
• No mysterious bugs due to un-intended
  writes
• Reduce more than 3 times workload of server
  developers
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh

Contenu connexe

Tendances

Play concurrency
Play concurrencyPlay concurrency
Play concurrency
Justin Long
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
hannonhill
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
Amazee Labs
 
Server modeling with mysql
Server modeling with mysqlServer modeling with mysql
Server modeling with mysql
DaeMyung Kang
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupal
Ronan Berder
 

Tendances (19)

Modern MySQL Monitoring and Dashboards.
Modern MySQL Monitoring and Dashboards.Modern MySQL Monitoring and Dashboards.
Modern MySQL Monitoring and Dashboards.
 
Scaling Pinterest
Scaling PinterestScaling Pinterest
Scaling Pinterest
 
[JSS2015] AlwaysOn 2016
[JSS2015] AlwaysOn 2016[JSS2015] AlwaysOn 2016
[JSS2015] AlwaysOn 2016
 
NSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves GoelevenNSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves Goeleven
 
Scaling High Traffic Web Applications
Scaling High Traffic Web ApplicationsScaling High Traffic Web Applications
Scaling High Traffic Web Applications
 
10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL
 
Random thoughts on sql server performance
Random thoughts on sql server performanceRandom thoughts on sql server performance
Random thoughts on sql server performance
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
Play concurrency
Play concurrencyPlay concurrency
Play concurrency
 
Scaling MongoDB in the cloud with Microsoft Azure
Scaling MongoDB in the cloud with Microsoft AzureScaling MongoDB in the cloud with Microsoft Azure
Scaling MongoDB in the cloud with Microsoft Azure
 
Who wants to be a DBA? Roles and Responsibilities
Who wants to be a DBA? Roles and ResponsibilitiesWho wants to be a DBA? Roles and Responsibilities
Who wants to be a DBA? Roles and Responsibilities
 
Day 4 - Models
Day 4 - ModelsDay 4 - Models
Day 4 - Models
 
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's ToolchestMaking MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
 
Backup and Restore SQL Server Databases in Microsoft Azure
Backup and Restore SQL Server Databases in Microsoft AzureBackup and Restore SQL Server Databases in Microsoft Azure
Backup and Restore SQL Server Databases in Microsoft Azure
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
 
Server modeling with mysql
Server modeling with mysqlServer modeling with mysql
Server modeling with mysql
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupal
 

En vedette

Mobile first 2014 final
Mobile first 2014 finalMobile first 2014 final
Mobile first 2014 final
Thanh Dao
 

En vedette (8)

4. VNG presentation 2011
4. VNG presentation 20114. VNG presentation 2011
4. VNG presentation 2011
 
Mobile first 2014 final
Mobile first 2014 finalMobile first 2014 final
Mobile first 2014 final
 
2. Bluetooth Low Energy và ứng dụng thực tế_Mr. Châu Nguyễn Nhật Thanh VNG Corp.
2. Bluetooth Low Energy và ứng dụng thực tế_Mr. Châu Nguyễn Nhật Thanh VNG Corp.2. Bluetooth Low Energy và ứng dụng thực tế_Mr. Châu Nguyễn Nhật Thanh VNG Corp.
2. Bluetooth Low Energy và ứng dụng thực tế_Mr. Châu Nguyễn Nhật Thanh VNG Corp.
 
What is a Good Game? (From the Perspective of a Game Publisher) | Christopher...
What is a Good Game? (From the Perspective of a Game Publisher) | Christopher...What is a Good Game? (From the Perspective of a Game Publisher) | Christopher...
What is a Good Game? (From the Perspective of a Game Publisher) | Christopher...
 
OGDC2013_ Making of Sky garden Artwork_ Mr Nguyen Ngoc Hoang
OGDC2013_ Making of Sky garden Artwork_  Mr Nguyen Ngoc HoangOGDC2013_ Making of Sky garden Artwork_  Mr Nguyen Ngoc Hoang
OGDC2013_ Making of Sky garden Artwork_ Mr Nguyen Ngoc Hoang
 
Mobile Game Asia 2015 Ho Chi Minh City: The role of a game publisher in Vietnam
Mobile Game Asia 2015 Ho Chi Minh City: The role of a game publisher in VietnamMobile Game Asia 2015 Ho Chi Minh City: The role of a game publisher in Vietnam
Mobile Game Asia 2015 Ho Chi Minh City: The role of a game publisher in Vietnam
 
Zalo Profile
Zalo ProfileZalo Profile
Zalo Profile
 
VNG/IRD - Cloud computing & Openstack discussion 3/5/2014
VNG/IRD - Cloud computing & Openstack discussion 3/5/2014VNG/IRD - Cloud computing & Openstack discussion 3/5/2014
VNG/IRD - Cloud computing & Openstack discussion 3/5/2014
 

Similaire à OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh

Data storage solutions for sns game
Data storage solutions for sns gameData storage solutions for sns game
Data storage solutions for sns game
Son Aris
 
Data Storage Solutions for SNS game
Data Storage Solutions for SNS gameData Storage Solutions for SNS game
Data Storage Solutions for SNS game
we20
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
xlight
 
Sony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development DivisionSony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development Division
Slide_N
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At Craigslist
MySQLConference
 

Similaire à OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh (20)

Data storage solutions for sns game
Data storage solutions for sns gameData storage solutions for sns game
Data storage solutions for sns game
 
Data Storage Solutions for SNS game
Data Storage Solutions for SNS gameData Storage Solutions for SNS game
Data Storage Solutions for SNS game
 
Network support for resource disaggregation in next-generation datacenters
Network support for resource disaggregation in next-generation datacentersNetwork support for resource disaggregation in next-generation datacenters
Network support for resource disaggregation in next-generation datacenters
 
Yes sql08 inmemorydb
Yes sql08 inmemorydbYes sql08 inmemorydb
Yes sql08 inmemorydb
 
Intro to Cassandra
Intro to CassandraIntro to Cassandra
Intro to Cassandra
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Building a High Performance Analytics Platform
Building a High Performance Analytics PlatformBuilding a High Performance Analytics Platform
Building a High Performance Analytics Platform
 
A Global In-memory Data System for MySQL
A Global In-memory Data System for MySQLA Global In-memory Data System for MySQL
A Global In-memory Data System for MySQL
 
Running MongoDB in the Cloud
Running MongoDB in the CloudRunning MongoDB in the Cloud
Running MongoDB in the Cloud
 
Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)
 
Sony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development DivisionSony Computer Entertainment Europe Research & Development Division
Sony Computer Entertainment Europe Research & Development Division
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Java
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
 
PayPal Big Data and MySQL Cluster
PayPal Big Data and MySQL ClusterPayPal Big Data and MySQL Cluster
PayPal Big Data and MySQL Cluster
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
My Sql And Search At Craigslist
My Sql And Search At CraigslistMy Sql And Search At Craigslist
My Sql And Search At Craigslist
 

Plus de Buff Nguyen

Plus de Buff Nguyen (18)

OGDC2012 Vision of VN Game Industry_Mr.Minh,Le Hong
OGDC2012 Vision of VN Game Industry_Mr.Minh,Le HongOGDC2012 Vision of VN Game Industry_Mr.Minh,Le Hong
OGDC2012 Vision of VN Game Industry_Mr.Minh,Le Hong
 
OGDC2012 Just-in-time Operation in Social Games_Mr.Eiji Okuda_Glooops
OGDC2012 Just-in-time Operation in Social Games_Mr.Eiji Okuda_GlooopsOGDC2012 Just-in-time Operation in Social Games_Mr.Eiji Okuda_Glooops
OGDC2012 Just-in-time Operation in Social Games_Mr.Eiji Okuda_Glooops
 
OGDC2012 Thiet Ke Sang Tao Cho Mobile Game_Ms.Nhung, Nguyen Hong_Ruby Cell
OGDC2012 Thiet Ke Sang Tao Cho Mobile Game_Ms.Nhung, Nguyen Hong_Ruby CellOGDC2012 Thiet Ke Sang Tao Cho Mobile Game_Ms.Nhung, Nguyen Hong_Ruby Cell
OGDC2012 Thiet Ke Sang Tao Cho Mobile Game_Ms.Nhung, Nguyen Hong_Ruby Cell
 
OGDC2012 Driving Vietnam's and Your Own Future_Mr.Tetsuya Mori_DeNA
OGDC2012 Driving Vietnam's and Your Own Future_Mr.Tetsuya Mori_DeNAOGDC2012 Driving Vietnam's and Your Own Future_Mr.Tetsuya Mori_DeNA
OGDC2012 Driving Vietnam's and Your Own Future_Mr.Tetsuya Mori_DeNA
 
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNAOGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
 
OGDC2012 Game Designer_Mr.Nicolas_ Phuong Hoang Enix
OGDC2012 Game Designer_Mr.Nicolas_ Phuong Hoang EnixOGDC2012 Game Designer_Mr.Nicolas_ Phuong Hoang Enix
OGDC2012 Game Designer_Mr.Nicolas_ Phuong Hoang Enix
 
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc VuOGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
OGDC2012 2D Art For Realtime 3D Web Game_Mr. Khanh, Pham Ngoc Vu
 
OGDC2012 SNS Balance_2012_Mr.Le Anh Minh
OGDC2012 SNS Balance_2012_Mr.Le Anh MinhOGDC2012 SNS Balance_2012_Mr.Le Anh Minh
OGDC2012 SNS Balance_2012_Mr.Le Anh Minh
 
OGDC2012 Building An MMOG For SNS Audiences_Mr. Quang, Dang Hong
OGDC2012 Building An MMOG For SNS Audiences_Mr. Quang, Dang HongOGDC2012 Building An MMOG For SNS Audiences_Mr. Quang, Dang Hong
OGDC2012 Building An MMOG For SNS Audiences_Mr. Quang, Dang Hong
 
OGDC2012 Data centric Design & Operation_Mr. Hieu, Nguyen Chi
OGDC2012 Data centric Design & Operation_Mr. Hieu, Nguyen ChiOGDC2012 Data centric Design & Operation_Mr. Hieu, Nguyen Chi
OGDC2012 Data centric Design & Operation_Mr. Hieu, Nguyen Chi
 
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen NgocOGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
 
OGDC Recruiting and Developing Human Resource in Game Studio_Mr. Tu, Truong D...
OGDC Recruiting and Developing Human Resource in Game Studio_Mr. Tu, Truong D...OGDC Recruiting and Developing Human Resource in Game Studio_Mr. Tu, Truong D...
OGDC Recruiting and Developing Human Resource in Game Studio_Mr. Tu, Truong D...
 
OGDC2012_The Story Inside Art Of Cam Gioi 3_Mr. Lam, Nguyen Quang
OGDC2012_The Story Inside Art Of Cam Gioi 3_Mr. Lam, Nguyen QuangOGDC2012_The Story Inside Art Of Cam Gioi 3_Mr. Lam, Nguyen Quang
OGDC2012_The Story Inside Art Of Cam Gioi 3_Mr. Lam, Nguyen Quang
 
OGDC2012 Game interface Design_Mr.Phu, Nguyen Xuan
OGDC2012 Game interface Design_Mr.Phu, Nguyen XuanOGDC2012 Game interface Design_Mr.Phu, Nguyen Xuan
OGDC2012 Game interface Design_Mr.Phu, Nguyen Xuan
 
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo ThaiOGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
OGDC2012 A Practical Architecture Design For MMO Casual Game_Mr. An, Ngo Thai
 
OGDC2012 Maintaining Longevity Of An SNS Game_Mr. Nhut, Nguyen Minh
OGDC2012 Maintaining Longevity Of An SNS Game_Mr. Nhut, Nguyen MinhOGDC2012 Maintaining Longevity Of An SNS Game_Mr. Nhut, Nguyen Minh
OGDC2012 Maintaining Longevity Of An SNS Game_Mr. Nhut, Nguyen Minh
 
OGDC2012 Art Style In Game Hang Rong_Mr. Hieu, Luc Hoang
OGDC2012 Art Style In Game Hang Rong_Mr. Hieu, Luc HoangOGDC2012 Art Style In Game Hang Rong_Mr. Hieu, Luc Hoang
OGDC2012 Art Style In Game Hang Rong_Mr. Hieu, Luc Hoang
 
OGDC2012 Operating Vietnamese Games In China_Mr.Liu C Christopher
OGDC2012 Operating Vietnamese Games In China_Mr.Liu C ChristopherOGDC2012 Operating Vietnamese Games In China_Mr.Liu C Christopher
OGDC2012 Operating Vietnamese Games In China_Mr.Liu C Christopher
 

Dernier

unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Anamikakaur10
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
Matteo Carbone
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
amitlee9823
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
dlhescort
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
lizamodels9
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Dernier (20)

Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 

OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh

  • 1. Data Storage Solutions for SNS game Dinh Nguyen Anh Dung – P2S – G6 – VNG
  • 2. CONTENT • SNS games and SQL-based databases • NoSQL technology and Couchbase • NoSQL does not come without challenges • SNS Storage Engine (SSE)
  • 3. SNS games AND SQL-based databases
  • 4. SNS games characteristics • Huge amount of concurrent requests but require low response time • Accounts can be stored separately – No need for centralized storage – In most cases, no need to put strict constrains on data relationship
  • 5. Native limitations of SQL-based DBMS • Centralized fundamentally – Vertical scale up issue • Schema – High risk (and cost) for updates • Normalized data – Unnecessary overhead: join tables, locking, data constrain check,…
  • 6. Native limitations of SQL-based DBMS Source : NoSQL - WhitePaper
  • 7. Native limitations of SQL-based DBMS • SQL processing overhead at both DBMS and client side. • Most data accesses end up at hard-disk – Very challenging to meet low response time – Internal caching does not help much • Hard to distributed data across multiple- servers
  • 9. NoSQL technology • Persistent distributed hash-table • Active set resides on RAM – Extremely fast response time • Horizontal scale up • Raw and direct data access – set, get, add, inc, dec : no overhead
  • 10. NoSQL technology Key Value Jack.Gold 50123 Jack.Exp 4670 Jack.Coin 700 Peter.Gold 7050 Peter.Exp 20005 Peter.Coin 1 Key Value Key Value Key Value Peter.Gold 7050 Jack.Gold 50123 Peter.Coin 1 Jack.Exp 4670 Jack.Coin 700 Peter.Exp 20005
  • 11. Active set on RAM CLIENT ACTIVE SET ON RAM Lazy write HDD
  • 12. Couchbase server • Based on membase technology • Distributed • Replica • Since 1.8, have native client for PHP • Bucket types – Couchbase (persistent) – Memcache (memory only)
  • 13. NoSQL does not come without challenges
  • 14. Our first SNS game with Couchbase
  • 15. Architecture and design issues • Transition from relational database design to key-value design – Account data => keys : how ? • Only minimum support for locking, concurrency control – add : failed if exists - mutex – cas : read get cas, write failed if cas is out-dated
  • 16. Architecture and design issues • No transaction support – Data corruption becomes so easy! • No high-level data support (e.g. list,queue,…) • No tools for raw data viewing / editing
  • 17. Pitfalls • Too much freedom for developers – Anyone can add / modify any key any time • Epic key design mindset – One key for all : bad performance, concurrency control is a true night mare • Abuse the power of set – Never fail ! Developer LOVE it !
  • 18. SSE – SNS Storage Engine
  • 19. Our second SNS game with Couchbase
  • 20. What is SSE ? • A thin “layer” between developers and the all-mighty Couchbase – SSE is simply a PHP library • Provide better support for locking and concurrency control – Basic support for : Begin – update - commit • Provide high-level data structures – Collection, queue, stack, integer (gold), inc-only integer (exp), binary flags (quest)…
  • 21. What is SSE ? • Minimize the risk of weak concurrency support – Ability to rollback pending writes • Schema – Limit freedom of developers! – No more nightmare for backup and raw data view/editing • Buffers to eliminate repeated read / writes
  • 22. Raw account view / editing tool
  • 25. Multi-instance architecture • Replica is too costly to performance • One node failed means cluster failed • Adding nodes requires rebalance – Only good when having clusters with large number of nodes (more than 20 nodes)
  • 26. Multi-instance architecture • One instance for index (user-to-instance mapping) – Use APC on logic servers to cache / reduce load to index instance • Many instances of data – Dynamically adjust weight on each instance base on average load of instance – Node failure only affects part of the user-base
  • 27. Multi-instance architecture Game Logic Game Logic Game Logic Game Logic APC APC APC APC Index Data Data Data Instance Instance 1 Instance 2 Instance 3
  • 28. Disavantages • Lower performance of multi-get • Not well balance between instances in terms of accesses
  • 29. How good is SSE for us ? • No more data loss due to concurrency • No more data corruption • No mysterious bugs due to un-intended writes • Reduce more than 3 times workload of server developers