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. +