greghendershott / aws

Racket support for Amazon Web Services.
BSD 2-Clause "Simplified" License
78 stars 25 forks source link

Support uploading port contents to glacier. #29

Closed m4burns closed 10 years ago

m4burns commented 10 years ago

Modified data flow for tree hashes slightly. The formatting of a tree hash as a hex string is now delayed to the last possible moment. This allows for computation of tree hashes for trees of height > 1 (as will come up in archives with parts of length >1MB).

part-size is an optional argument of create-archive-from-port.

create-archive-from-file was modified to use the smallest part-size required for the upload operation to succeed (this increases the file size limit from roughly 9 GiB to 39 TiB).

m4burns commented 10 years ago

Contains some small fixes to make values agree with contracts and provide missing functions as well.

greghendershott commented 10 years ago

Thank you for the pull request! I really appreciate it because I haven't had a non-trivial real-world use-case for Glacier. And also it's a wee bit difficult to do unit tests involving retrieval. So I'm glad you were able to use it for something, and notice ways to improve it.

At a quick glance the changes look great. Let me just grab a little more time later today to review it, and see if I have any questions, before merging to master.

Thanks again!

m4burns commented 10 years ago

I'm using this as part of a backup script on a machine used by a small group. Storing backups in Glacier is very cheap when there's low probability of having to retrieve.

I just finished testing these modifications by uploading 440MB of /dev/urandom in 128MB parts to Glacier. I then took inventory, downloaded, and deleted the archive. It came back identical.

Thank you for writing this library to begin with! I wasn't really expecting an AWS API to exist for Racket; I was pleasantly surprised.

greghendershott commented 10 years ago

Merged. Thanks again!