Design and differences with hierarchical file systems
In computing, aThe tags/ directory
A Tagsistant file system features four main directories: :archive/ :relations/ :stats/ :tags/ Tags are created as sub directories of thetags/
directory and can be used in queries complying to this syntax:
:tags/subquery/ /subquery/[+/subquery//@/
where a subquery is an unlimited list of tags, concatenated as directories:
:tag1/tag2/tag3/.../tagN/
The portion of a path delimited by tags/
and @/
is the actual query. The +/
operator joins the results of different sub-queries in one single list. The @/
operator ends the query.
To be returned as a result of the following query:
:tags/t1/t2/+/t1/t4/@/
an object must be tagged as both t1/
and t2/
or as both t1/
and t4/
. Any object tagged as t2/
or t4/
, but not as t1/
will not be retrieved.
The query syntax deliberately violates the POSIX file system semantics by allowing a path token to be a descendant of itself, like in tags/t1/t2/+/t1/t4/@
where t1/
appears twice. As a consequence a recursive scan of a Tagsistant file system will exit with an error or endlessly loop, as done by UNIX find
:
tags/t1/t2/@/
is completely equivalent to tags/t2/t1/@/
and tags/t1/+/t2/t3/@/
is equivalent to tags/t2/t3/+/t1/@/
.
The @/
element has the precise purpose of restoring the POSIX semantics: the path tags/t1/@/directory/
refers to a traditional directory and a recursive scan of this path will properly perform.
The reasoner and the relations/ directory
Tagsistant features a simple reasoner which expands the results of a query by including objects tagged with related tags. A relation between two tags can be established inside therelations/
directory following a three level pattern:
:relations/tag1/rel/tag2/
The rel
element can be ''includes'' or ''is_equivalent''. To include the ''rock'' tag in the ''music'' tag, the UNIX command mkdir
can be used:
:mkdir -p relations/music/includes/rock
The reasoner can recursively resolve relations, allowing the creation of complex structures:
:mkdir -p relations/music/includes/rock
:mkdir -p relations/rock/includes/hard_rock
:mkdir -p relations/rock/includes/grunge
:mkdir -p relations/rock/includes/heavy_metal
:mkdir -p relations/heavy_metal/includes/speed_metal
The web of relations created inside the relations/
directory constitutes a basic form of ontology.
Autotagging plugins
Tagsistant features an ''autotagging'' plugin stack which gets called when a file or a symlink is written. Each plugin is called if its declared
and
elements and with ''document'', ''webpage'' and ''html'' too
* image/jpeg: tags the file with each Exif tag
The repository
Each Tagsistant file system has a corresponding repository containing anarchive/
directory where the objects are actually saved and a tags.sql
file holding tagging information as an SQLite database. If the MySQL database engine was specified with the --db
argument, the tags.sql
file will be empty. Another file named repository.ini
is a The archive/ and stats/ directories
Thearchive/
directory has been introduced to provide a quick way to access objects without using tags. Objects are listed with their inode number prefixed.
The stats/
directory features some read-only files containing usage statistics. A file configuration
holds both compile time information and current repository configuration.
Main criticisms
It has been highlighted that relying on an external database to store tags and tagging information could cause the complete loss of metadata if the database gets corrupted. It has been highlighted that using a flat namespace tends to overcrowd thetags/
directory. This could be mitigated introducing triple tags.
See also
*References
External links
* {{Official website, http://www.tagsistant.net/