Skip to content

Parallelize hashing and transmitting blocks #3

@PhrozenByte

Description

@PhrozenByte

As soon as the local instance has both hashes of the first block, it might request this block from the sender and forward it to the receiver. However, it should be possible to disable parallelization, because reading hashes and reading/writing blocks at the same time will cause a heavy slowdown on HDD storages (unless network speed is slower anyway...).

Remotes then also need threading for computing hashes (async, i.e. we compute the next hash even though we didn't send the previous hash yet) and sending/receiving blocks (sync, i.e. we only send/receive one block at a time). We must furthermore add package identifiers to the network protocol (to distinguish hashes and blocks) and ensure that we don't accidentally mix packages mid-data (this can indeed happen because we use stdout/stdin; maybe with a third thread responsible for communications?).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions