Skip to content
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

Efficient hashing #6

Open
vkuznet opened this issue Mar 24, 2017 · 7 comments
Open

Efficient hashing #6

vkuznet opened this issue Mar 24, 2017 · 7 comments

Comments

@vkuznet
Copy link
Owner

vkuznet commented Mar 24, 2017

For each file to transfer we need to obtain its hash, so far we read files from end-to-end to obtain file hash. It has impact on RAM utilization. Study if this can be avoided or find a better way to obtain reliable hash while minimize RAM utilization impact. For example, seek file in multiple places and obtain hash of some chunk of the data.

@rishiloyola
Copy link
Collaborator

rishiloyola commented Apr 1, 2017

Instead of adler32 algorithm, we can use Fletcher's checksum algorithm to reduce the computation cost.

Another approach - We can create a cache like system to directly get the hash of some repetitive values. But it may consume some extra space of RAM.

@vkuznet
Copy link
Owner Author

vkuznet commented Apr 2, 2017 via email

@rishiloyola
Copy link
Collaborator

rishiloyola commented Apr 2, 2017

Also, it would be great if you can provide me the format of data. How are we storing the data? Is it JSON file?
If it is well formatted then we can also transfer data in chunks of the single file.

@vkuznet
Copy link
Owner Author

vkuznet commented Apr 2, 2017 via email

@rishiloyola
Copy link
Collaborator

What do you think about BitTorrent-like protocol? This protocol itself has a mechanism for automatically verifying each chunk's integrity after download.

@vkuznet
Copy link
Owner Author

vkuznet commented Apr 3, 2017 via email

@vkuznet
Copy link
Owner Author

vkuznet commented Apr 3, 2017 via email

@vkuznet vkuznet added this to the June development milestone May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants