I built a Laravel-native alternative to Temporal just using queues and yield

2 points by rmcdaniel 8 days ago

I was working at a fintech company and we needed a way to track long-running processes.

We were using queued jobs that would check if an earlier step had completed, and requeue itself if it hadn't. It worked but it was noisy, hard to track, and just felt wrong.

I started looking for a better solution.

That's when I found Temporal. Their PHP SDK had a great developer experience. You could yield async steps, write workflows like regular code, and it just resumed where it left off. It felt right.

Then I brought it to the DevOps team.

And hit a wall.

It required running a k8s cluster or paying for their cloud service. They looked at me like: "Why would we do all this just to run PHP jobs?"

And I remember thinking... they're probably right.

We already had Laravel queues. We already had a database. Maybe we could build something similar without all the ceremony.

So I did.

I kept the core idea from Temporal's PHP SDK, using yield as a coroutine checkpoint, and threw the rest away. No server. No cluster. No cloud.

A workflow is just a queued job that runs until the next yield. When the yielded job completes, it requeues the workflow, rebuilds the state, and picks up where it left off.

That was the proof of concept. It worked. We shipped a basic version to production.

But I couldn't stop thinking about it.

The whole thing felt like a puzzle. So I kept going, added side effects, sagas, child workflows...

I shared my private repo with an engineer I had befriended at Temporal (from bugging him with too many questions).

He said: "Wow, that's really cool. You should release it."

So I did. Wrote docs. Opened the repo. Tagged a composer release.

And then something clicked:

Temporal isn't targeting PHP devs.

They're chasing enterprise accounts. Big teams. Fortune 500s.

Their PHP SDK is maintained but not a priority. It even requires Roadrunner, an extra runtime on top of the Temporal server. That's more friction Laravel devs don't want.

Meanwhile I'm over here with:

No external services No custom runtimes Just queues + DB And yield

Now Laravel Workflow is quietly the default for long-running orchestration in Laravel.

It's at the top of Google for many relevant phrases.

Temporal PHP SDK has 4-5x more daily installs. But they also have $350 million in funding.

I've made back my domain name fees with GitHub sponsors.

The only "failure" is that I don't have anything to sell. There's no cloud product. No SaaS angle.

turtleyacht 8 days ago

You found an entrypoint into the problem lode and mined over a hundred commits, persisting over years.

It's a blessing to know your tools well, to craft something in your power, and to create something others use.

Just from my view, sounds pretty awesome.

The ideas could be shared through Laravel consulting, video training, and books on PHP concurrency.