[sugar] Dependency Handling in the Journal

Ian Bicking ianb at colorstudy.com
Fri Apr 13 18:31:43 EDT 2007


Benjamin M. Schwartz wrote:
> I posted this on the wiki, but I thought I'd mention it here.  I think the
> journal should track inter-file dependencies.
> 
> Many files we create depend on other files.  The most common example is probably
> documents that contain pictures.  In some document formats, these pictures are
> copied into the document, and in others they are referenced by location.  To
> avoid wasting storage space, we would like to insert pictures by reference
> (like in .html or .dvi) rather than include them (like in a .pdf).

Another option here is copy-on-write, where effectively if you use a 
resource you make a copy of it.  So if you insert a picture into an HTML 
file, then the picture is "copied" into it.  It doesn't have to be 
physically copied (to save space) but can just be copied when it needs 
to be (e.g., if the original image is edited or deleted).

This seems simple to explain to users (because you don't have to explain 
it to users at all, things Just Work).  It requires a richer sense of a 
resource than just a file -- a web page, for instance, is not just an 
HTML file, but a whole set of files that include all the embedded resources.

-- 
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
             | Write code, do good | http://topp.openplans.org/careers


More information about the Sugar mailing list