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

An Evening with MongoDB - Toronto 2012: Welcome and Keynote

D8fc2580cfaca035f666d9e4ee79a7f7?s=47 mongodb
August 02, 2012
170

An Evening with MongoDB - Toronto 2012: Welcome and Keynote

Jenna deBoisblanc
Welcome to MongoDB Toronto and a keynote about what is happening with 10gen, the company behind MongoDB and what is to come.

D8fc2580cfaca035f666d9e4ee79a7f7?s=128

mongodb

August 02, 2012
Tweet

Transcript

  1. An evening in Toronto with MongoDB 2.2 Jenna deBoisblanc Support

    Engineer, 10gen jenna@10gen.com @jdeboisblanc
  2. MongoDB Releases 2.2 Aug ‘12 2.0 Sept ‘11 1.8 March

    ‘11 2.2-rc0: July 19th 2.2-rc1: targeted July 31st 2.2 – out shortly after
  3. Concurrency)improvements Aggregation)framework Tag)aware)sharding Read)Preferences TTL)Collections Shell)enhancements More… • • •

    • • • • New features in 2.2
  4. DB#Level#Locking Global#lock#for#journaling,#fsync#etc.#only Easy#transition#to#collection;level#locks Replication#can#happen#in#parallel#to#write#(client#db#vs. local) Yielding#on#page#faults Started#with#2.0 Yielding#for#updates • –

    – – • – – Concurrency Improvements
  5. Concurrency Stats db.serverStatus(-)- shows-db-level-locks page-fault-details • – – > db.serverStatus().recordStats

    { "accessesNotInMemory" : 1, "pageFaultExceptionsThrown" : 1, "local" : { "accessesNotInMemory" : 0, "pageFaultExceptionsThrown" : 0 }, "test" : { .... } “foo” : { ... } }
  6. Replaces(common(uses(of(map/reduce Implemented(in(C++ Query(optimizer(can(use(indexes Chained(operators $project(–(specified(fields,(compute(values(etc. $unwind(–(stream(arrays $group(–(aggregate(on(key $match $sort •

    • • • – – – – – Aggregation framework
  7. {"_id:"1,"tags:"[“Jenna”,"“pizza”]"} {"_id:"2,"tags:"[“Jenna”,"“sushi”,"“pizza”]"} >db.collection.aggregate( """""{$unwind:"“$tags”}, """""{$group:"{_id:"“$tags”,"total:"{$sum:1}"}"}") "result"":"[ """"""""""""""""{"_id"":""sushi",""total"":"1}, """"""""""""""""{"_id"":""pizza",""total"":"2}, """"""""""""""""{"_id"":""Jenna",""total"":"2} """"""""]

    Aggregation Framework – example
  8. Use$cases force$writes$to$local$data$center distribute$data$based$on$usage • – – Tag aware sharding

  9. Modes Drivers*set*on*a*per/connection,*per/collection,*or per/operation*basis Primary*(default)* Primary_Preferred Secondary Secondary_Preferred Nearest Replica*set*tags Read*support*for*replica*set*tags

    • – • • • • • • – Read Preferences
  10. “Time%To%Live” Use%field%in%document%to%specify%expiry Constraints Indexed%field%must%be%a%BSON%date%type Cannot%be%used%on%capped%collection • • • – –

    TTL Collections {_id:%1,%name:%“Jenna”,%status:%BSONDate} >%db.log.ensureIndex({“status”:%1},%{expireAfterSeconds:%3600})
  11. Verbose'mode >'set$verbose$true >'db.foo.update('{'},'{$set:'{field:'10}'}') Updated'2'existing'record(s)'in'2ms Enhanced'editing'features multiDline'support • • – Shell

    enhancements
  12. Replication rs.syncFrom(2“[hostname]2:2[port]”2)2 specify2who2to2sync2from Tools mongooplog2–2tool2for2replaying2oplog Authentication2support2and2concurrency2statistics2in mongotop2and2mongostat • – •

    – – More…
  13. Even More! Query&optimizer Many&improvements&not&directly&visible&to&user Better&support&for&$in&+&sort&+&limit Map/reduce Choose&initial&split&points&for&sharded&output • – –

    • –
  14. What’s next?

  15. Operational+enhancements External+authentication+integration Fragmentation+reduction New+features Full9text+search Performance+improvements More+granular+locks Improved+aggregation+framework Index+improvements •

    – – • – • – – – Post 2.2
  16. We’re Hiring ! jenna@10gen.com mongoDB.org