Implement parallel writes
See original GitHub issueThis is a big feature that would allow Etcher to be able to stream the same image to multiple drives at the same time. This feature should be implemented by extending the already existing etcher-image-write
NPM module. The module currently accepts the path to a drive device as an argument to the main function. If the user passes an array of drives, the multi-writer logic should come in.
Some of the challenges for this task are:
- Cross platform support.
- Validating the drives at the moment the writing starts.
- Handling validation correctly for all of them (there are some quirks to make validation work in certain operating systems, like in OS X, where we have to use OS X specific frameworks to prevent the drives from being mounted right when the flash ends, so the operating system doesn’t write files like .DS_Store that messes up the checksum).
- Handling error conditions correctly (e.g: if a certain drive fails, the rest should continue).
- Making sure the whole stream is streamed to all devices (e.g: no data is lost because it has been piped to another drive).
- Imposing a reasonable limit of drives that can be written at the same time, depending on the capabilities of the operating system to prevent potential kernel panics, etc. If a user tries to write to more images than he should, we should make of use of a queue.
The module returns an EventEmitter instance which emits state information. When multiple writings are taking place, the emitted events could have a property containing the drive they correspond to.
It’s important that this feature contains extensive end to end tests.
This project should not contain native addons by any means, since it’s used by other projects that are installed by end users without necessarily having a toolchain in place.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:10 (8 by maintainers)
Top GitHub Comments
Resolved by #2124
Same issue, same setup with @unphased on Etcher Version 1.5.100. Any way to improve speed to full in parrallel, @jviotti ? That would be great.