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

Sub-process Approach for Agent #748

Open
michaelquigley opened this issue Sep 10, 2024 · 1 comment
Open

Sub-process Approach for Agent #748

michaelquigley opened this issue Sep 10, 2024 · 1 comment
Assignees
Labels
spike Spikes
Milestone

Comments

@michaelquigley
Copy link
Collaborator

This is a sub-task of #463.

In working through the agent implementation I figured out that some of the Caddy-based backends really don't want to allow running multiple instances per-process. The caddy.Run() call really expects to only happen a single time per-process.

Also, it might be a little less than ideal to lose all of the running shares in a case where an agent process crashes.

So, let's explore a sub-process based agent approach. Instead of having a single large process to manage all of the agent frontends and backends, let's make the core agent into a sub-process manager.

Spawning processes is relatively easy. There may be challenges around discovering which processes correspond to existing shares, and detecting crashed sub-processes.

@michaelquigley michaelquigley added the spike Spikes label Sep 10, 2024
@michaelquigley michaelquigley added this to the v1.0 milestone Sep 10, 2024
@michaelquigley michaelquigley self-assigned this Sep 10, 2024
michaelquigley added a commit that referenced this issue Sep 12, 2024
@michaelquigley michaelquigley moved this from Development to Evaluating in zrok Development Roadmap Sep 12, 2024
@michaelquigley
Copy link
Collaborator Author

The os.Process.Kill() method sends SIGKILL, which cannot be properly caught with a shutdown hook. Need to either post-cleanup in the daemon, or explore sending SIGQUIT and waiting to join.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spike Spikes
Projects
Status: Evaluating
Development

No branches or pull requests

1 participant