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

server_host.py refactor #2647

Merged
merged 3 commits into from Mar 4, 2024
Merged

server_host.py refactor #2647

merged 3 commits into from Mar 4, 2024

Conversation

joeyballentine
Copy link
Member

This refactors server_host to use a new helper class that manages everything related to the executor process (on top of the already existing class that handles the subprocess itself)

This ultimately fixes the SSE reconnection issue by having this class manage both the process and the connection, allowing both to be restarted easily. (I tested this merged with the backend-killing branch locally, and confirmed this did fix the issue)

This should be merged before #2646

Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the general design of ExecutorServerProcess and ExecutorServer is good. There are a few implementation details I don't like (two-step init, too much API surface), but I would like to tackle those things myself after this is merged.

For now, I just think that we should rename some stuff. Calling classes and variables "server process" makes no sense to me, because everything here is the server. I think we should consistently call the host process/server "host" (like we already kinda do) and the worker process/server "worker" (suffixes are allowed, of course 😄).

backend/src/server_process_helper.py Show resolved Hide resolved
@joeyballentine joeyballentine merged commit f3ec0ff into main Mar 4, 2024
14 checks passed
@joeyballentine joeyballentine deleted the server_host_refactor branch March 4, 2024 18:37
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

2 participants