very simple datastore reimplementation

Gary C Martin gary at garycmartin.com
Tue May 13 11:50:22 EDT 2008


On 13 May 2008, at 07:56, Martin Langhoff wrote:

> and that's it. It's a trivial thing, will work on any fs, on any OS,
> no magic tricks needed. We can do fast searches on based on the
> "documents metadata", and the only "slow" op is mounting a device
> where the documents metadata is stale or missing.
>
> IMO, jg is hinting towards something like this. If something like this
> is done in a way that it uses atomic ops most of the time (using an
> idiom of "write to tmpfile, close and then mv" instead of
> write-in-place) then we have something pretty much bulletproof,
> failsafe, and fast. Or at least as fast as the kernel-level FS
> implementation is.

Yes, this sounds a much more reasonable way forward for the DS, and we  
know it already **works_very_well**. It's the same approach Apple has  
taken with OS X. The GUI showing its metaphor for applications and  
documents objects, while the (relatively standard) POSIX file-system  
actually uses bundles (directories) as containers for all the various  
files that make up said application, or a multi-file document (say a  
text document with imbedded images, or a movie composition made of  
many clips). The cached index database (Spotlight) is stored at the  
root of each file-system in a hidden dot folder and can be rebuilt as  
needed from the actual file content; it can even be omitted for  
certain mountable volumes if desired.

You can happily use standard command line tools to grep, sed, awk,  
scp, vim, whatever – or use the high level GUI tools; and actually a  
fair few of those GUIs are just wrappers calling the standard command  
line tools.

--Gary





More information about the Devel mailing list