Presented at MongoDC in June, 2011. This talk describes how we use MongoDB at CustomInk, some challenges we faced introducing the technology, and some lessons learned.
2. Hello! Nathen Harvey Web Operations at CustomInk nharvey@customink.com @nathenharvey Organize MongoDCMeetups See you there next month! @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
3. Thanks for attending In the other track Eliot Horowitz, CTO & Co-Founder, 10gen Schema Design at Scale @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
12. CustomInk Technology Divide our technology into two classes: ECommerce – pre-checkout and shopping cart Operations Technology – post-check-out, fulfillment, etc. Ruby on Rails With some legacy Java Approximately 30 different applications running in production @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
13. CustomInk Databases Primarily Oracle Was the “right” choice 11 years ago when the company was started No longer a good solution for us MySQL Percona Server with XtraDB MongoDB @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
14. MongoDB Champions Easy to set-up and configure “Greenfield” projects with loose schema definitions Makes development easier and developers happy Limited amount of time between releases Challenges No prior experience with running production Limited amount of time between releases Unproven solution Nathen Harvey Nathen Harvey
15. Problem Complex Production Environments OrchestratedServices @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
16. Why Mongo? Introduces company to MongoDB Easily to modify document structure Lightweight development Easy to install and deploy Capped Collections @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
17. Central Logger Subclasses Buffered Logger It’s a gem loaded into Rails applications as a Railtie Captures useful metadata Use the MongoDB Ruby Driver http://github.com/customink/central_logger @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
24. Application Architecture Rails application for managing the product catalog Writes to MongoDB as it’s database Utilizes GridFS for storing files Uses Mongoid as the ODM @nathenharvey Nathen Harvey
26. Next Steps Continue to adopt MongoDB in the Operations Technology applications Begin using MongoDB with ECommerce applications Reporting artwork usage Capturing JavaScript logs @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
27. Automated Deployment Chef is an open source systems integration framework built to bring the benefits of configuration management to your entire infrastructure. We use Chef to manage our infrastructure and deploy MongoDB @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
28. MongoDB Cookbook Use Vagrant and VirtualBox as the development environment for our Cookbooks Cookbook shared on Github and, soon, OpsCode Community Site. @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
31. Lessons Learned Capped Collections Testing replica set failover Schema free != design free JSON in the DB, JQuery in the browser == happy developers mongo_import could not handle carriage returns in CSV files Unserializable data types Data transformations on a large dataset still painful Unless you’re sharding, map reduce probably slower and more complex than what you’re used to @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
32. MongoDCMeetup Join fellow MongoDB enthusiasts for a monthly meetup Meetings are held at CustomInk in McLean, VA http://www.meetup.com/Washington-DC-MongoDB-Users-Group/ @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
33. Thank You! Nathen Harvey Web Operations at CustomInk nharvey@customink.com @nathenharvey Organize MongoDCMeetups See you there next month! @nathenharvey Nathen Harvey @nathenharvey Nathen Harvey
Notas do Editor
Tempfile https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/bson/bson_ruby.rb#L153MongoDB maintains deleted lists of space within the datafiles when objects or collections are deleted. This space is reused but never freed to the operating system.http://www.mongodb.org/display/DOCS/Durability+and+Repair