Best way to schedule events and handle them in the future?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rimer

    Redis-backed event timers

  • 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.

  • 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/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gocron

    Easy and fluent Go cron scheduling. This is a fork from https://github.com/jasonlvhit/gocron

  • 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.

  • RabbitMQ

    Open source RabbitMQ: core server and tier 1 (built-in) plugins

  • 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.

  • ApacheKafka

    A curated re-sources list for awesome Apache Kafka

  • 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.

  • sdk-java

    Temporal Java SDK

  • Try Temporal https://temporal.io/

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • osbuild-composer

    An HTTP service for building bootable OS images.

  • 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

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts