tempest-framework icon indicating copy to clipboard operation
tempest-framework copied to clipboard

Async commands

Open brendt opened this issue 1 year ago • 6 comments
trafficstars

We need a way to dispatch background jobs to a queue. We could make a CLI-only interface for starters. We already have a scheduler component which might come in handy, though still tbd.

brendt avatar Aug 11 '24 04:08 brendt

This is actually the one thing keeping me away from trying it out.

Wulfheart avatar Sep 14 '24 08:09 Wulfheart

Gotcha! Thanks for that feedback, we might reprioritise stuff in the coming days :)

brendt avatar Sep 16 '24 04:09 brendt

I made a rough sketch of what the system should look like:

image

brendt avatar Sep 20 '24 10:09 brendt

Just thinking here, but I think something like Horizon should be built-in. Not talking about the interface (which I don't think is even necessary), but the functionality, with customizable environments and balancing strategies.

It's personally super rare that I don't need that and that I only use the built-in queue, so I think Tempest should also have that built-in.

innocenzi avatar Sep 21 '24 14:09 innocenzi

Hands down agree, @innocenzi. Long term, I'd really love to see Tempest play nicely with microservices/other languages in the queue as well. This is something that I firmly believe PHP to be lacking a good implementation of.

By way of update here, @brendt and I had this conversation a little bit and the starting point (for v1) may simply be async commands executed by a console runner that can then be rebuilt (under the hood) on top of a proper queue system post v1.

This is all pending Brent's post-weekend thoughts. 🙃

aidan-casey avatar Sep 21 '24 15:09 aidan-casey

My mid-weekend thoughts are: for v1, we're going to add async support in the commandbus. There won't be any balancing strategies, but you will be able to push tasks to the background. I also don't think a UI is necessary, but there will be a CLI-based monitor.

After v1, we can expand on it as Aidan is describing

brendt avatar Sep 22 '24 05:09 brendt