Work gets asked for more than once all the time. A user double-clicks Export. A client times out and retries while the first request is still running. Ten dashboards ask for the same monthly report at nine in the morning. Each copy burns the same CPU, the same API calls and the same database load, and sometimes the copies get in each other’s way. With paid AI model calls or payments, duplicates cost real money.
TaskFused runs them once. Every piece of work gets a name. The first request with that name creates a durable operation. Every later request with the same name joins it and gets the same result. Operations live in one local SQLite file, so they survive crashes and restarts. It’s a Go library, a command and a local HTTP API.
The Pitch in Four Numbers
- 1 run for 100 identical requests: one created the operation, 99 joined it.
- 1.1 seconds from killing a worker mid-job to the same operation finishing on a new worker, with a one-second lease.
- 26 storage failures forced across 13 kinds of write, and every one rolled back with nothing half-saved.
- 1 SQLite file, with every change flushed to disk.
How It Works
Go has a well-known tool for this, singleflight, which merges identical calls inside one process. But it forgets everything when the process exits, and other processes can’t see its calls. TaskFused keeps the idea and makes it durable. The operation, its attempts and its result are written to SQLite before anyone is told the operation exists.
An operation is identified by namespace, handler, handler version and key. Same name and same input join the same operation. Same name with different input is rejected as a conflict, which catches bugs early. A worker holds each attempt on a lease and renews it while working. If the worker dies, the lease runs out and another worker picks the job up under the same operation ID. Late results from the dead worker are refused.
The SQLite file runs in WAL mode with full sync, and each step is one transaction. There’s a Go package to embed, a taskfused command, and an HTTP API that listens only on the local machine, with a read-only status page that has no JavaScript and no login. The tests kill real worker processes mid-job and force storage failures at every write.
Who It’s For
- Apps with expensive exports and reports that users trigger more than once.
- Services calling paid AI models, where every duplicate call is money.
- Cache rebuilds that stampede when a popular entry expires.
- Payment and email flows that need idempotency built in.
Limits
It’s at least once, not exactly once. If a worker crashes after doing the work but before saving the result, the job runs again on another worker, so side effects like sending an email should use the operation ID as their own idempotency key. It’s single-host for now, because the SQLite file lives on local disk. Handlers are written in Go, while other languages can submit work and wait for results through the HTTP API or the command. And it isn’t a plain job queue: a queue accepts every job, while TaskFused checks the name first.
The Four-Question Screening
Every project featured here gets the same four questions, the way you’d screen a startup idea.
1. Where is the money in it?
TaskFused is free under Apache 2.0, with no paid tier. Duplicate work shows up directly on cloud and AI bills, so the savings are easy to measure. The paid paths are a multi-host version for teams running many servers, a hosted service with metrics on how much work was saved, and support for companies using it on payments and other critical flows. AI-heavy products, where one duplicated model call can cost more than the request it served, are the sharpest first market.
2. What real problem does it solve?
The same work done over and over, wasting money and occasionally causing harm, like a double charge or two emails. In-memory deduplication helps within one process and vanishes on restart. TaskFused remembers across processes and crashes.
3. The technology in plain words
Picture an office where ten people ask for the same report. Instead of ten people each writing it, the first request goes on a board with a name. Everyone else who asks gets told “it’s being done, you’ll get a copy.” If the person writing it goes home sick, someone else picks up the same job from the board and finishes it.
4. Moat and differentiation
Job queues accept everything, and in-memory deduplication forgets. TaskFused sits in the gap with durable, named operations that every caller can join, on nothing more than a SQLite file. The crash and storage-failure testing is what makes it safe to put in front of payments. The moat that can grow is the multi-host version and a reputation for correctness on exactly the operations where duplicates hurt most.
Why It Matters
As more work calls paid APIs and AI models, duplicates stop being a nuisance and start being a line on the bill. A small engine that makes “run it once” the default saves money without changing how callers ask for work.
Follow the Project
Start with the quick start, read the reference, get it from the download page, or see the code in the TaskFused repository on GitHub. TaskFused is listed with the other open-source projects on SoftDevStudio.com, and more featured projects are in the Projects section.