On Github slashrsm / mongo_session
> show dbs; local 0.078125GB > use drupal; > show collections; > db.awesomestuff.insert({"a":1, "b":2}); > db.awesomestuff.find(); {"_id":ObjectId("526965cd93259605e9afbc41"), "a":1, "b":2} > show collections; system.indexes awesomestuff > show dbs; drupal 0.203125GB local 0.078125GB- dbs and collections created in a implicit way - we simply insert, no need to define schema
> db.awesomestuff.insert({ "a": [1, 2, 3], "b":"some string" }); > db.awesomestuff.insert({ "a": [[1,2,4], [4,5,6], [7,8,9]] }); > db.awesomestuff.insert({ "a": { "name" : "Dries", "interests" : ["Drupal", "MongoDB"] } );- arrays, arrays of arrays - documents /w documents as their values - other funky stuff
persistent, easy to set-up, fast ("fire and forget"), automatic garbage collection
Photo by http://www.webdesignerdepot.com/2009/03/40-comics-strips-for-web-designers/easy to set-up, fast ("fire and forget"), very good for multi-server envs, uses capped collections
Photo by Which? Campaigns - http://www.flickr.com/photos/71528417@N02/6709386951easy to set-up, per-queue-collection
Photo by Darren Tunnicliff - http://www.flickr.com/photos/25572591@N07/3717976312a bit funky :), stores blocks configuration, exposes UI
Photo by capitaine_commerce - http://www.flickr.com/photos/8488292@N04/1807465667stores entites /w fields as Mongo docs, still needs base entity table, lazy destruction of stale data, new fields added very easily
Photo by Aleksej Leonov - http://www.flickr.com/photos/31849470@N02/7652495954 - not so easy to swap than others - best if you start with it from the beginning - there is mongodb_migrate module that migrates SQL fields to Mongo - hopefully much better in D8 (Migrate in core, storage controllers, ...){ "_id" : 60549286, "_type" : "node", "_bundle" : "story", "_revision_id" : 150412786, "nid" : 60549286, "vid" : 150412786, "type" : "story", "language" : "und", "title" : "Hello world!", "uid" : 2044271, "status" : 1, "created" : 1364855903, "changed" : 1364855940, "comment" : 2, "promote" : 1, "sticky" : 0, "field_image" : { "fid" : 47928616, "width" : 594, "height" : 396, "alt" : "", "title" : "" }, "body" : { "value" : "<p>MongoDB is great!</p>" }, "field_tags" : [ { "tid" : 14244596 }, { "tid" : 14244596 } ] }
www.google-melange.com/gci/homepage/google/gci2013 | @slurpee on #drupal-gci