From 6e1950535e1eab20b3029c89f989470da503d5ae Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 23 May 2025 14:35:35 +0200 Subject: document the remaining workers --- readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 28fedd0..c7d1070 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,21 @@ Generic task queue server with scripts for downloading with different tools. +## Architecture + +There is a central task queue server (isdad) and multiple workers that connect +to that server to complete tasks. + +Tasks have a _key_ which is a string used to identify it and _data_ which is a +arbitrary JSON object. Keys are in the format `kind:id`; The kind is used by the +queue server to determine which workers are able to process the task. + +When workers connect to the queue server they register which tasks kinds they +can process. After that they can accept tasks. Whenever a supported task exists, +it will be assigned to that worker. The worker will then carry out the work and +mark the task as completed. If workers disconnect (crash) while working, all +assigned tasks will be moved back to the queue. + ## Usage First start the queue daemon process. It will save its state to JSON files in -- cgit v1.2.3-70-g09d2