Skip to content

capang-io/chronos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chronos

Async job processing and status tracking for high-volume operations.

Description

Chronos is a Go-based tool for asynchronous job processing and status tracking. It provides a simple HTTP API to submit jobs, track their progress, and retrieve results. Designed for high-volume operations, it uses a worker pool and caching mechanism to handle concurrent requests efficiently.

Getting Started

Prerequisites

  • Go 1.19 or later
  • Redis server (installed and running)

Installation

  1. Clone the repository:

    git clone https://github.com//chronos.git
    cd chronos
  2. Install dependencies:

    go mod tidy

Running the Application

  1. Ensure Redis is running:

    redis-server
  2. Build the application:

    go build -o chronos main.go
  3. Run the server:

    ./chronos

The server will start on the default port 8080.

API Endpoints

  • POST /run - Submit a new job
  • GET /status - Check job status
  • GET /info - Get system information

Example Usage

Submit a job:

curl -X POST http://localhost:8080/run

Check status:

JOB_ID="12345"
curl "http://localhost:8080/status?key=${JOB_ID}"

Roadmap

This is a collection of potential improvements to Chronos, organized by priority and importance.

Medium Priority (Robustness)

  • Advanced Error Handling: Implement retry with exponential backoff, add dead-letter queue for failed jobs.
  • Resource Management: Implement graceful shutdown, channel cleanup, context cancellation.

Medium-High Priority (Scalability)

  • Performance Optimizations: Implement connection pooling for Redis and HTTP clients, enable request batching, profile code to identify and optimize bottlenecks.
  • Horizontal Scalability: Support multiple instances with shared Redis, add load balancing.
  • Web Interface: Develop a simple dashboard for real-time job monitoring and status.

Low Priority (Advanced Features)

  • Authentication: Implement JWT/API keys to secure endpoints.
  • Diverse Job Types: Support scheduled jobs (cron), priorities, dependencies.
  • External Integrations: Add webhooks for notifications, CI/CD pipeline support.
  • Deployment: Add Docker Compose, Kubernetes manifests, CI/CD pipeline.

Ongoing (Maintenance)

  • Code Quality: Use golangci-lint, pre-commit hooks, code reviews.
  • Versioning: Implement semantic versioning, changelog, release automation.
  • Backup and Recovery: Establish Redis backup procedures, disaster recovery plans.

About

Async job processing and status tracking for high-volume operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages