-
Notifications
You must be signed in to change notification settings - Fork 5
New hub and worker architecture #165
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(better to send the review I have, than spend days more crafting a better one. feel free to push back if something seems wrong.)
src/hypofuzz/hypofuzz.py
Outdated
| # TODO actually defer starting up targets here, based on worker lifetime | ||
| # and startup cost estimators here | ||
| for nodeid in candidates: | ||
| self.add_target(nodeid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd like to move this responsibility into the hub process; it can slowly 'feed in' extra targets to amortize startup cost, etc. That way only one process needs to read from the database to get good performance, and we get a pretty nice separation of concerns too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, I think. My only wonder is if the workers have access to expensive-to-serialize information that means they could make better decisions than the hub, but I don't think so. It's just estimator state that we're already sharing anyway.
Zac-HD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid, though there are obviously some substantial followup PRs to come before it really pays off 🙂
For this PR, I'd love to have some basic tests to act as sanity-checks when we later start complicating things, and then merge.
Split from #154. The allocation behavior is exactly the same as master, and several things here are no-ops. I figured splitting out the architecture makes it easier to review that, and then we can review the estimators separately.