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

Checksum precalculation #13

Open
sparkoo opened this issue Jul 25, 2017 · 2 comments
Open

Checksum precalculation #13

sparkoo opened this issue Jul 25, 2017 · 2 comments

Comments

@sparkoo
Copy link
Owner

sparkoo commented Jul 25, 2017

Calculating box checksums on demand has too high performance cost for http request (~1.5GB box takes about 5s to calculate md5 checksum). So we need to calculate checksums on background, persist results and on request just read those checksums.

  • checksum calculation must not block any request -> must run on background
  • BackgroundChecksumCalculator calculates checksums with given configuration for all boxes and persist them with HashStore
  • BackgroundChecksumCalculator must keep checksums in latest state -> if new box is added when Boxitory already running, it must catch it and calculate checksum
  • once checksum is calculated and persisted, it can't be replaced
  • new configuration option box.checksum_precalculate
    • boolean value - true|false
    • tells whether checksums for boxes should be precalculated on background
    • default true
  • probably there will be some other (advanced) configuration option configuring background calculation
  • probably BackgroundChecksumCalculator interface with FilesystemBackgroundChecksumCalculator implementation
  • Don't forget to test and keep it as independent as possible. Again, there must be space for replace storing checksums to file by e.g. store in database.
@sparkoo
Copy link
Owner Author

sparkoo commented Oct 6, 2017

depends on #24

@sparkoo
Copy link
Owner Author

sparkoo commented Nov 2, 2017

postponed, as current behavior seems sufficient

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

1 participant