![]() It can then rebuild the offsets incrementally. In terms of the CLI tool, this probably means that gosync should build a version of the source file where each block is independently compressed and store the block-sizes in the index. This requires changing any assumptions about the offset of a block, and the length of a block to read (especially when merging block ranges), then adding a compression / decompression call to the interfaces. In order to be more efficient in the transfer of data from the source to the client, gosync should support compressed blocks. GZip support - Performance / Efficiency Enhancement (!) If the library or tool are still something that you feel would be useful, here are some issues and ideas for work that could be done. I do not expect to put a huge amount more work into this, since we solved our problem in a simpler (and significant more elegant) way explained in a section above. In terms of activity, I have been extremely busy with other things for the last few months, and will continue to be. As such, I would not recommend depending on the code in production unless you're willing to validate the results and debug issues like that. As an example, the HTTP client used is a default HTTP client, and is therefore lacking decent timeouts. The GoSync library is fairly well unit-tested, but not tested through exposure to real-world network conditions. HOWEVER this library has never been used in production against real-world network problems, and I cannot personally guarantee that it will work as intended. The GoSync command-line tool has acceptance tests, although not everything is covered. GoSync has been built from the ground up with unit tests. Reuse low level objects to build a new high level library, or implement a new lower-level object to add a new transfer protocol (for example). Source: blocksources.NewReadSeekerBlockSource(īlocksources.MakeNullFixedSizeResolver(uint64(blockSize)), Disable verification of hashes for downloaded data (not really a good idea!) You can also provide your own implementation of the FileSummary interface This information is meta-data on the file that should be loaded / provided InputFile := bytes.NewReader(localVersionAsBytes) EasyĪ new high-level interface designed to reduce the work of implementing block transfer in your application: fs := &BasicSummaryĪll functionality is based on interfaces, allowing customization of behavior: // Here, the input version is a local string Works on Windows and Linux, without cygwin or fuss. Using the concurrency and performance features of Golang, Go-sync is designed to take advantage of multiple processors and multiple HTTP connections to make the most of modern hardware and minimize the impact of the bandwidth latency product. Gosync is a library inspired by zsync and rsync. By doing this, we significantly decreased the required storage (new files were only required when they changed), allowed multiple versions to sit efficiently side by side and very simple file serving to be used efficiently (with a tiny library to resolve and fetch files). On a project I worked on, we switched instead to storing individual files that were part of a larger build (like an ISO) by filename and hashes, mainly maintaining an index of which files comprised the full build. There are some other issues too - ZSync doesn't (as far as I'm aware) solve any issues to do with storage of a files, which can get more and more onerous for large files that are not changing much from one version to another. Using HTTP 1.0 and fully completed GET requests would be better, if possible. When issues happen, they're very difficult to respond to correctly in software (if possible at all). ![]() The ZSync mechanism has the weakness that HTTP1.1 ranged requests are not always well supported by CDN providers and ISP proxies. In order to split issues between the library and the CLI tool, as well as correctly vendor dependencies, the command-line tool code has been moved to its own repository: Why not use a Zsync mechanism?Ĭonsider if a binary differential sync mechanism is appropriate to your use case:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |