collectfast icon indicating copy to clipboard operation
collectfast copied to clipboard

NFS optimized strategy

Open thenewguy opened this issue 5 years ago • 2 comments

I want to try this library out and noticed there isn't a strategy optimized for NFS type storage. Would you accept a PR that adds this strategy?

thenewguy avatar May 08 '20 14:05 thenewguy

The basic difference is the access speed. The filesystem storage recomputes the hash (https://github.com/antonagestam/collectfast/blob/master/collectfast/strategies/filesystem.py#L9) for remote files. It would be better to add an additional file that contains the hash on upload. Then the remote storage hash can just return the contents of the hash file

thenewguy avatar May 08 '20 14:05 thenewguy

@thenewguy I'd definitely consider adding a strategy for NFS and I'll happy review pull requests if your willing to work on it.

I'd be hesitant to a solution that adds an extra file though, and would much prefer it the strategy could instead populate the cache the way you suggest.

antonagestam avatar May 08 '20 14:05 antonagestam