I am running a rails app, which needs to have a continuous process in the background. The idea is that users are transactionally added to a list, which is inside the process, and then paired together according to an algorithm that runs continuously.
I can't make the algorithm simply run after each user is added because we also need to run the algorithm if a user has been waiting for a certain amount of time.
Is this possible? I basically need a data structure that is constantly running and being accessed at diff times in the background.
Thanks!