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
Adjust how command output is returned #1
Comments
I've decided to go down the more complicated route of doing proper streaming output. I've managed to add single-channel streaming that holds output from all hosts with no metadata such as hostname; See The current challenge is making a system where a channel of type https://github.com/DiscoRiver/massh/blob/add-streaming-output/session.go#L133 Without this the program hangs forever so I need to re-design this. |
So, I've been messing around on the playground, and I think I can achieve what I want with something like this;
I'm fortunate that the tool will always know how many receives from the channel it needs to perform, so calling |
Managed to work everything out here: 7cd9f66 Major cleanup and restructuring is necessary, but the logic is there. The issue I was having is that I was inadvertently returning a nil |
Coming together nicely: ca2a2ba Things left;
|
Currently, command output is only returned after every host has finished executing;
After implementing this package into a production app, for an environment of around 200 servers, it became clear that this can cause an almost invisible bottleneck, especially if the worker pool is low compared to the number of hosts being touched. I wanted to refer to it as a perceived delay, but it can actually hang up the caller because it is waiting for every host to finish the work and return something.
There are two requirements I have to improve this;
The text was updated successfully, but these errors were encountered: