From 7a428e300f8eb8fff8acd0b4c0b05c9c1ac112dc Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 29 Jun 2026 09:04:53 +0000 Subject: [PATCH] Migrated from GitLab wiki --- improved-user-driven-background-tasks.-.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 improved-user-driven-background-tasks.-.md diff --git a/improved-user-driven-background-tasks.-.md b/improved-user-driven-background-tasks.-.md new file mode 100644 index 0000000..43fe6e3 --- /dev/null +++ b/improved-user-driven-background-tasks.-.md @@ -0,0 +1,19 @@ +The current code for background tasks isn't fantastic, and is a good candidate to be extracted into a standalone service. + +# Requirements + +* Central HTTP API to initiate various background tasks +* Tasks are ultimately just CLI scripts. +* Tasks can be run on remote machines to scale out. +* Tasks can push progress updates and logs back to the server. + +# Implementation Ideas/Notions + +* Jobs identified by UUIDs, generated by API consumer. +* Need to think about priority-queue behavior that round-robins through client tenants, to prevent one tenant from DOSing the service. +* How to push updates back to server? + * Just write to stdout and have server read output? + * Run jobs in background and have them PUT/POST updates back to service + * PSR-3 logger, or Stream/Writer for Monolog? Async? +* Client apps can poll server for updates. +