Login | Register
My pages Projects Community openCollabNet

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

Re: [Catacomb] external storage of document data



Bryce Harrington wrote:

  /[doc_id]/[doc_rev]/[language]/[file_num],[base].[ext]

For example:

/var/dms
/var/dms/13
/var/dms/13/1
/var/dms/13/1/en
/var/dms/13/1/en/0000,tmp_filename.txt
/var/dms/14
/var/dms/14/1
/var/dms/14/1/en
/var/dms/14/1/en/0000,tmp_filename.txt

[file_num] is there for documents that are aggregates of multiple files
(such as a webpage and its img's, or a PDF plus attached spreadsheet).
I thought about this a bit more and realized something...This approach generates a ton of directory inodes that are not really necessary.

Instead, I'd suggest using the minimum amount of information to uniquely identify the data in the filesystem. Currently Catacomb only has two things that uniquely identify it: the document id and the version id. So one path idea would be (simply):

/[doc_id]/[doc_rev]

The other metadata (lang, file num, base, ext) are informative and should be stored in Catacomb (only?) Is there any other reason to reflect this metadata into the filesystem?

Anyways, again I'm working on a generalized fn so you could choose whichever format you prefer.