I am working creating api for activity feed of user. Feed contains different type of entities.

Before that let me give you bit overview about the app. Its a video app where Users can ask questions then we show results of matched solution. If user watches any of video from matched solution. we show that in feed (all users can view this). User can like or comment on this entity.

Currently i am generating feed data by aggregating different tables in mysql but this is not very scalable. This method is very slow.

Now, I am thinking of generating feed at the time of when user watches the video then save it in another mysql server dedicated to feed data.
I am running to few problems here :

  1. It is user customized feed as we show that if user is commented or liked or not (is_like,is_commented). Should i save feed data at student level???
  2. If i save it as student level.That data will going to be very huge. which database is best suited. I have read that cassandra is best suited for this type of data or just Mysql+redis just work???
  • Well hello, fellow Neil. By feed, you mean video and media? I agree with your sentiment that this isn't scalable, no. – Neil Oct 12 at 13:39
  • @Neil By feed means , twitter/facebook like feed. It contains different type of entities. Instead of creating feed data (by aggregation) at realtime, I am thinking of creating feed data whenver event happens related to feed. – NeiL Oct 12 at 17:39
  • I would strongly encourage you to avoid attempting to hold the media yourself. Save links to videos, not the videos themselves. If you absolutely must save them yourself, create a file with a randomly generated name on your server and in your database, you save the file path to that file. If all else fails, at the very least don't put the blob holding the media contents in the same table but create a separate table with a one-to-one relationship. That said, don't try to hold the data yourself because as you correctly indicated yourself, it isn't scalable. – Neil Oct 15 at 6:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.