Rapid Development withSchema-less Data modelsKeith ChilekSVP, Engineering
The online professional network for students and early professionals                                      3/8/13 | 2
With our data & tools,           our members can betterManage their      Tell their         Get a job education          s...
Growth     Technology Stack What is the MyEdu Profile?MongoDb vs MySQL Decision Version 1 Using MongoDBLearning From Our M...
We’re Building for Growth9,000,0008,000,0007,000,0006,000,0005,000,0004,000,0003,000,0002,000,0001,000,000       0        ...
MyEdu’s Technology StackJavascriptScriptingMiddlewareDatabase                                        3/8/13 | 6
3/8/13 | 7
“The only constant is change, continuing  change, inevitable change, that is the    dominant factor in society today.  No ...
MongoDB vs MySQL    Move fast, iterate oftenMinimize the downtime required    to launch new featuresMake sure the new prod...
MongoDB vs MySQL                             “Schema-less                          design is impossible“We can do all of  ...
MongoDB vs MySQL“We can doall of that in MySQL.”                                    3/8/13 | 11
MongoDB vs MySQL          SELECT * FROM User, School, Major!          WHERE User.school_id = School.school_id!          AN...
MongoDB vs MySQL“We can doall of that in MySQL.”                                    3/8/13 | 13
MongoDB vs MySQL       SELECT * FROM User, User_School, User_Major,            !     ! School, Major!       WHERE User_Sch...
MongoDB vs MySQL“We can doall of that in MySQL.”                                    3/8/13 | 15
MongoDB vs MySQL          SELECT * FROM User, User_School, User_Major,          User_Work, User_Project, School, Major, Wo...
MongoDB vs MySQLYikes!                            3/8/13 | 17
MongoDB vs MySQLLooks like a Mongo document to me!                     3/8/13 | 18
MongoDB vs MySQLdb.user_profile.find({“user_id” : 1021});!                                             3/8/13 | 19
MongoDB vs MySQL   Lucky for us, the web services team hadalready been employing a Service / Mapper /                Model...
MongoDB FTW!   MongoDB allows us to…    Move fast, iterate oftenMinimize the downtime required    to launch new featuresMa...
MyEdu Profile (iteration 1: October)                          3/8/13 | 22
MyEdu Profile(iteration 2: November)                          3/8/13 | 23
MyEdu Profile (iteration 3: January)                          3/8/13 | 24
Make sure the new product will          really, really scale With proper indexing alone, we have over600k mongo profile do...
It’s not all peaches and crème…                     Oops! Bad Index                                       3/8/13 | 26
Lessons LearnedA schema-less data model has many benefits. We can rapidly change our data to meet the    needs of new prod...
What’s next?  Event tracking with MongoDB          Map ReduceUsing Json Patch for doing updates                           ...
Thanks!Keith ChilekSVP, Engineeringkeith.chilek@myedu.com                         We’re Hiring!
Thanks!Keith ChilekSVP, Engineeringkeith.chilek@myedu.com                         We’re Hiring!
Upcoming SlideShare
Loading in …5
×

Rapid Development with Schemaless Data Models

