Starsync is a technology to fetch and update Starkits over the net. It sends only the files which have changed (compressed) which are then replaced within the Starkit's VFS.
There is an implementation of Starsync embedded in the SDX “update” command that allows you to inspect, obtain and update Starkits from SDarchive.
For example, the “Fractal Mountains” Tk demonstration Starkit by Keith Vetter [39]
$ sdx update -n fractal.kit FRACTAL: looking up on http://mini.net/sync.cgi ... 3 differences: 69 main.tcl 35188 lib/app-fractal/fractal.tcl 76 lib/app-fractal/pkgIndex.tcl
The “-n” flag tells SDX to show the differences with the current installed version, but not to make any changes. In this case, we don't have a current version so all files in the Starkit are different.
Here we can see that one file was changed. Another update will show no subsequent changes:
$ sdx update fractal.kit FRACTAL: updating from http://mini.net/sync.cgi ... No change.
The implementation (both client and server) takes advantage of several aspects of the Metakit database:
changes are transacted, aborted updates can always be restarted without damaging the underlying Starkit VFS
there is a simple and efficient client-side implementation and protocol
on-the-fly restructuring to make a table-of-contents
only changed files are fetched, in zlib-compressed form
the server also stores Starkits, so there is no packing/unpacking whatsoever
The first Starsync server implementation is a simple CGI script (all of the server logic is in the SDX command). All client-server interactions are stateless and use a normal HTTP "POST" request, with a very compact Metakit-based "table of contents" exchange (typically less than 0.1% of the Starkit size).
The protocol is based on a single request/reply transaction, and is therefore stateless. The first implementation consists of a package called - what else? - "starsync" (it's part of SDX), which contains the logic for both clients and servers in less than 300 lines of Tcl.