Whats New in MongoDB 2.4
Improvements made across…•  Development•  Operations•  Performance•  Security•  Enterprise Features
MongoDB 2.4Developer Improvements
Geospatial
New Geospatial Features•  Polygon intersections•  More accurate spherical model•  $near and $within work with AggregationF...
GeoJSON•  Geospatial interchange format based on JSON•  Supports Points,LineStrings & Polygons•  Complete spec available a...
Point1 = {type : "Point",coordinates : [-73.947807, 40.663973]}somePoly = {type : "Polygon",coordinates : [[[40,5], [40,6]...
$GeoIntersects•  Leverages GeoJSON•  Geospatial query operator that selects all locationsthat intersect with a GeoJSON obj...
point1 = { type: "Point", coordinates: [40, 5.5]}line1 = { type: "LineString",coordinates: [[40, 3.5], [40, 4.5]]};somePol...
Aggregation Framework
New Aggregation FrameworkFeatures•  Introduced in 2.2,came of age in 2.4•  Performance Improvements•  3–5 x faster•  Geo $...
Text Search (beta)
Text Search (beta)•  Real-time indexes•  Case-insensitive•  Stemming,tokenization & stop words for 15 languages•  Index si...
Stemming Examples•  { walk,walked,walking,walks } ⇒ walk•  {magazine,magazines,magazine’s } ⇒ magazine•  {runs,running,run...
Examples of English Stop Words{ am,themselves,of,before,here,while,whats,myself,ought,me,the,into,about,this,do,cant,a,...}
Option 1: on the command line$ mongod --setParameter textSearchEnabled=trueOption 2: as admin command to mongod or mongos>...
db.t.ensureIndex({ title: "text", post: "text" },{ weights: { title: 10, post: 5 }})Create a Text Search Index
db.t.runCommand("text",{ search: ""my first blog entry"" });Run a Text Search Command
{"queryDebugString":"blog|entri|first||||my first blog entry||","language" : "english","results" : [{"score" : 12,"obj" : ...
New Update Operators
Capped Arrays•  Provides the ability to manipulate arrays withmore control than ever before•  $push now supports the follo...
db.students.update(!{ _id: 1 },!{ $push: {!scores: {!$each: [!{ attempt: 3, score: 7 },!{ attempt: 4, score: 4 } ],!$sort:...
New Upsert Operator
db.products.update(!{ _id: 1 },!{ $setOnInsert: { defaultQty: 500, inStock: true },!$set: { item: "apple" } },!{ upsert: t...
MongoDB 2.4Operational Improvements
Hash-based Sharding
Hash-based Sharding•  Easier to manage clusters•  Less rebalancing •  More event distribution for reads and writes•  Lower...
db.activeCollection.ensureIndex({ field_to_hash: "hashed" })Creating a Hashed Shard Key
Working Set Analyzer
Working Set Analyzer•  Working Set: The set of data kept in memory•  MongoDB performance best when workingset < RAM•  Work...
db.serverStatus( { workingSet: 1 } )db.runCommand( { serverStatus: 1, workingSet: 1 } )"workingSet" : {"note" : "thisIsAnE...
Index OperationManagement
Index Operation Management•  A single mongod instance can build multipleindexes in the background at the same time.•  db.k...
db.currentOp(){"inprog" : [ {"opid" : 45,"active" : true,"secs_running" : 2,"op" : "insert","ns" : "test.system.indexes",....
Replication Improvements
Role Based PrivilegesReplication Improvements•  Better detection of network hiccups (less falsenegatives)•  Faster initial...
MongoDB 2.4Performance Improvements
V8 JavaScript Engine•  Affects all JS processing including MapReduce,theshell and $where queries •  Greater concurrency•  ...
Improvements All Over•  Aggregation 3x–5x faster•  Faster Counting–  Low-cardinality index-based counts up to 20x faster– ...
MongoDB 2.4Security Improvements
Role Based PrivilegesRole Based Privileges•  Builds on access controls introduced in 2.2•  Users granted roles that have s...
Role Based PrivilegesEnhanced SSL Support•  Supported in open source edition of MongoDB•  Must be compiled using--ssl flag•...
Introducing MongoDBEnterprise 2.4
MongoDB Enterprise•  Advanced Security–  Kerberos authentication protocol–  SSL support built in•  Monitoring–  On-Prem Mo...
SubscriptionsBasic Standard EnterpriseEdition MongoDB MongoDB MongoDB EnterpriseSLA 4 hours 1 Hour 30 MinutesSupport9am – ...
Upcoming SlideShare
Loading in...5
×

Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19

839
-1

Published on

Standard 10gen "What's new in MongoDB" 2.4 delivered at an enthusiastic MongoDB user group in Copenhagen.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
839
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19

  1. 1. Whats New in MongoDB 2.4
  2. 2. Improvements made across…•  Development•  Operations•  Performance•  Security•  Enterprise Features
  3. 3. MongoDB 2.4Developer Improvements
  4. 4. Geospatial
  5. 5. New Geospatial Features•  Polygon intersections•  More accurate spherical model•  $near and $within work with AggregationFramework•  Analytics now location-aware
  6. 6. GeoJSON•  Geospatial interchange format based on JSON•  Supports Points,LineStrings & Polygons•  Complete spec available at http://geojson.org
  7. 7. Point1 = {type : "Point",coordinates : [-73.947807, 40.663973]}somePoly = {type : "Polygon",coordinates : [[[40,5], [40,6],[41,6], [41,5], [40,5]]]}GeoJSON
  8. 8. $GeoIntersects•  Leverages GeoJSON•  Geospatial query operator that selects all locationsthat intersect with a GeoJSON object•  Uses spherical geometry
  9. 9. point1 = { type: "Point", coordinates: [40, 5.5]}line1 = { type: "LineString",coordinates: [[40, 3.5], [40, 4.5]]};somePoly = { type : "Polygon",coordinates : [[[40,5], [40,6],[41,6], [41,5], [40,5]]]};res = c.find({ geo : {"$geoIntersects" :{"$geometry" : somePoly}}});$GeoIntersects
  10. 10. Aggregation Framework
  11. 11. New Aggregation FrameworkFeatures•  Introduced in 2.2,came of age in 2.4•  Performance Improvements•  3–5 x faster•  Geo $near and $within support•  $concat support•  Support for Binary Data (pass through)
  12. 12. Text Search (beta)
  13. 13. Text Search (beta)•  Real-time indexes•  Case-insensitive•  Stemming,tokenization & stop words for 15 languages•  Index size is comparable with other full text searchimplementations (larger than standard MongoDBindexes)•  BETA status…please use in dev & give feedback
  14. 14. Stemming Examples•  { walk,walked,walking,walks } ⇒ walk•  {magazine,magazines,magazine’s } ⇒ magazine•  {runs,running,run,ran } ⇒ { run,ran }
  15. 15. Examples of English Stop Words{ am,themselves,of,before,here,while,whats,myself,ought,me,the,into,about,this,do,cant,a,...}
  16. 16. Option 1: on the command line$ mongod --setParameter textSearchEnabled=trueOption 2: as admin command to mongod or mongos> db.adminCommand({ setParameter: 1, textSearchEnabled: true })Enabling Text Search
  17. 17. db.t.ensureIndex({ title: "text", post: "text" },{ weights: { title: 10, post: 5 }})Create a Text Search Index
  18. 18. db.t.runCommand("text",{ search: ""my first blog entry"" });Run a Text Search Command
  19. 19. {"queryDebugString":"blog|entri|first||||my first blog entry||","language" : "english","results" : [{"score" : 12,"obj" : {"_id" : 1,"title" : "1st post","post" : "this is my first blog entry."}}],"stats" : {"nscanned" : 7,"nscannedObjects" : 0,"n" : 0,"nfound" : 1,"timeMicros" : 122},"ok" : 1}Text Search ResultNote: debug string shows the stemmed terms, stop-words deleted
  20. 20. New Update Operators
  21. 21. Capped Arrays•  Provides the ability to manipulate arrays withmore control than ever before•  $push now supports the following:•  $each permits pushing multiple entries onto anarray•  $slice maintains a fixed size array•  Can be stacked with $sort
  22. 22. db.students.update(!{ _id: 1 },!{ $push: {!scores: {!$each: [!{ attempt: 3, score: 7 },!{ attempt: 4, score: 4 } ],!$sort: { score: 1 },!$slice: -3!}!}}!)Top 3 Scores
  23. 23. New Upsert Operator
  24. 24. db.products.update(!{ _id: 1 },!{ $setOnInsert: { defaultQty: 500, inStock: true },!$set: { item: "apple" } },!{ upsert: true }!)$setOnInsert
  25. 25. MongoDB 2.4Operational Improvements
  26. 26. Hash-based Sharding
  27. 27. Hash-based Sharding•  Easier to manage clusters•  Less rebalancing •  More event distribution for reads and writes•  Lower potential performance from range based,but moreconsistent.•  The hash stored in the hashed index is 64 bits of the 128bit md5 hash•  MongoDB can use the hashed index to support equalityqueries,but hashed indexes do not support range queries.
  28. 28. db.activeCollection.ensureIndex({ field_to_hash: "hashed" })Creating a Hashed Shard Key
  29. 29. Working Set Analyzer
  30. 30. Working Set Analyzer•  Working Set: The set of data kept in memory•  MongoDB performance best when workingset < RAM•  Working set analyzer measures resources usedover time•  Leads to more efficient MongoDB usage
  31. 31. db.serverStatus( { workingSet: 1 } )db.runCommand( { serverStatus: 1, workingSet: 1 } )"workingSet" : {"note" : "thisIsAnEstimate","pagesInMemory" : <num>,"computationTimeMicros" : <num>,"overSeconds" : num},MongoStatus
  32. 32. Index OperationManagement
  33. 33. Index Operation Management•  A single mongod instance can build multipleindexes in the background at the same time.•  db.killOp() can now kill foreground index builds•  Improved validation of index types
  34. 34. db.currentOp(){"inprog" : [ {"opid" : 45,"active" : true,"secs_running" : 2,"op" : "insert","ns" : "test.system.indexes",...}]}db.killOp(45)Index Operation Management
  35. 35. Replication Improvements
  36. 36. Role Based PrivilegesReplication Improvements•  Better detection of network hiccups (less falsenegatives)•  Faster initial sync when adding new secondary
  37. 37. MongoDB 2.4Performance Improvements
  38. 38. V8 JavaScript Engine•  Affects all JS processing including MapReduce,theshell and $where queries •  Greater concurrency•  User feedback very positive indicating dramaticimprovement in overall processing time with newV8
  39. 39. Improvements All Over•  Aggregation 3x–5x faster•  Faster Counting–  Low-cardinality index-based counts up to 20x faster–  Better performance on counting,e.g.,count all themales/females in my user list•  Faster $elemMatch
  40. 40. MongoDB 2.4Security Improvements
  41. 41. Role Based PrivilegesRole Based Privileges•  Builds on access controls introduced in 2.2•  Users granted roles that have specific privileges perdatabase•  Users can have multiple roles•  Roles include–  read–  readWrite–  userAdmin–  dbAdmin–  clusterAdmin
  42. 42. Role Based PrivilegesEnhanced SSL Support•  Supported in open source edition of MongoDB•  Must be compiled using--ssl flag•  Uses a standard .pem file that contains the SSLcertificate and key•  Complete directions available in the MongoDBdocumentationhttp://docs.mongodb.org/manual/administration/ssl/
  43. 43. Introducing MongoDBEnterprise 2.4
  44. 44. MongoDB Enterprise•  Advanced Security–  Kerberos authentication protocol–  SSL support built in•  Monitoring–  On-Prem Monitoring-visualization,alerts on 100+ system metrics–  Includes same features as (MMS)•  Enterprise Software Integration–  SNMP supports integration w/popular monitoring tools (e.g.,Nagios )•  Certified OS Support–  Red Hat/CentOS,Ubuntu and Amazon Linux
  45. 45. SubscriptionsBasic Standard EnterpriseEdition MongoDB MongoDB MongoDB EnterpriseSLA 4 hours 1 Hour 30 MinutesSupport9am – 9pm ETM – F24x7x365 24x7x365License AGPL Commercial CommercialPrice per Host $2,500 $5,000 $7,500
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×