Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

PHP Quebec - May 2015

300 visualizaciones

Publicado el

Polyglot Databases - PHP Quebec - May 2015

Publicado en: Ingeniería
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

PHP Quebec - May 2015

  1. 1. Polyglot Databases PHP Québec May.2015
  2. 2. @majidfn Majid Fatemian Ubisoft Montreal
  3. 3. Relational
  4. 4. DATA
  5. 5. BIG DATA
  6. 6. NoSQL
  7. 7. 1 2 3 Non-Relational Cluster Schemaless
  8. 8. 1. Document 2. Key-Value 3. Graph 4. Column MongoDB, CouchBase Memcache, Redis Neo4J, OrientDB Cassandra, HBase
  9. 9. A C P Availability Consistency Partition Tolerance
  10. 10. Consistency vailability A artition PConsistency vailability A artition P MongoDB MySQL Postgres CouchBase Cassandra Riak
  11. 11. Fitness Evolved
  12. 12. Fitness Evolved
  13. 13. Fitness Evolved
  14. 14. Fitness Evolved
  15. 15. 3M 15K 160K Players CCU Daily Ses. STATS
  16. 16. 2011 2012 2013 2014
  17. 17. 2011 2012 2013 201
  18. 18. Application
  19. 19. Normalized ACID Transaction{Consistency Relational
  20. 20. Replication Table Partitioning Availability {Relational
  21. 21. OPs / DBAs Tools Devs{DevOps Relational
  22. 22. 2011 2012 2013 201
  23. 23. Aggregated … Detailed Profile Community History Leaderboards
  24. 24. Single Point Failure Availability } Relational
  25. 25. Scalability Relational
  26. 26. Schema Relational {
 player_id: 1234,
 * calories: 40,
 * duration: 75, * activity: jumping_ropes,
 game_id: 4001,
 platform: WiiU, difficulty_level: medium,
 repetition: 178,
 score: 450,
 endurance:3
 } {
 player_id: 1234,
 calories: 75,
 duration: 120, activity: boxing
 }
  27. 27. Distribution Relational Data C Data B Data A Data Access Layer
  28. 28. ACID Transaction Partitioning Replication Tools OPs Data Volume Fixed Schema Scale Up Manual Sharding + -
  29. 29. NoSQL ...
  30. 30. mongoDB 1 2 3 OPs DEVs Community
  31. 31. Schemaless Non-Relational player_id: 1234,
 * calories: 40,
 * duration: 75, * activity: jumps, game_id: 4001,
 platform: WiiU, difficulty_level: 2,
 repetition: 178,
 score: 450,
 endurance:3 player_id: 1234,
 calories: 75,
 duration: 120, activity: boxing

  32. 32. Scalability Non-Relational
  33. 33. Scalability Non-Relational +
  34. 34. Sharding Non-Relational
  35. 35. Sharding Non-Relational Data A A Data B B Data CC
  36. 36. •DB Managed •Balanced Load Sharding Non-Relational •Sharding key •Bouncing •Decreased resilience
  37. 37. Map/Reduce Non-Relational R1 R2 R3
  38. 38. Map/Reduce Non-Relational QueryQueryQuery R1 R2 R3
  39. 39. Map/Reduce Non-Relational QueryQuery Query R1 R2 R3 Map
  40. 40. Map/Reduce Non-Relational QueryQuery Query R1 R2 R3 Result ReduceMap
  41. 41. Denormalized Non-Relationalread / }write Disk Space
  42. 42. Query Non-RelationalData Model Aggregation }
  43. 43. Eventual- Consistency Non-Relational X1 X1 X1
  44. 44. Eventual- Consistency Non-Relational X2 W X1 X1 X2
  45. 45. Eventual- Consistency Non-Relational X2 W X1 X1 R X1 X2
  46. 46. Eventual- Consistency Non-Relational X2 W X2 X2 R X2 X2
  47. 47. Locking Non-RelationalDB Level (2.2) }Document Level (3.0)
  48. 48. 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 +
  49. 49. 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
  50. 50. Persistence Polyglot
  51. 51. Master Slave Config Server Shard 1 Replicaset Shard 2 Replicaset
  52. 52. Data Access Layer
  53. 53. The Challenge
  54. 54. Inconsistency1
  55. 55. Data Access Layer Commit 2-Phase
  56. 56. Data Access Layer W Pending Commit 2-Phase
  57. 57. Data Access Layer Pending W Commit 2-Phase
  58. 58. Data Access Layer Done Commit 2-Phase
  59. 59. Consistency vs. Latency 2
  60. 60. Operations3
  61. 61. Availability4
  62. 62. Data Access Layer
  63. 63. Data Access Layer
  64. 64. Data Access Layer
  65. 65. Data Integrity5
  66. 66. Unit {TEST Integration Functional
  67. 67. DATA Migration
  68. 68. 1 One-Shot Migration 2 Profile Versioning 4 hrs !! Live !!
  69. 69. +1
  70. 70. R W V +1 1
  71. 71. R W V +1 2
  72. 72. Final Results
  73. 73. 2011 2012 2013 2014
  74. 74. 9x response time
  75. 75. 3 years uptime
  76. 76. > Go Hybrid, wisely!
  77. 77. > Go Hybrid, wisely! Denormalized data
 Eventual Consistency Evolving Schema-Less Large Scale Data Sharding Map/Reduce ACID Transaction Replication Tools, OPs Data Volume Fixed Schema Scaling
  78. 78. Thank YOU! @majidfn http://joind.in/14485

×