Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First stab at implementing asynchronously pushed-back task results #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Mark-H
Copy link
Member

@Mark-H Mark-H commented Mar 27, 2020

No description provided.

The general idea is to not keep workers waiting for tasks that may take a while to complete. Things like backups and upgrades may take the client a minute to process - the worker does not need to sit idle during that time; it might as well process other tasks simultaniously.

Flow:

1. Worker pushes the task to the client, with a uri and one-time signing key
2. Client acknowledges receipt and support for the async return push with a 202
3. Worker marks task as awaiting async response and continues to whatever other tasks are queued
4. Client processes slow task, and when done pushes the response to the sitedash endpoint from (1). Endpoint stores received data, marks related job exec as having received data to process.
5. Same worker (when free) is assigned again to job exec and finishes processing the data
@Mark-H Mark-H force-pushed the feature-async-return-push branch from 87ef56e to 72a2bf4 Compare July 13, 2021 13:55
… the added complexity

The return push uri is now a 96-character random string that's only valid once (when SiteDash expects a response) so that's going to be incredibly difficult to cause arbitrary data to get sent back by an attacker.

Lack of a signature does theoretically allow MITM, but nearly impossible to execute server-to-server and production runs on HTTPS with HSTS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant