BTMash

Blob of contradictions

High Performance Meetup - Mongo + Drupal

Written

We had a meetup on High Performance Drupal last night (see link) and being a fan of high performance systems/applications, I attended. Robert Brown did a fantastic presentation on using newrelic to diagnose potential issues in your application stack (it has hooks specifically for drupal in addition to the other niceties such as apache, memcache, solr; I didn't realize you could also monitor your site with it). I look forward to talking with him more on the subject of performance in the future.

I also decided to present. I have been itching to try out MongoDB for a long time (especially since there is an integration module with Drupal). So over the past few weeks, I installed Mongo and tried out the MongoDB module. Its interesting seeing some of the limitations (have to plan around the difficult relationships we take for granted with a relational database) and seeing some of the potential (*much* faster, easier to load data, less to worry about on schema changes). As my first real taste of NoSQL, I have really enjoyed it and wanted to share what I've been looking into with the group. Talking with Michael Bushey, it would be interesting to also look at Redis and how it works (since it strays even farther into the schema-less territory). Not to mention there are various other Big Table technologies to try out! Robert had brought up an interesting module called 'materialized views' which seems like it would be able to get around the limitations of a NoSQL db by aggregated all related content information together into a document and then you could use power your searches through that document for the things you are looking to do. I mentioned back that in the case of the site I demoed, that is exactly what I was doing. My content was being stored in mongo, but I was indexing my site using SearchAPI. SearchAPI allows you to pull in other potentially related content (and I imagine you could implement hooks that will do even more) and have it get indexed as part of one large document for this content in your search index (in my case I am using solr). I then used views to filter against content in there (which is now super flexible since all the content is related together inside the index), get my resultset superquick, and render using mongo. A somewhat complex, but very fast, reliable, and powerful, stack.

This time around, I uploaded my slides to speakerdeck as opposed to slideshare given that the presentation layer is pure html, css, and js. I miss the full-screen that solutions like slideshare offer but maybe that will change in the future :) I'll update the post with a link to the video once that has been uploaded.

UPDATE: The video is now up on blip.tv!