TerraSync: Difference between revisions

Jump to navigation Jump to search
1,800 bytes added ,  4 May 2016
Line 185: Line 185:
[http://forum.flightgear.org/viewtopic.php?f=17&t=28957&p=278275#p278275 Forum Post w/ PowerShell command is here]
[http://forum.flightgear.org/viewtopic.php?f=17&t=28957&p=278275#p278275 Forum Post w/ PowerShell command is here]


== Internals ==
The SHA1 hashes are what’s in the .dirindex files, both on the server and in the local tree. We do not synchronise time-stamps with the server copies because it complicates (makes much less efficient) mirroring on the server side. I am fairly confident hash clashes are not an issue, if the Git folks don’t think they are. We explicitly do not rely on any custom or particular HTTP headers, to maximise the chance of ‘just working’ with different HTTP providers and CDN options in the future. The structure of the .dirindex files is text based and hopefully trivial to anyone who cares to look at them; they are generated on the server side by some scripts Torsten wrote. The code uses basically identical logic to Git to avoid recalculating SHA hashes for the entire repository; if any of various stat() fields, most especially sie or mod-time, change, we re-compute the hash for that file on disk. Whenever a file’s hash on disk differs from the what the .dirindex file says it should have, we download the file. That’s pretty much a complete description of the synchronisation model. Hence, it’s safe to copy files into the tree using any tool, or modify then - this will cause the stat() data to change, which will cause the code to recompute the SHA hash, which will trigger a re-download to the server-side copy if the SHA does not match. Note there is no provision to have modified (dirty) files inside the tree; they will always be over-written when next checked. <ref>{{cite web
  |url    = https://sourceforge.net/p/flightgear/mailman/message/35064470/
  |title  = <nowiki>Re: [Flightgear-devel] The future of terrasync</nowiki>
  |author = <nowiki>James Turner</nowiki>
  |date  = May 4th, 2016
  |added  = May 4th, 2016
  |script_version = 0.32
  }}
</ref>
== Related content ==
== Related content ==
* [[Howto: Install scenery]]
* [[Howto: Install scenery]]

Navigation menu