-
I've got a problem that requires me to schedule an event to occur sometime in the future. I'd like to be able to have one server schedule those events, and then another service block and handle those events in the future as they occur. I tried pulling this off with Redis using a combination of data structures and it seems to work well for now, but it requires some service to poll the list of registered timers. For Redis this is pretty quick, but I'm wondering if there's a more scalable solution? I need the timers to be fault-tolerant since we update our application regularly and timers need to persist.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
cadence
Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
May be this..https://cadenceworkflow.io/
-
I'm not sure this is exactly what you want but I quite like using https://github.com/go-co-op/gocron to schedule events.
-
You're better off with something really, really straightforward, like AWS Simple Queue Service or SQS or RabbitMQ, which are two very popular message queues. (The "MQ" part means Message Queue, in case that wasn't obvious). There are a lot of these out there, including ActiveMQ, IronMQ, and others. Pick the one that makes the most sense to you.
-
The second approach is to use a message queue, as some others have suggested. The most powerful of these is probably Kafka, but it's almost certainly overkill. (Technically, Kafka is an event log, not a message queue, but that's semantics at this point)
-
amazon-sqs-java-messaging-lib
This Amazon SQS Java Messaging Library holds the Java Message Service compatible classes, that are used for communicating with Amazon Simple Queue Service.
You're better off with something really, really straightforward, like AWS Simple Queue Service or SQS or RabbitMQ, which are two very popular message queues. (The "MQ" part means Message Queue, in case that wasn't obvious). There are a lot of these out there, including ActiveMQ, IronMQ, and others. Pick the one that makes the most sense to you.
-
Try Temporal https://temporal.io/
-
Postgres can handle this well if you use pub/sub notification which is built-in. You can easily pick up jobs using a time-based where clause and it also scales well. There is no need to pull a complex library for this, here is a good example of such implementation.
-
delayq
DelayQ is a Go library that provides a performant, reliable, distributed delay-queue using Redis.
I built this for the same problem: https://github.com/spy16/delayq/tree/main/redis