Upload
nathen-harvey
View
1.483
Download
0
Tags:
Embed Size (px)
DESCRIPTION
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.
Citation preview
@
@nathenharveyNathen Harvey
Hello!
Nathen HarveyWeb Operations at [email protected]@nathenharvey
Organize MongoDC MeetupsSee you there next month!
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Thanks for attending
In the other trackEliot Horowitz, CTO & Co-Founder, 10gen
Schema Design at Scale
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk Customers
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk Customers
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk Customers
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk Customers
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Customer Reviews
Nathen HarveyNathen Harvey
CustomInk Technology
Divide our technology into two classes:ECommerce – pre-checkout and shopping cartOperations Technology – post-check-out, fulfillment, etc.
Ruby on RailsWith some legacy Java
Approximately 30 different applications running in production
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
CustomInk Databases
Primarily OracleWas the “right” choice 11 years ago when the company was startedNo longer a good solution for us
MySQLPercona Server with XtraDB
MongoDB
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
MongoDB
ChampionsEasy to set-up and configure“Greenfield” projects with loose schema definitionsMakes development easier and developers happyLimited amount of time between releases
ChallengesNo prior experience with running productionLimited amount of time between releasesUnproven solution
Nathen HarveyNathen Harvey
Problem
Complex Production EnvironmentsOrchestratedServices
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Why Mongo?
Introduces company to MongoDBEasily to modify document structureLightweight developmentEasy to install and deployCapped Collections
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Central Logger
Subclasses Buffered LoggerIt’s a gem loaded into Rails applications as a RailtieCaptures useful metadataUse the MongoDB Ruby Driverhttp://github.com/customink/central_logger
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Central Logger
Record Structure
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Log Viewer
Product Catalog
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Why Mongo?
Frequently changing requirementsGridFSWide variety of products with varied characteristics
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Case for Document-based Schema
@nathenharveyNathen Harvey
Application Architecture
Rails application for managing the product catalogWrites to MongoDB as it’s databaseUtilizes GridFS for storing filesUses Mongoid as the ODM
@nathenharveyNathen Harvey
Implementation Flow
Oracle MongoDB
ECommerceApplication
CatalogApplication
@nathenharveyNathen Harvey
Next Steps
Continue to adopt MongoDB in the Operations Technology applicationsBegin using MongoDB with ECommerce applications
Reporting artwork usageCapturing JavaScript logs
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
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
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
MongoDB Cookbook
Use Vagrant and VirtualBox as the development environment for our CookbooksCookbook shared on Github and, soon, OpsCode Community Site.
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Monitoring Production
http://github.com/mzupan/nagios-plugin-mongodb
Monitoring Production
Monit
Lessons Learned
Capped CollectionsTesting replica set failoverSchema free != design freeJSON in the DB, JQuery in the browser == happy developersmongo_import could not handle carriage returns in CSV filesUnserializable data typesData transformations on a large dataset still painfulUnless you’re sharding, map reduce probably slower and more complex than what you’re used to
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
MongoDC Meetup
Join fellow MongoDB enthusiasts for a monthly meetupMeetings are held at CustomInk in McLean, VAhttp://www.meetup.com/Washington-DC-MongoDB-Users-Group/
@nathenharveyNathen Harvey @nathenharveyNathen Harvey
Thank You!
Nathen HarveyWeb Operations at [email protected]@nathenharvey
Organize MongoDC MeetupsSee you there next month!
@nathenharveyNathen Harvey @nathenharveyNathen Harvey