Hacker Newsnew | comments | show | ask | jobs | submit login
CloudMagic Analytics – MongoDB finds its place (cloudmagic.com)
3 points by treskot 1018 days ago | 2 comments



So what are you actually using, simple queries (examples), map-reduce (is it fast enough for you?), why not insert directly into mongodb, are you using the new aggregate framework?

-----


We are using both simple queries and MapReduce. Simple queries like db.cloudmagicAnalyics.count({type:'search', ts:{$gte:new Date('12 November 2012')}}); or say we need to find the number of users who searched db.cloudmagicAnalyics.distinct('user_id', {type:'search', ts:{$gte:new Date('12 November 2012')}}).length;

Map/reduce gives an edge as we don't need to process the info again in PHP. For example we want to know how many users are searching in each platform. Either we run multiple queries and get result or one single map/reduce command.

Due to some technical limitations and to ensure our search speed is not deteriorated, we decided to log all requests conditionally and then asynchronously parse and insert them in MongoDB. My next blog post will explain this better.

I have not given a whirl at Aggregate Framework, looks interesting, will try it out.

-----




Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: