Answer the question
In order to leave comments, you need to log in
Implementing timed notification in ruby on rails?
The task is very simple. Make delayed notifications.
I started using delayed_job. But there was a problem. Over time, a lot of notifications appeared on the site, and it turns out that there are a lot of tasks at the same time. And the deferred task, which should start at 14:00, starts at 14:10, or even at 14:30. In part, this is because, from time to time, there are very massive tasks to update the database content and they can work together for up to half an hour, thereby slowing down the notifications. But in any case, over time, the project will grow and even the number of notifications per point will be very large.
Question #1: Is it possible to solve this problem and run tasks in parallel at exactly the right time?
Question #2: Will Resque or Sidekiq solve this problem? Do I just need to understand something new at all?
Question #3: Maybe there is some other implementation of notifications that is smarter than just deferred tasks?
Answer the question
In order to leave comments, you need to log in
In Sidekiq, you can create named queues and push only notifications there, other processes will not slow down the sending of notifications.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question