My talk at MongoTorino about how the use of MongoDB empowers your development teams, as well as tips and tricks to get around common pitfalls (and not so common challenges).
5. About Me
❖
American, living in Turin!
❖
CTO at Sounday Music!
❖
Mongo Master!
❖
Joomla! Founder!
❖
Contributor to many FOSS!
❖
Family man!
❖
Coach (Giaguari Torino)!
❖
Musician!
❖
Longboarder
8. Sounday in 2013
❖
Growing community of music
professionals!
❖
Integrated with many social
media platforms!
❖
Very large binary files (audio)!
❖
100% UGC!
❖
e.commerce B2C, C2C!
❖
Based in Torino!
❖
Engineering based in Cagliari
14. The Challenge
❖
“We’re gunning for a grant”!
❖
❖
“It needs to be live soon” !
❖
❖
(zero time)!
“We’re disrupting the industry”!
❖
❖
(no money yet)!
(no requirements)!
“Wanna move to Cagliari?”
22. The Solution
❖
Single, RESTful base platform (web, mobile, partners)!
❖
Document database!
❖
Store media in database for simplicity, portability!
❖
Ability to break out separate services when scale needed!
❖
Tethered cloud for initial deployment
23. Solution: The application
Lithium
•
•
•
•
•
•
•
Super lightweight PHP framework!
RAD!
MVC!
Promiscuously opinionated!
Post-relational!
Fully leverages PHP 5.3+!
Cherry-picker methodology (mix of
functional, object, aspect, and more)
25. Solution: The approach
Agile, Xtreme
•
•
•
•
•
•
•
Quick, iterative steps!
Constant refactoring!
Captured features during
implementation!
Pair programming!
Local, development and production
environments!
Development and production
environments mirrored!
Dedication to DRY
29. Lithium saved our bacon
❖
Extremely quick to get bootstrapped and running a base
platform!
❖
Many libraries available for specific needs!
❖
Natively talks to non-relational databases!
❖
Intelligent code layout, encourages best practices!
❖
Adapters, filters, this stuff is the shizzle
30. MongoDB saved our bacon, with eggs
❖
Simple document structure made for extremely simple
models!
❖
Better matched with the objects used in our apps!
❖
GridFS made storing media dead simple!
❖
Being schemaless allowed us to iterate rapidly!
❖
After launch, we completely forgot about MongoDB
from an operational standpoint
33. The Bad
❖
Hey remember how easy it is to change your document
schemas?!
❖
Loosely-typed language and database makes for fun!!
❖
Hope you love the command line. (limited tools)
37. The Ugly
❖
What do you mean, ‘no need for constraints’?!
❖
Hey this GridFS database is freaking ginormous.!
❖
I’ve never seen that happen before.!
❖
What, there’s no more SQL? Then who’s to blame when
something breaks?
38. What We Learned
❖
Our code was significantly lighter!
❖
This slim codebase is extremely fast!
❖
Smaller codebase == fewer bugs!
❖
GridFS combined with metadata is really powerful!
❖
Atomic documents + working memory = TO INFINITY
AND BEYOND!
39.
40. What Else We Learned
❖
Shift responsibilities from tools to developers!
❖
Testing and documentation are NOT OPTIONAL!
❖
Define models, even when iterating rapidly in a
schemaless environment!
❖
Consider backup and operational requirements before
you get started
50. Yeah, I said firehose. Got a problem wit dat?
Console time
If you wanted to see this part of the talk,
you should have attended the session.!
!
!
!
!
!
:-)