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

Worker manager #8

Closed
rgaudin opened this issue May 29, 2024 · 0 comments · Fixed by #22
Closed

Worker manager #8

rgaudin opened this issue May 29, 2024 · 0 comments · Fixed by #22
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rgaudin
Copy link
Member

rgaudin commented May 29, 2024

Worker is configured with the Backend API URL and credentials. For now, as we envision having only a single worker, we can have the worker's configuration (List of countries supported) done in the DB directly.

Worker communicates with the Backend via the Backend API.
Polling Backend API periodically is very reliable and transparent. In addition, we may have a zmq based push system that allows for instant operations on backend scheduling.

The worker is composed of a main manager that is mostly this poll loop awaiting test requests. Once a request arrive, the worker informs the backend that it is processing it.

Then it starts the actual test process:

  • informs the network container to reconfigure for requested country
  • ensures that this succeeded
  • starts the network-blind test container (which reports results to filesystem) and awaits its completion.

Once the tester has completed, results are read and submitted to the API (and deleted from disk?).
Worker is back on its loop.

Communication between the manager container and the tester one be done docker exec.

Alternative is to use filesystem: tester to store its output into a well known file onto a shared volume/mount. We used both methods on zimfarm, reliably.

@rgaudin rgaudin added the enhancement New feature or request label May 29, 2024
@rgaudin rgaudin added this to the MVP milestone May 29, 2024
@rgaudin rgaudin changed the title Basic worker Worker manager May 29, 2024
@rgaudin rgaudin mentioned this issue May 30, 2024
@elfkuzco elfkuzco linked a pull request Jul 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants