1

I'm a new junior developer joining to this awesome community. I'm developing my first big personal project, and I'm stuck with this specific part.

I would like to build a feed notification system like Facebook with the following features:

  • Track different models and relationships, for example: new badges earned, new comments in subscribed models, new posts by followed users, new comments on my posts, new likes on my posts...
  • Group the activities, for example, instead of have 400 activities for each likes in my post, has just one notification that says "User X and 399 more likes your post"
  • Be possible to mark notifications as readed to don't see them again, at least you explore past notifications.
  • Scalability, good perfomance, and possible integration in the future in an APP developed for example with Iconic framework.

Push notifications are optional, it's ok if the user need to refresh the page to see the new notifications.

So for that, I have readed a lot of. I have watched some Railcast Videos, followed tutorials, but still I'm not really sure how to begin.

I have considered the following methods:

  • Use public_activity gem, adding a new a new field "readed" to the migration. And thinking how to manage grouped activites. But I have seen a lot of complains about perfomance. I'm expecting to have around 50000 users in my website in the first month (I already have the users), with peaks of 500-1000 users online. So maybe this is not the best way to go... as I would have a lot of activities, a lot of "notifications" and a lot of users.
  • Use a system like https://getstream.io/ because they also have integrations available for RoR and Ruby. The main concern here is about pricing, because checking it, if I'm not wrong, with that number of users, with around 10 notifications per user per day, I would be paying probably more than 200$ month, and always keep growing as the users grow.
  • Build my own system, maybe using Redis. But maybe this would be too complex and require a lot of time for a good, efficient and working code.

So still, considered these option, I don't know which one is best for me, or if it's another possibilities.

If someone have asked before these questions, please let me know your thoughts and what you think is the correct way to go.

Thank you !! :)

  • You're expecting to have 50,000 users in the first month? On a person project? Must be one hell of an idea. – Jordan Running Jun 19 '16 at 21:03
  • @Jordan I already have the users, but right now with a single wordpress. I just want perform a migration from wordpress to the rails web app :) – adriandelarco Jun 19 '16 at 21:16
  • Limiting user notifications to 10 a day is ridiculous. Websockets is free. As it stands, though, this question is too broad. You use a gem / SaaS provider, or roll your own solution. It's a matter of preference. Regardless, you're going to need to have a good understanding of Rails to build this. Rails is a pretty big topic. It will probably take you a while to learn. – max pleaner Jun 19 '16 at 21:32
  • @maxpleaner thank you for the answer. I was not speaking about limiting but the "average", I also don't want push a lot of notifications per day per user. I know Rails, I'm not expert of course, I keep learning everyday, but Rails is not the problem. I have already done most of the features I want for this web app and also tested them. Just I don't know which direction to take regarding the feed notifications. Afaik Websockets is to perform some kind of "live" notifications, and the feature of live is not really necesary for me at this point, but I will take a look. – adriandelarco Jun 19 '16 at 22:10

0 Answers0