An Evening with MongoDB - Orlando: Welcome and Keynote

1,239 views

Published on

An Evening with MongoDB - Orlando: Welcome and Keynote

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,239
On SlideShare
0
From Embeds
0
Number of Embeds
50
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • Neal Ormsbee, co-founder of Feathr: Startups are Schema-less\nJeremy Mikola, software engineer at 10gen: Introduction to the New Aggregation Framework\nGrant Shipley, Redhat PaaS Evangelist: Mobilize your MongoDB! Developing iPhone and Android Apps in the Cloud\n
  • \n
  • \n\n
  • Supports relationships, but not required.\nJust save your JSON document to the database.\nNext: Relational. Come back to definition of Document oriented\n
  • Strict schema defined w/ CREATE TABLE\nRigid schema migrations\n
  • User defined products\nfew required properties\n\n
  • arbitrary/dynamic product attributes (user defined)\n\n
  • arbitrary/dynamic product attributes (user defined)\n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • we still need user defined properties\n
  • NEXT: shell example of saving a product\n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • we want fast queries\n
  • \n\n
  • \n\n
  • \n\n
  • geo-spatial\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • replicas tail the master oplog\n\n
  • 3 or more nodes preferred\nnetwork partition or node failure\nbackup of data\nconfigurable - (hidden nodes for reporting or disaster scenarios)\n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n
  • \n\n
  • \n\n
  • important for replication which uses internal oplog in the local db\n\n
  • when doc not in ram, yield until doc paged in from disk\non long running updates/deletes\nstarted in 2.0\n\n
  • generic tags on shards\ngeo aware, disk type, important/unimportant\n
  • \n\n
  • background mongod process removing docs once a minute\n
  • \n\n
  • \n
  • \n
  • An Evening with MongoDB - Orlando: Welcome and Keynote

    1. 1. An Evening With MongoDB
    2. 2. An Evening With MongoDB
    3. 3. An Intro to MongoDB ben.becker@10gen.com Evening with MongoDB Orlando
    4. 4. Data model
    5. 5. Data model • Document oriented
    6. 6. Data model • vs Relational
    7. 7. Data model • Relational Product _id name created_at
    8. 8. Data model • Relational Product _id name created_at Product_Attribute _id product_id key val
    9. 9. Data model • Relational • assembly required Product _id name created_at Product_Attribute _id product_id key val
    10. 10. Data model • Relational • assembly required • app model != storage model
    11. 11. Data model • Document oriented
    12. 12. Data model • Document oriented • JSON
    13. 13. Data model • Document oriented • JSON-like
    14. 14. Data model • Document oriented • JSON-like • BSON
    15. 15. Data model • Document oriented • JSON-like • BSON • basically typed JSON • number, string, binary, array, etc
    16. 16. Data modelDocument oriented{ _id: ObjectId(“..”), name: “Panthers T-shirt”, created_at: ISODate("2012-08-15T15:42:09.195Z")}
    17. 17. Data modelDocument oriented{ _id: ObjectId(“..”), name: “Panthers T-shirt”, created_at: ISODate("2012-08-15T15:42:09.195Z"), props: [{ key: ‘string’, val: anything }]}
    18. 18. Data model • Document oriented • Ad-hoc query support
    19. 19. Data modelAd-hoc query support
    20. 20. Data modelAd-hoc query support • find, findOne
    21. 21. Data modelAd-hoc query support • find, findOne • accept a conditions object • regular expressions • numbers • strings • etc
    22. 22. Data modelAd-hoc query support • find, findOne • accept a conditions object • regular expressions • numbers • strings • etc • rich operators • $lt, $gt, $in, $ne, ...
    23. 23. Data model • Document oriented • Ad-hoc query support • Secondary indexing
    24. 24. Data modelSecondary indexing
    25. 25. Data modelSecondary indexing • ensureIndex()
    26. 26. Data modelSecondary indexing • ensureIndex() • accepts an object
    27. 27. Data modelSecondary indexing • ensureIndex() • accepts an object • options • unique, sparse, 2d, expiresAfterSeconds
    28. 28. Data model: gains
    29. 29. Data model: gains • Dynamic schemas
    30. 30. Data model: gains • Dynamic schemas • Data modeled directly to app
    31. 31. Data model: gains • Dynamic schemas • Data modeled directly to app • Retain ad-hoc queries
    32. 32. Data model: gains • Dynamic schemas • Data modeled directly to app • Retain ad-hoc queries • Retain secondary indexing
    33. 33. Data model: gains • Dynamic schemas • Data modeled directly to app • Retain ad-hoc queries • Retain secondary indexing • Productivity
    34. 34. Data model: losses
    35. 35. Data model: losses • Joins
    36. 36. Data model: losses • Joins • Multi-collection transactions
    37. 37. Data model: losses • Joins • Multi-collection transactions • use document level $atomics
    38. 38. Replication
    39. 39. Replication • distribute data across multiple machines
    40. 40. Replication • distribute data across multiple machines • redundancy
    41. 41. Replication • distribute data across multiple machines • redundancy • auto-failover
    42. 42. Replication • read from master or replicas
    43. 43. Replication • read from master or replicas • all writes go to master
    44. 44. Replication • read from master or replicas • all writes go to master • configurable • getLastError { w: ‘majority’ }
    45. 45. Sharding
    46. 46. Sharding • scale horizontally
    47. 47. Sharding • scale horizontally • range based partition mechanism
    48. 48. Sharding • scale horizontally • range based partition mechanism • shard key
    49. 49. Sharding • scale horizontally • range based partition mechanism • shard key • apps talk to shard set-ups the same way
    50. 50. MongoDB 2.2 overview ben.becker@10gen.com Evening with MongoDB Orlando
    51. 51. Mongo 2.2
    52. 52. Mongo 2.2 • Concurrency improvements
    53. 53. Mongo 2.2 • Concurrency improvements • db level locking
    54. 54. Mongo 2.2 • Concurrency improvements • db level locking • improved yielding
    55. 55. Mongo 2.2 • Concurrency improvements • Tag aware sharding
    56. 56. Mongo 2.2 • Concurrency improvements • Tag aware sharding • TTL collections
    57. 57. Mongo 2.2 • Concurrency improvements • Tag aware sharding • TTL collections • ensureIndex({ date: 1 }, { expiresAfterSeconds: 60*15 }) • cannot be compound • cannot be used on capped collections
    58. 58. Mongo 2.2 • Concurrency improvements • Tag aware sharding • TTL collections • Aggregation ...
    59. 59. Questions?http://docs.mongodb.org/manual/release-notes/2.2/http://docs.mongodb.org/manual/reference/aggregation/http://www.mongodb.org/downloads@mongodb
    60. 60. Thank You!http://docs.mongodb.org/manual/release-notes/2.2/http://docs.mongodb.org/manual/reference/aggregation/http://www.mongodb.org/downloads@mongodb

    ×