706 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
706
On SlideShare
0
From Embeds
0
Number of Embeds
231
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rapid Development with Schemaless Data Models

  1. 1. Rapid Development withSchema-less Data modelsKeith ChilekSVP, Engineering
  2. 2. The online professional network for students and early professionals 3/8/13 | 2
  3. 3. With our data & tools, our members can betterManage their Tell their Get a job education story 3/8/13 | 3
  4. 4. Growth Technology Stack What is the MyEdu Profile?MongoDb vs MySQL Decision Version 1 Using MongoDBLearning From Our Mistakes 3/8/13 | 4
  5. 5. We’re Building for Growth9,000,0008,000,0007,000,0006,000,0005,000,0004,000,0003,000,0002,000,0001,000,000 0 Jul Aug Sep Oct Nov Dec Jan 2012 2012 2012 2012 2012 2012 2013 3/8/13 | 5
  6. 6. MyEdu’s Technology StackJavascriptScriptingMiddlewareDatabase 3/8/13 | 6
  7. 7. 3/8/13 | 7
  8. 8. “The only constant is change, continuing change, inevitable change, that is the dominant factor in society today. No sensible decision can be made anylonger without taking into account not only the world as it is, but the world as it will be.” Isaac Asimov 3/8/13 | 8
  9. 9. MongoDB vs MySQL Move fast, iterate oftenMinimize the downtime required to launch new featuresMake sure the new product will really, really scale 3/8/13 | 9
  10. 10. MongoDB vs MySQL “Schema-less design is impossible“We can do all of to maintain.” that in MySQL.” 3/8/13 | 10
  11. 11. MongoDB vs MySQL“We can doall of that in MySQL.” 3/8/13 | 11
  12. 12. MongoDB vs MySQL SELECT * FROM User, School, Major! WHERE User.school_id = School.school_id! AND User.major_id = Major.major_Id! AND User.user_Id = 1021!“We can doall of that in MySQL.” 3/8/13 | 12
  13. 13. MongoDB vs MySQL“We can doall of that in MySQL.” 3/8/13 | 13
  14. 14. MongoDB vs MySQL SELECT * FROM User, User_School, User_Major, ! ! School, Major! WHERE User_School.school_id = School.school_id! AND User_Major.major_id = Major.major_Id! AND User.user_id = User_Major.user_id! AND User.user_id = User_School.user_id! AND User.user_Id = 1021!“We can doall of that in MySQL.” 3/8/13 | 14
  15. 15. MongoDB vs MySQL“We can doall of that in MySQL.” 3/8/13 | 15
  16. 16. MongoDB vs MySQL SELECT * FROM User, User_School, User_Major, User_Work, User_Project, School, Major, Work, Project! WHERE User_School.school_id = School.school_id! AND User_Major.major_id = Major.major_Id! AND User_Project.project_id = Project.project_Id! AND User_Work.work_id = Work.work_Id! AND User.user_id = User_Major.user_id! AND User.user_id = User_School.user_id! AND User.user_id = User_Work.user_id! AND User.user_id = User_Project.user_id! AND User.user_Id = 1021!“We can doall of that in MySQL.” 3/8/13 | 16
  17. 17. MongoDB vs MySQLYikes! 3/8/13 | 17
  18. 18. MongoDB vs MySQLLooks like a Mongo document to me! 3/8/13 | 18
  19. 19. MongoDB vs MySQLdb.user_profile.find({“user_id” : 1021});! 3/8/13 | 19
  20. 20. MongoDB vs MySQL Lucky for us, the web services team hadalready been employing a Service / Mapper / Model pattern. With this pattern we are able to control the structure of each mongo document with a defined data model. “Schema- less design is impossible to maintain.” 3/8/13 | 20
  21. 21. MongoDB FTW! MongoDB allows us to… Move fast, iterate oftenMinimize the downtime required to launch new featuresMake sure the new product will really, really scale 3/8/13 | 21
  22. 22. MyEdu Profile (iteration 1: October) 3/8/13 | 22
  23. 23. MyEdu Profile(iteration 2: November) 3/8/13 | 23
  24. 24. MyEdu Profile (iteration 3: January) 3/8/13 | 24
  25. 25. Make sure the new product will really, really scale With proper indexing alone, we have over600k mongo profile documents on just a 3 member replica set.We lowered our overall site speed time by 0.3 seconds and lowered our profile productspeed 300% when we introduced MongoDB. 3/8/13 | 25
  26. 26. It’s not all peaches and crème… Oops! Bad Index 3/8/13 | 26
  27. 27. Lessons LearnedA schema-less data model has many benefits. We can rapidly change our data to meet the needs of new product features and requirements.The document object is a familiar structure for a web developer. 3/8/13 | 27
  28. 28. What’s next? Event tracking with MongoDB Map ReduceUsing Json Patch for doing updates 3/8/13 | 28
  29. 29. Thanks!Keith ChilekSVP, Engineeringkeith.chilek@myedu.com We’re Hiring!
  30. 30. Thanks!Keith ChilekSVP, Engineeringkeith.chilek@myedu.com We’re Hiring!

×