How to upload using Share

This is an unofficial translation of this page: http://www.tokix.net/txt/000176.html.

The screenshots were taken from the original page directly, converted to PNGs to save a few bytes. Graphs were drawn with dot. Thanks to Marti M. for pointer to the original page.


Share has jargons including "Link Cache", "Local Cache" and "Complete Cache". These appears to be the reasons for difficulties in understand file distribution. However, in order for downloaders to prevent seeing missing blocks, commonly known as "cavities", uploaders need to understand how distribution is implemented and perform the initial upload accordingly.


To start off, each type of cache file and how they relate to distribution are described here.

Initial uploaders break up files to small cache blocks, and forcibly upload them to nearby nodes. This is a special feature of Share known as DiffuseUp. Through DiffuseUp, neighboring nodes come to obtain Local Cache files, and these files are transferred to downloaders through ShareUp. Once a downloader has collected all pieces of Local Cache, it is made into a Complete Cache, and relayed to others through ShareUp.


DiffuseUp happens only once for each file. Either new files are placed in the upload folder before starting Share, or they are placed there after Share has started and get scanned after clicking Quick Check. The files will have their hash values computed and a corresponding Link Cache is created.

After Link Cache is created, DiffuseUp is done as seen in the upload tab. Because the scans that happen when files were added to upload folder are only done to compute cache values, and cache files are generated in real time as they are uploaded, DiffuseUp is a much more computationally intensive operation than other transfer schemes. This is why a Turbo mode is needed.

There are people confused about the cache files being generated as files are scanned, but it's obvious to see using some cache viewer tool to see that the Link Cache files are extremely small.

Regarding the cache viewer tool, because it is not directly related to this page, please look for it on your own.

Since DiffuseUp only happens once, you will need to use the query tab to run it again. Search for part of the file name, then use the Link Cache's right click menu item "Add to upload" to perform DiffuseUp again. However, by Share's design, DiffuseUp will not be done if neighboring node already have the Complete Cache.

Moreover, by using the right click menu and selecting "Convert", you can convert Link Cache to Complete Cache. Uploaders who holds Complete Cache will send them to others through ShareUp just like all others who completed downloading. Thus uploaders should perform DiffuseUp repeatedly until all neighboring nodes holds Complete Cache (there are plugins that automate this process), and once the neighboring nodes have the Complete Cache (the file names would appear to be orange in the query tab), this would be the time to convert it to Complete Cache. However, when Share is restarted (or after Quick Check), if the file is still in the upload folder, the Complete Cache will be erased and be replaced by Link Cache, so files need to be moved from upload folder to some other folder after they are converted.


So then, summary of the suggested procedure for uploaders is as follows. Gray rectangles are user operations and white rectangles are done by the software. Black arrows are the recommend paths (when multiple paths are available, any one of them is about the same).

Footnotes.


Without doing manual or plugin driven DiffuseUp and Complete Cache conversion upload process, the default upload method used by Share is indicated by the red arrow above. Without understanding the proper upload procedure and increasing upload efficiency, it will be difficult to prevent incomplete cache files.

There should be no problem with this method, but there are some related notes that were not included.


DiffuseUp can be done using right click menu on Complete Cache files. Therefore:

  1. Create Link Cache.
  2. Convert to Complete Cache.
  3. DiffuseUp using Complete Cache.

It is possible to do it this way too. There are some pros:

Cons:

It is up to the users to make their own judgment, but the author recommends the methods described here.

up