I want to write a big file, but the file is from 1000 blocks, also the blocks are from network. so I think better not doing that in a sequential manner like:
- first read all blocks or wait until block ready to write like 0,1,2,3,4,…wait 5 to come
I want to do like this:
- preallocate 1000Mb file
- spawn 1000 processes to get the blocks
- if block 51 ready then write 51 to 51*1MB offset
- do this until write all.
- does Elixir support pre allocate?
- can I write to same file at diff offset simultaneously without locking issue?