Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atimer

A highly performant, sharded clock node capable of receiving multiple timer requests and firing asynchronous callbacks when they expire.

License Language


What's in there for you

  • Automated Callbacks: Schedules task timers and automatically pings your server when they expire.
  • CPU & Battery Friendly: Runs very efficiently
  • Reliable Handling: Capable of keeping track of many active timers at the same time.
  • Simple API: Set up and trigger a timer using a single HTTP request.

Features

  • High-Throughput Scheduling: Handles thousands of concurrent active timers smoothly by load-balancing them internally.

Use Cases

  • Serverless Apps: Pings serverless functions (like AWS Lambda or Vercel) that cannot run background timers.

Quick Start Guide

0. Clone the project if not already done.

1. Build and Run

Build the project using standard Go compiler tools:

go build ./cmd/atimer

Start the server using CLI flags to configure the port, number of heaps, and worker threads per heap:

./atimer -port 8080 -heaps 4 -workers 2

2. Schedule a Task

Send a POST request with form values to the /api endpoint:

curl -X POST http://localhost:8080/api \
  -d "id=task123" \
  -d "timer_time=10" \
  -d "callback_url=http://example.com/callback"

Documentation

  • API Endpoint reference here
  • Timer Architecture details here
  • Bruno collection here
  • System whiteboard drawings (excalidraw) here
  • Just a journal about this project here

📄 License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

About

A node that is capable of receiving multiple timer requests, and it fires back a request on the callback URL once the timer runs out.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages