Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Timeline of MongoDB

A Timeline of MongoDB

In this presentation we go on a journey through the history of how MongoDB got introduced in our organization and have a look at what the future will bring.

Ffd7518e97f04b63220213947e9a3cfc?s=128

Nils De Moor

March 18, 2014
Tweet

Transcript

  1. MongoDB at woorank

  2. Text 3 Text2 Text1 Hi! I’m Nils De Moor, CTO

    & cofounder at WooRank. This is our dream team. That’s me!
  3. yrs old nations peeps avg age 4 8 20 27

  4. visitors/day reports/month criteria/report 40k 600k 120

  5. Text 3 Text2 Text1

  6. Text 3 Text2 Text1

  7. Text 3 Text2 Text1

  8. That’s a lot of data! 

  9. Text 3 Text2 Text1 Now this is the story all

    about how
  10. MySQL

  11. But I have to confess something...

  12. But I have to confess something... ...and it ain’t gonna

    be pretty
  13. But i have to confess something... ...and it’s gonna be

    ugly Raw HTML was stored in the DB
  14. None
  15. MySQL + JSON

  16. unified format bloated slow alter + - -

  17. MySQL + JSON + S3

  18. way faster slow listing no data queries + - -

  19. redis

  20. way faster slow leaderboards no data queries + - -

    Yay! Leaderboards!
  21. Extension  Woorank

  22. way... way faster listing no data queries + + -

  23. DynamoDB

  24. way... way faster listing data queries + + +

  25. Text 3 Text2 Text1 Done deal!

  26. “What’s the avg number of visits on UK websites?” “What’s

    the most used javascript framework?” “How many websites mention the word ‘car’?” “How many websites are optimized for mobile?”
  27. “What’s the avg number of visits on UK websites?” “What’s

    the most used javascript framework?” “How many websites mention the word ‘car’?” “How many websites are optimized for mobile?” ? ? ? ? ? ? ? ?
  28. Uhm...

  29. MongoDB 

  30. JSON  BSON

  31.  ...

  32. None
  33. Index, index, index

  34. Index, index, index ...but index smartly

  35. Cover your queries

  36. { _id: 1, user: “john”, status: “A”, name: { first:

    “John”, last”: “Doe” } } db.users.ensureIndex( { status: 1, user: 1 } )
  37. db.users.find( { _id: 1 } ) Covered?

  38. db.users.find( { _id: 1 } ) Covered? No!

  39. db.users.find( { status: "A" }, { user: 1 } )

    Covered?
  40. db.users.find( { status: "A" }, { user: 1 } )

    Covered? No!
  41. db.users.find( { status: "A" }, { user: 1, _id: 0

    } ) Covered? Yes!
  42. { _id: 1, user: “john”, status: “A”, name: { first:

    “John”, last”: “Doe” } } db.users.ensureIndex( { status: 1, user: 1 } ) db.users.ensureIndex( { name: 1 } ) db.users.ensureIndex( { “name.first”: 1 } )
  43. db.users.find( { name: { first: "John" } }, { name:

    1, _id: 0 } ) Covered?
  44. db.users.find( { name: { first: "John" } }, { name:

    1, _id: 0 } ) Covered? Yes!
  45. db.users.find({"name.first": "John"}, { "name.first": 1, _id: 0 }) Covered?

  46. db.users.find({"name.first": "John"}, { "name.first": 1, _id: 0 }) Covered? No!

  47. explain()  indexOnly In Doubt?

  48. Memory! Index + Cache

  49. Text 3 Text2 Text1

  50. Mesos

  51. None
  52. Thank You!

  53. Thank You! Psst... we’re hiring

  54. Photo Credit http://24.media.tumblr.com/tumblr_m40zdxT4fP1qght35o6_1280.jpg http://sambaumgarten.me/wp-content/uploads/2013/03/photodune-907223-html-code-m-e1363805086580.jpg http://wallpapers87.com/wallpapers/Counter-Strike-icons-headshot-_255551-25.jpg http://underneaththeirrobes.blogs.com/.a/6a00d83455028f69e201156fa4f118970c-800wi http://weedactivist.com/wp-content/uploads/more.1.png http://mesosphere.io/ http://timemanagementninja.com/wp-content/uploads/2012/12/Do-One-Thing.jpg http://fontawesome.io