mongo reporting
TRANSCRIPT
@akhilkodali
dev @ Lexity Labs
Advertising made simple
Sharing practical experiences on reporting
Balanced View
Why MongoDB
Agile friendly
Document oriented
Transactions not needed
No specialist DBAs(couldn't afford one)
Devs not very good with traditional sql anyway
What do I think about MongoDB
Mysql beats MongoDB hands down in terms of features
Its the best NoSql out there in terms of usability + features
Its essentially a key value store with features in drivers instead of the DB itself
This allows for easy app scaling
Strength of MongoDB is the mapper
Sadly RoR(ActiveRecord) guys seem to a well about it
Constraints?
OpenSource available but not robust enough
Couldn't rely(afford) on reporting specialists
Devs had to handle the reporting
Couldn't rely(afford) reporting specialists
The requirements evolved every day
Reporting had to keep up with it
Devs had to handle reporting
Map Reduce...painful...I have it...love the sql
Like the comfort of application layer
Mongo – Key, Value store
Driver did the rest at app layer
RealTime reporting
Reporting no longer a disjoint
RealTime Reporting
Map Reduce is not an option
RealTime reporting
Specific Documents for tracking
Update the documents in background
Already had queue routing and processing framework
User Session
SessionId
Start Time
End Time
User Aggregate
Per Day
UserId
Date
Total Session Duration
Average Session
Total Session
Per Week...
Per Month...
How
Data Updates are atomic
One query (schema less)
REST based reporting
Jquery plugins / HTML5 for display
Reports felt more responsive and lighter
Smaller front end code base allowed for faster iterations
Scenario
1000s of writes per minute
Lasts for a few hours a day
RealTime monitoring of the processing
Questions?