mongo reporting

18

Upload: akhil-kodali

Post on 05-Jul-2015

696 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Mongo reporting
Page 2: Mongo reporting

@akhilkodali

Page 3: Mongo reporting

dev @ Lexity Labs

Advertising made simple

Page 4: Mongo reporting

Sharing practical experiences on reporting

Page 5: Mongo reporting

Balanced View

Page 6: Mongo reporting

Why MongoDB

Agile friendly

Document oriented

Transactions not needed

No specialist DBAs(couldn't afford one)

Devs not very good with traditional sql anyway

Page 7: Mongo reporting

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

Page 8: Mongo reporting

Strength of MongoDB is the mapper

Sadly RoR(ActiveRecord) guys seem to a well about it

Page 9: Mongo reporting

Constraints?

OpenSource available but not robust enough

Couldn't rely(afford) on reporting specialists

Devs had to handle the reporting

Page 10: Mongo reporting

Couldn't rely(afford) reporting specialists

The requirements evolved every day

Reporting had to keep up with it

Page 11: Mongo reporting

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

Page 12: Mongo reporting

RealTime Reporting

Map Reduce is not an option

Page 13: Mongo reporting

RealTime reporting

Specific Documents for tracking

Update the documents in background

Already had queue routing and processing framework

Page 14: Mongo reporting

User Session

SessionId

Start Time

End Time

Page 15: Mongo reporting

User Aggregate

Per Day

UserId

Date

Total Session Duration

Average Session

Total Session

Per Week...

Per Month...

Page 16: Mongo reporting

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

Page 17: Mongo reporting

Scenario

1000s of writes per minute

Lasts for a few hours a day

RealTime monitoring of the processing

Page 18: Mongo reporting

Questions?