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

Use Bazel's persistent worker feature for starting/managing the server #2

Open
nathaniel-brough opened this issue Jan 25, 2022 · 2 comments

Comments

@nathaniel-brough
Copy link

Firstly, great project. I feel that the user experience here could be improved somewhat by making use of Bazel's persistent worker API.

Using this approach you could start a server/worker automatically in the background and have Bazel manage the client/server communications. This would be an alternative to running the server as a separate Bazel process, beforehand.

As a replacement for the --exec_path flags you are currently using with the server it would be doable to use a Bazel string_flag.

I'm more than happy to contribute with a PR but I could use some guidance if you feel that this would be a useful addition?

@agoessling
Copy link
Owner

agoessling commented Jan 29, 2022

That Bazel feature must be new. It looks like it is a perfect fit for this problem. I definitely think it would be worth a try to see it works well. I feel like the place to start would be to alter VivadoClient (in vivado/tools/vivado_client.py) to directly interact with a ProcessMonitor (in vivado/tools/process_manager.py), bypassing the ProcessServer (e.g. directly calling read and write on ProcessMonitor instead of passing those through a socket). The new entity (VivadoWrapper?) would be responsible for starting and stopping the Vivado process depending on the --persistent_worker flag. Let me know if you have any other questions on where to dig in, and thanks for your interest and suggestion!

@nathaniel-brough
Copy link
Author

Sweet I'll open a WIP, pr soon with some updates.

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

No branches or pull requests

2 participants