Professional Documents
Culture Documents
Agenda
RDBMS: Issues What is MongoDB? About NoSQL / Document storage Queries Why MongoDB? Pros Cons What about Drupal? MongoDB module Field Queries Why Drupal + Mongo? Pros Setup + Demo Q&A
Relational DB Issues
Not all that much. HOWEVER: Once you have related data, you need to join them. Sometimes, indexing doesn't work very well. Introduce denormalization. Build extra tables. Changes can lock data. Downtime Load on system Code changes are not automatically coupled with schema changes. Coordination can be difficult.
What is MongoDB?
About MongoDB Document oriented NoSQL Database System Written in C++ Released in 2009 Query Results looks like JSON { "v" : 1, "key" : { "_id" : 1 }, "ns" : "db.fields_current.search_api_index", "name" : "_id_" } ...
MongoDB Module
http://drupal.org/project/mongodb mongodb: core support library for other modules mongodb_block: Store blocks in mongo mongodb_cache: Cache using mongo mongodb_session: store sessions in mongo mongodb_watchdog: Store watchdog in mongo mongodb_queue: Store queues in mongodb mongodb_field_storage: Store fields in mongodb
MongoDB core
$collection = mongodb_collection($collection_name) $collection->findOne(array('_id' => (string)$nid)); $collection->find($conditions); $collection->remove(array('_type' => 'blah')); $collection->save(array($sanitized_node)); That's really it ^_^
MongoDB Watchdog
Lower strain on db server. Useful when there might be a lot of activity on site (be it good or bad). Can cap collection size. Quick purge. Enable it and you're ready to go (disable dblog - you don't need it).
Demo
Questions?
Thank you :)