Tagsistant
Tagsistant is a semantic file system for the Linux kernel, written in C and based on FUSE. Unlike traditional file systems that use hierarchies of directories to locate objects, Tagsistant introduces the concept of tags.
Design and differences with hierarchical file systems
In computing, a file system is a type of data store which could be used to store, retrieve and update files. Each file can be uniquely located by its path. The user must know the path in advance to access a file and the path does not necessarily include any information about the content of the file.Tagsistant uses a complementary approach based on tags. The user can create a set of tags and apply those tags to files, directories and other objects. The user can then search all the objects that match a subset of tags, called a query. This kind of approach is well suited for managing user contents like pictures, audio recordings, movies and text documents but is incompatible with system files where the univocity of the path is a security requirement to prevent the access to a wrong content.
The tags/ directory
A Tagsistant file system features four main directories:Tags are created as sub directories of the
tags/
directory and can be used in queries complying to this syntax:where a subquery is an arbitrarily long list of tags, concatenated as directories:
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:
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
:~/tagsistant_mountpoint$ find tags/
tags/
tags/document
tags/document/+
tags/document/+/document
tags/document/+/document/+
tags/document/+/document/+/document
tags/document/+/document/+/document/+
This drawback is balanced by the possibility to list the tags inside a query in any order. The query
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: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:The reasoner can recursively resolve relations, allowing the creation of complex structures:
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 MIME type matchesThe list of working plugins released with Tagsistant 0.6 is limited to:
- text/html: tags the file with each word in
</code> and <code><keywords></code> elements and with <i>document</i>, <i>webpage</i> and <i>html</i> too</li><li> image/jpeg: tags the file with each <a href="/wiki/Exchangeable_image_file_format">Exif</a> tag<h2>The repository</h2></li></ul>Each Tagsistant file system has a corresponding repository containing an <code>archive/</code> directory where the objects are actually saved and a <code>tags.sql</code> file holding tagging information as an <a href="/wiki/SQLite">SQLite</a> database. If the <a href="/wiki/MySQL">MySQL</a> <a href="/wiki/Database_engine">database engine</a> was specified with the <code>--db</code> argument, the <code>tags.sql</code> file will be empty. Another file named <code>repository.ini</code> is a <a href="/wiki/GLib">GLib</a> ini store with the repository configuration.<br>Tagsistant 0.6 is compatible with the MySQL and Sqlite dialects of SQL for tag <a href="/wiki/Reasoning">reasoning</a> and tagging resolution. While porting its logic to other SQL dialects is possible, differences in basic constructs must be considered.<h2>The archive/ and stats/ directories</h2>The <code>archive/</code> directory has been introduced to provide a quick way to access objects without using tags. Objects are listed with their <a href="/wiki/Inode_number">inode number</a> prefixed.<br>The <code>stats/</code> directory features some read-only files containing usage <a href="/wiki/Statistics">statistics</a>. A file <code>configuration</code> holds both <a href="/wiki/Compile_time">compile time</a> information and current repository configuration.<h2>Main criticisms</h2>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.<br>It has been highlighted that using <a href="/wiki/A_flat">a flat</a> namespace tends to overcrowd the <code>tags/</code> directory. This could be mitigated introducing <a href="/wiki/Tag_%28metadata%29">triple tags</a>.<br> </section> <aside> <h2><span>Popular articles</span></h2><ul class="poplist"><li><a href="/wiki/Javier_Milei">Javier Milei</a> - Argentine libertarian economist, author, radio conductor and public speaker sympathetic to the Austrian School of economic thought. He became widely known for his regular ...</li><li><a href="/wiki/Jimmy_Carter">Jimmy Carter</a> - American politician, philanthropist, and former farmer who served as the 39th president of the United States from 1977 to 1981. A member of the Democratic Party, he previ...</li><li><a href="/wiki/UEFA_Euro_2024">UEFA Euro 2024</a> - The 2024 UEFA European Football Championship , commonly referred to as UEFA Euro 2024 or simply Euro 2024 , will be the 17th edition of the UEFA European Championship, the quadrennial internationa...</li><li><a href="/wiki/Argentina">Argentina</a> - country located mostly in the southern half of South America. Sharing the bulk of the Southern Cone with Chile to the west, the country is also b...</li><li><a href="/wiki/Sam_Altman">Sam Altman</a> - American entrepreneur, investor, programmer, and blogger. He is the former president of Y Combinator and now the CEO of OpenAI. Early life and education. ...</li><li><a href="/wiki/Rosalynn_Carter">Rosalynn Carter</a> - American who served as First Lady of the United States from 1977 to 1981 as the wife of President Jimmy Carter. For decades, she has been a leading advocate for numerou...</li><li><a href="/wiki/Next_Argentine_presidential_election">Next Argentine presidential election</a> - Next Argentine presidential election - presidential election in Argentina....</li></ul><h2><span>Popular movies</span></h2><ul class="poplist"><li><a href="/wiki/The_Hunger_Games_(film)">The Hunger Games (film)</a> - 2012 American dystopian action thriller science fiction-adventure film directed by Gary Ross and based on Suzanne Collins’s 2008 novel of the same name. It is the first insta...</li><li><a href="/wiki/untitled_Captain_Marvel_sequel">untitled Captain Marvel sequel</a> - part of Marvel Cinematic Universe....</li><li><a href="/wiki/Killers_of_the_Flower_Moon_(film_project)">Killers of the Flower Moon (film project)</a> - Killers of the Flower Moon - film project in United States of America. It was presented as drama, detective fiction, thriller. The film project starred Leonardo Dicaprio, Robert De Niro. Director of...</li><li><a href="/wiki/Five_Nights_at_Freddy's_(film)">Five Nights at Freddy's (film)</a> - Five Nights at Freddy's - film published in 2017 in United States of America. Scenarist of the film - Scott Cawthon....</li><h2><span>Popular video games</span></h2><ul class="poplist"><li><a href="/wiki/Minecraft">Minecraft</a> - sandbox video game developed by Mojang Studios. Created by Markus "Notch" Persson in the Java programming language and released as a public alpha for personal computers in 2...</li><li><a href="/wiki/Grand_Theft_Auto_V">Grand Theft Auto V</a> - 2013 action-adventure game developed by Rockstar North and published by Rockstar Games. It is the first main entry in the Grand Theft Auto series since 2008's Grand Theft ...</li><li><a href="/wiki/Roblox">Roblox</a> - online game platform and game creation system that allows users to program games and play games created by other users. Founded by David Baszucki and Erik Cassel in 2004 and released in...</li><li><a href="/wiki/Baldur's_Gate_III">Baldur's Gate III</a> - upcoming role-playing video game developed and published by Larian Studios for Microsoft Windows and the Stadia streaming service. It is the third main game in the Baldur's ...</li><li><a href="/wiki/Alan_Wake">Alan Wake</a> - action-adventure video game developed by Remedy Entertainment and published by Microsoft Studios, released for the Xbox 360 and Microsoft Windows. The story follows best-selling thri...</li><li><a href="/wiki/Fortnite">Fortnite</a> - online video game developed by Epic Games and released in 2017. It is available in three distinct game mode versions that otherwise share the same general gameplay and game engine: ...</li><li><a href="/wiki/Super_Mario_RPG">Super Mario RPG</a> - is a role-playing video game developed by Square and published by Nintendo for the Super Nintendo Entertainment System in 1996. It was directed by Yoshihiko Maekawa and Chihiro Fujioka and produced by...</li></ul><h2><span>Popular books</span></h2><ul class="poplist"><li><a href="/wiki/Book_of_Revelation">Book of Revelation</a> - The Book of Revelation is the final book of the New Testament, and consequently is also the final book of the Christian Bible. Its title is derived from the first word of the Koine Greek text: apok...</li><li><a href="/wiki/Book_of_Genesis">Book of Genesis</a> - account of the creation of the world, the early history of humanity, Israel's ancestors and the origins...</li><li><a href="/wiki/Gospel_of_Matthew">Gospel of Matthew</a> - The Gospel According to Matthew is the first book of the New Testament and one of the three synoptic gospels. It tells how Israel's Messiah, rejected and executed in Israel, pronounces judgement on ...</li><li><a href="/wiki/Michelin_Guide">Michelin Guide</a> - Michelin Guides are a series of guide books published by the French tyre company Michelin for more than a century. The term normally refers to the annually published Michelin Red Guide , the oldest...</li><li><a href="/wiki/Psalms">Psalms</a> - The Book of Psalms , commonly referred to simply as Psalms , the Psalter or "the Psalms", is the first book of the Ketuvim , the third section of the Hebrew Bible, and thus a book of th...</li><li><a href="/wiki/Ecclesiastes">Ecclesiastes</a> - Ecclesiastes is one of 24 books of the Tanakh , where it is classified as one of the Ketuvim . Originally written c. 450–200 BCE, it is also among the canonical Wisdom literature of the Old Tes...</li><li><a href="/wiki/The_48_Laws_of_Power">The 48 Laws of Power</a> - non-fiction book by American author Robert Greene. The book...</li></ul><h2><span>Popular television series</span></h2><ul class="poplist"><li><a href="/wiki/The_Crown_(TV_series)">The Crown (TV series)</a> - historical drama web television series about the reign of Queen Elizabeth II, created and principally written by Peter Morgan, and produced by Left Bank Pictures and Sony Pictures Tel...</li><li><a href="/wiki/Friends">Friends</a> - American sitcom television series, created by David Crane and Marta Kauffman, which aired on NBC from September 22, 1994, to May 6, 2004, lasting ten seasons. With an ensemble cast sta...</li><li><a href="/wiki/Young_Sheldon">Young Sheldon</a> - spin-off prequel to The Big Bang Theory and begins with the character Sheldon...</li><li><a href="/wiki/Modern_Family">Modern Family</a> - American television mockumentary family sitcom created by Christopher Lloyd and Steven Levitan for the American Broadcasting Company. It ran for eleven seasons, from September 23...</li><li><a href="/wiki/Loki_(TV_series)">Loki (TV series)</a> - upcoming American web television miniseries created for Disney+ by Michael Waldron, based on the Marvel Comics character of the same name. It is set in the Marvel Cinematic Universe, shar...</li><li><a href="/wiki/Game_of_Thrones">Game of Thrones</a> - American fantasy drama television series created by David Benioff and D. B. Weiss for HBO. It...</li><li><a href="/wiki/Shameless_(American_TV_series)">Shameless (American TV series)</a> - American comedy-drama television series developed by John Wells which debuted on Showtime on January 9, 2011. It...</li></ul> </aside> </div> <footer class="wrapper clearfix"> <a href="https://owiki.org">OWIKI.org</a>. Text is available under the Creative Commons Attribution-ShareAlike License. </footer> <script src="/js//jquery-1.9.0.min.js"></script> <script src="/js/main.js"></script> </body> </html>