Remote runner #93
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Recommended Design: Registered Pull Runners
Rather than exposing every runner directly to the internet, each remote machine should run a small runner agent that connects outbound to the backend.
Flow:
Remote runner
-> registers with backend
-> maintains heartbeat / long-poll connection
-> receives a TTS job
-> calls its local TTS service
-> streams results back to backend
This avoids firewall, NAT, and TLS complications. The backend does not need to initiate connections to arbitrary remote machines.
Runner Model
Add a persistent tts_runners table containing:
The backend should never store the raw runner token, only a hash.
Runner Registration
Provide an authenticated admin flow:
The token should be shown only once and revocable from the app.
Job Assignment
The current worker claims a TTS job directly from the queue. This would change to:
Runner selection could initially be simple:
Later it could support:
Runner Communication
Two viable approaches exist:
For a personal or controlled deployment, direct HTTPS may be acceptable. For a general application, outbound runner connections are safer.
Failure Handling
Runner jobs need leases:
The runner should be idempotent:
Security Requirements
Frontend Changes
The app could add an admin runner page showing:
The Speech page could optionally expose a runner selector. Initially, automatic runner selection would avoid changing the user workflow.
Recommended Implementation Phases
The cleanest long-term architecture is:
Backend
Runner agent
TTS service
This keeps the TTS service simple while allowing multiple machines, different hardware, and future runner types.
A possible design could be the following