Re: where to put tar storage object...



> So, assuming that this is a simple thing which lets you load a
> tar file using the PersistStream interface and then access the
> elements using a Storage interface, there's a few different
> ideas:

The code should go into bonobo/components/tar-handler

The reason for this is many fold:

	1. It is not a storage module, it is not something that every
           application will have.  Ie, we do not want applications to
           dynamically load the tar handler, decompress information
           and then "open" the file.  That is already done by other
           mechanisms like the gnome-vfs.

	2. The tar-handler is basically the "engine" that will drive
           the resolution of the "untar:" moniker.  This means that if
           you have a stringified version of a moniker, say in a file
           manager, and you drag and drop it into gnumeric, the same
           code that resolved the original file will be used to
           resolve the contents in gnumeric, allowing you to fully
           shared any resources between the two of them.

The whole point of using monikers is to create an object name space.
Monikers handlers are the elements that glue the components together,
to make most out of the tar moniker, we need the tar handler to do
the file sharing I discussed with you on irc.

Consider the cases where sharing the uncompressed information makes
sense:

	* You are untaring a large package, that would take various
          minutes to untar.  No point in keeping multiple copies of
          the untared information, specially if the moniker
          infrastructure allows for us to do the right thing.

	* You do not have enough space to keep multiple copies of the
          same file.  Again, the point of monikers is to provide an
          object name space.  Consider the moniker
          `downloads.gnumeric!March!Total', you would not want
          multiple copies of Gnumeric launched every time you want to
          access the data: monikers are the mechanism by which the
          `Total' value cane be made to be the same across all
          invocations.  
   
If the tar handler will not do caching, and will not do file reuse,
then it makes little sense to have it in bonobo.

The storage-modules directory is used to hold implementations for the
stock implementations of Bonobo storages (and this is mostly done
because I am a fearful person, and I am not fully ready to do the
jump to an EFS-only based world, while I know I should, there are
arguments on both sides of the fence that make me vacilate).
storage-modules is just a directory that is there to ease my own
insecurity.   Imagine it does not exist.  Imagine it is not there. 

The components in bonobo/components were initially sample components,
but I believe that the "handlers" (ie, the "core", the "engine" for
the monikers you guys have been implementing recently) should be part
of that. 

best wishes,
Miguel.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]