Answer the question
In order to leave comments, you need to log in
How to implement timer events?
There is a DB (PostgreSQL). There are many entities in the database, let's say a million or several. I would like to implement the ability to do something with them on a timer. For example - the essence is rotten, something needs to be done with it. Or periodic events that occur with the entity, for example - status reminders.
I don’t want to make SQL selections with a query, comparing dates, I suppose this will require a lot of resources. Yes, and I want the event to occur on time, and not when the next cron search works there.
There was an idea to implement through queues of expired messages on RabbitMQ (we put a message with the required date of delay in the queue and it will appear in the queue of expired messages just when necessary) or something similar to Redis. But now we do not have Redis or Rabbit, but only Tarantool, Kafka, Java and Postgres. Maybe something similar can be implemented in Tarantool? Prompt please - where to dig.
Answer the question
In order to leave comments, you need to log in
do something with them on a timer.
Yes, and I want the event to occur on time, and not when the next cron search works there.So by the timer, or by expiration? If you are talking about some kind of event like "overdue" or "remind", just make a selection taking into account the condition when requesting data .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question