You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_block:xyz_ and _blocker_ to better manage command queue dependencies #52
In this example, because the items in the _block_ are always loaded sequentially they shouldn't ever run out of order. Additionally, because we have a blocker before nmap, this item won't run until the block is finished.
Alternatively, we could have a command list like the following:
In this example, the block would run the same as before, but assuming the thread count is high enough then nikto would begin to run immediately, passing results back to the terminal (whilst nmap and file creation happened in the background).
changed the title [-]_block:xyz_ and _blocker_ to manage command queues[/-][+]_block:xyz_ and _blocker_ to better manage command queues dependancies[/+]on Aug 12, 2019
changed the title [-]_block:xyz_ and _blocker_ to better manage command queues dependancies[/-][+]_block:xyz_ and _blocker_ to better manage command queue dependencies[/+]on Aug 12, 2019
Blocks can be nested since everything in a block is sequential anyway, nesting will make no difference. That said, a warning should be shown if a block is not closed. This shouldn't need to be an exception, but the user should be made aware since everything after the block would then run sequentially.
In case it's not clear from the above as well, it's important that the user can add multiple blocks to a single job. The idea of this is that the threader will optimize by taking jobs off the command list file, but by having blocks you can have your sequential tasks within the same file (instead of making shell scripts that run outside of the command queue).
and should be run on 5 threads/workers. The default behavior of your implementation is to pick 5 tasks first(not sure if the order of appearance matters?) and on completion, run the other 3. I think that's OK since the tasks seem to be independent of one another.
Now, enter the _block:<name>_ block(let's call it TaskBlock) and the sequence-before segment_blocker_. Given the 8 tasks above, if a _blocker_ is indicated beforecopy foo bar/ like so,
does that mean all operations immediately after the _blocker_ segment (starting with copy foo bar/) must wait until the tasks above the _blocker_ is completed?
When the tasks above the _blocker_ segment is completed, does the execution of the tasks follow the sequential order or they can be multi-threaded again before the next blocker is encountered?
What is the behavior of the tasks in a TaskBlock? Guaranteed sequential or multi-threaded?
Gotcha, so the intended functionality is that once a _blocker_ is hit, queuing of those tasks will be halted until the blocker is resolved. Once it's resolved commands may queue again and do not need to be completed sequentially. Items before a _blocker_ do not need to run sequentially, only items within a _block.
Items within a taskblock are guaranteed to be sequential.
Activity
[-]_block:xyz_ and _blocker_ to manage command queues[/-][+]_block:xyz_ and _blocker_ to better manage command queues dependancies[/+][-]_block:xyz_ and _blocker_ to better manage command queues dependancies[/-][+]_block:xyz_ and _blocker_ to better manage command queue dependencies[/+]codingo commentedon Aug 13, 2019
Blocks can be nested since everything in a block is sequential anyway, nesting will make no difference. That said, a warning should be shown if a block is not closed. This shouldn't need to be an exception, but the user should be made aware since everything after the block would then run sequentially.
codingo commentedon Aug 13, 2019
In case it's not clear from the above as well, it's important that the user can add multiple blocks to a single job. The idea of this is that the threader will optimize by taking jobs off the command list file, but by having blocks you can have your sequential tasks within the same file (instead of making shell scripts that run outside of the command queue).
iamOgunyinka commentedon Aug 14, 2019
So I have an example I'd like clarity on. Suppose there are 8 tasks scheduled to run:
and should be run on
5 threads/workers. The default behavior of your implementation is to pick 5 tasks first(not sure if the order of appearance matters?) and on completion, run the other 3. I think that's OK since the tasks seem to be independent of one another.Now, enter the
_block:<name>_block(let's call itTaskBlock) and the sequence-before segment_blocker_. Given the 8 tasks above, if a_blocker_is indicated beforecopy foo bar/like so,_blocker_segment (starting withcopy foo bar/) must wait until the tasks above the_blocker_is completed?_blocker_segment is completed, does the execution of the tasks follow the sequential order or they can be multi-threaded again before the next blocker is encountered?TaskBlock? Guaranteed sequential or multi-threaded?codingo commentedon Aug 15, 2019
Gotcha, so the intended functionality is that once a
_blocker_is hit, queuing of those tasks will be halted until the blocker is resolved. Once it's resolved commands may queue again and do not need to be completed sequentially. Items before a_blocker_do not need to run sequentially, only items within a_block.Items within a taskblock are guaranteed to be sequential.
codingo commentedon Aug 15, 2019
Currently being tested in #55
Merge pull request #60 from iamOgunyinka/flat
codingo commentedon Aug 19, 2019
Closed with #60, bounties to be awarded to #59 and #60