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

refactor Sidecar into an actor #71

Merged
merged 1 commit into from
Nov 13, 2015
Merged

refactor Sidecar into an actor #71

merged 1 commit into from
Nov 13, 2015

Conversation

reset
Copy link
Collaborator

@reset reset commented Nov 13, 2015

health check hook can now be templatized with mustache

health check hook can now be templatized with mustache
@reset
Copy link
Collaborator Author

reset commented Nov 13, 2015

We may want to push updated data into the sidecar in the main loop instead of aquiring a read lock on the package/service_config from within the sidecar. This will increase throughput for the HTTP interface and stop clients from there from aquiring a massive amoutn of read locks. This should be fine for now.

gif-keyboard-3147692917201180944

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

if worker.census.needs_write {
let census_toml = try!(worker.census.to_toml());
worker.service_config.census(census_toml);
let mut service_config = worker.service_config.write().unwrap();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This isn't ideal, either. The blocks below send calls to multiple actors below which is a form of "polling". We instead want to be notified of changes and only obtain a lock when we need to.

@adamhjk
Copy link
Contributor

adamhjk commented Nov 13, 2015

gif-keyboard-5159370677117659783

Nice work!

@adamhjk
Copy link
Contributor

adamhjk commented Nov 13, 2015

@delivery approve

chef-delivery added a commit that referenced this pull request Nov 13, 2015
Merged change 6a7f2591-3666-45e6-acf1-846ada5e20c9

From review branch sidecar-refactor into master

Signed-off-by: adam <[email protected]>
@chef-delivery chef-delivery merged commit b50345a into master Nov 13, 2015
@chef-delivery chef-delivery deleted the sidecar-refactor branch November 13, 2015 15:18
@chef-delivery
Copy link
Contributor

Change: 6a7f2591-3666-45e6-acf1-846ada5e20c9 approved by: @adamhjk

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.

3 participants