Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hatchet-dev/hatchet
A distributed, fault-tolerant task queue
https://github.com/hatchet-dev/hatchet
concurrency dag distributed distributed-systems durable-execution event-driven fastapi golang nodejs python queue typescript workflow-engine
Last synced: 11 days ago
JSON representation
A distributed, fault-tolerant task queue
- Host: GitHub
- URL: https://github.com/hatchet-dev/hatchet
- Owner: hatchet-dev
- License: mit
- Created: 2023-12-15T17:50:29.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-01T13:28:49.000Z (6 months ago)
- Last Synced: 2024-05-01T14:19:38.243Z (6 months ago)
- Topics: concurrency, dag, distributed, distributed-systems, durable-execution, event-driven, fastapi, golang, nodejs, python, queue, typescript, workflow-engine
- Language: Go
- Homepage: https://hatchet.run
- Size: 10.1 MB
- Stars: 3,180
- Watchers: 9
- Forks: 99
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - hatchet-dev/hatchet - A distributed, fault-tolerant task queue (Go)
- awesomeLibrary - hatchet - A distributed, fault-tolerant task queue (语言资源库 / go)
- awesome-go - hatchet - Distributed, Fault-tolerant task queue. Stars:`4.2K`. (Data Structures and Algorithms / Queues)
README
### A Distributed, Fault-Tolerant Task Queue
[![Docs](https://img.shields.io/badge/docs-docs.hatchet.run-3F16E4)](https://docs.hatchet.run) [![License: MIT](https://img.shields.io/badge/License-MIT-purple.svg)](https://opensource.org/licenses/MIT) [![Go Reference](https://pkg.go.dev/badge/github.com/hatchet-dev/hatchet.svg)](https://pkg.go.dev/github.com/hatchet-dev/hatchet) [![NPM Downloads](https://img.shields.io/npm/dm/%40hatchet-dev%2Ftypescript-sdk)](https://www.npmjs.com/package/@hatchet-dev/typescript-sdk)
[![Discord](https://img.shields.io/discord/1088927970518909068?style=social&logo=discord)](https://discord.gg/ZMeUafwH89)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/hatchet-dev.svg?style=social&label=Follow%20%40hatchet-dev)](https://twitter.com/hatchet_dev)
[![GitHub Repo stars](https://img.shields.io/github/stars/hatchet-dev/hatchet?style=social)](https://github.com/hatchet-dev/hatchet)
### What is Hatchet?
Hatchet replaces difficult to manage legacy queues or pub/sub systems so you can design durable workloads that recover from failure and solve for problems like **concurrency**, **fairness**, and **rate limiting**. Instead of managing your own task queue or pub/sub system, you can use Hatchet to distribute your functions between a set of workers with minimal configuration or infrastructure:
**What Makes Hatchet Great?**
- ⚡️ **Ultra-low Latency and High Throughput Scheduling:** Hatchet is built on a low-latency queue, perfectly balancing real-time interaction capabilities with the reliability required for mission-critical tasks.
- ☮️ **Concurrency, Fairness, and Rate Limiting:** Implement FIFO, LIFO, Round Robin, and Priority Queues with Hatchet’s built-in strategies, designed to circumvent common scaling pitfalls with minimal configuration. [Read Docs →](https://docs.hatchet.run)
- 🔥🧯 **Resilience by Design:** With customizable retry policies and integrated error handling, Hatchet ensures your operations recover swiftly from transient failures. You can break large jobs down into small tasks so you can finish a run without rerunning work. [Read Docs →](https://docs.hatchet.run)
**Enhanced Visibility and Control:**
- **Observability.** All of your runs are fully searchable, allowing you to quickly identify issues. We track latency, error rates, or custom metrics in your run.
- **(Practical) Durable Execution.** Replay events and manually pick up execution from specific steps in your workflow.
- **Cron.** Set recurring schedules for functions runs to execute.
- **One-Time Scheduling.** Schedule a function run to execute at a specific time and date in the future.
- **Spike Protection.** Smooth out spikes in traffic and only execute what your system can handle.
- **Incremental Streaming.** Subscribe to updates as your functions progress in the background worker.**Example Use Cases:**
- **Fairness for Generative AI:** Don't let busy users overwhelm your system. Hatchet lets you distribute requests to your workers fairly with configurable policies.
- **Batch Processing for Document Indexing:** Hatchet can handle large-scale batch processing of documents, images, and other data and resume mid-job on failure.
- **Workflow Orchestration for Multi-Modal Systems:** Hatchet can handle orchestrating multi-modal inputs and outputs, with full DAG-style execution.
- **Correctness for Event-Based Processing:** Respond to external events or internal events within your system and replay events automatically.## Quick Start
Hatchet is available as a cloud version or self-hosted. See the following docs to get up and running quickly:
- [Hatchet Cloud Quickstart](https://docs.hatchet.run/home/hatchet-cloud-quickstart)
- [Hatchet Self-Hosted](https://docs.hatchet.run/self-hosting)Hatchet supports your technology stack with open-source SDKs for Python, Typescript, and Go. To get started, see the language-specific guides here:
- [Python SDK Docs](https://docs.hatchet.run/sdks/python-sdk) | [Python SDK Quickstart](https://github.com/hatchet-dev/hatchet-python-quickstart)
- [Typescript SDK Docs](https://docs.hatchet.run/sdks/typescript-sdk) | [Typescript SDK Quickstart](https://github.com/hatchet-dev/hatchet-typescript-quickstart)
- [Go SDK Docs](https://docs.hatchet.run/sdks/go-sdk) | [Go SDK Quickstart](https://github.com/hatchet-dev/hatchet-go-quickstart)### SDK repositories
If you encounter any issues while using the SDKs, please submit an issue in the respective repository:
- [Python SDK](https://github.com/hatchet-dev/hatchet-python)
- [Typescript SDK](https://github.com/hatchet-dev/hatchet-typescript)
- [Go SDK](https://github.com/hatchet-dev/hatchet)## How does this compare to alternatives (Celery, BullMQ)?
Why build another managed queue? We wanted to build something with the benefits of full transactional enqueueing - particularly for dependent, DAG-style execution - and felt strongly that Postgres solves for 99.9% of queueing use-cases better than most alternatives (Celery uses Redis or RabbitMQ as a broker, BullMQ uses Redis). Since the introduction of `SKIP LOCKED` and the milestones of recent PG releases (like active-active replication), it's becoming more feasible to horizontally scale Postgres across multiple regions and vertically scale to 10k TPS or more. Many queues (like BullMQ) are built on Redis and data loss can occur when suffering OOM if you're not careful, and using PG helps avoid an entire class of problems.
We also wanted something that was significantly easier to use and debug for application developers. A lot of times the burden of building task observability falls on the infra/platform team (for example, asking the infra team to build a Grafana view for their tasks based on exported prom metrics). We're building this type of observability directly into Hatchet.
For more information for why we built Hatchet, you can check out our writeup on Celery [here](https://docs.hatchet.run/blog/problems-with-celery).
## Issues
Please submit any bugs that you encounter via Github issues. However, please reach out on [Discord](https://discord.gg/ZMeUafwH89) before submitting a feature request - as the project is very early, we'd like to build a solid foundation before adding more complex features.
## I'd Like to Contribute
See the contributing docs [here](https://docs.hatchet.run/contributing), and please let us know what you're interesting in working on in the #contributing channel on [Discord](https://discord.gg/ZMeUafwH89). This will help us shape the direction of the project and will make collaboration much easier!