I am wokring on a project where user activity feed generation is needed. If user A follows user B and user B does some activity user A see it on his homepage.
Now I am looking for a DB solution for persisting user feed. Once user B commits some action all users who follow user B will receive a record. I think saving a mongodb document for a user with a list of object references will be better than saving a document for each feed record.
On the other hand, there will be many writes and even more reads and mongodb has a lock on a collection. Maybe this might be a problem. Or maybe Redis could be used for this. And redis having something with concurrency. I am not much experienced in both.
The summary question is what would be better to use for this task: Mongo, Redis or something else?
Thank you!
see the blogpost: http://www.waistcode.net/blog/mongodb-newsfeed-schema-design-for-entexis which exactly describes what you're looking for. IMHO: it's really elegant.
I was pointed to that blogpost through a related question ( MongoDB database schema design ) a couple of days ago.
hth.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With