Larsblog

A Topic Maps file system

Previous
Next

The idea of a Topic Maps file system is not new. Robert Barta presented one such at TMRA 2008, and Inge Henriksen is also working on one. However, I had my own take on this that I wanted to realize for several years. The starting point was the Mac screensaver which shows all photos from a given directory as a kind of slide show. I've set it to the root folder I store my photos in, but then it shows all photos, which is not always that pleasant when you're on a projector in a meeting, for example.

But then I thought: I have all these photos in a topic map, and the topic map knows which photos are private and which are not. So a file system based on the topic map would let me control whether or not to hide private photos. And, I realized, it would let me do other things, like only showing photos from Norway, or only beer photos, or only photos of a specific person. So this sounded like a cool thing to do.

I quickly figured out that FUSE would let me do this, but then there was the issue of how to access it from some programming language with a good Topic Maps engine. After various tries with Ontopia, TM++, gcc setup, and so on, eventually I got a combination that worked: fuse.py and mappa. That took about two years. Then one Friday evening over three beers I wrote the file system.

The basic idea is dead simple: I mount the topic map on an empty directory somewhere on the disk, and then a structure from the topic map appears in that directory. The top level consists of one folder for each topic type in the topic map, and the names of the folders are the names of the topic types. This is what's shown in the screenshot below:

Then, inside each topic type folder is objects representing the topics of that type. These fall into two categories: topics which have a subject locator, and topics which don't. The former are represented as files containing whatever the subject locator refers to. The latter are represented as folders. The contents of the folders are all associated topics which have subject locators.

The screenshot below shows the contents of the "Location" folder:

If we pick one location, say "Albert Memorial", and open it, we get:

The file names are the name of the topic, plus the last part of the subject locator. The date modified is the date modified of the file referred to, and the same with the size. Opening a file gives the expected result. Switching the directory view to cover flow produces:

So there you have it. The file system is completely generic, in that it doesn't depend on any specific ontology. You can mount any topic map and get a sensible result. If you want to try, go here, and click "tmfs". Note that you'll need to install a few components to get it to work.

So far, the most fun application of it has been to set the Mac screensaver to show only photos of my 10 months old daughter, and then show it to her. She finds this incredibly exciting, and starts waving her arms about, shrieking, and wants to climb into the computer. So far I've found that it's best to only show it to her for a couple of minutes at a time to avoid getting her too excited.

If you're wondering where the privacy feature went the answer is that it's not implemented yet. I also want to do other things, like turn occurrences into files, add support for modifications, and so on, but so far there hasn't been time.







Comments

Are Gulbrandsen - 2009-06-03 17:43:58

Cool! :) Btw, you say that you use a combination of fuse.py and mappa. What is "mappa"?

Lars Marius - 2009-06-03 17:59:55

Sorry. Those words were meant to be links (and now they are). mappa is Lars Heuer's Python Topic Maps engine.

Lars - 2009-06-04 08:02:24

>>> 'mappa'.title() 'Mappa'

:)

Robert Barta - 2009-06-06 04:14:24

> like turn occurrences into files, add support for modifications, and so on

If you - at some point - have some of this, it would be cool to see _how_ various TM concepts have been mapped into files/directories. There are sooo many different ways to do this, that this cries out for a language.

/Me likes languages :-)

\rho

Inge Henriksen - 2009-06-06 16:57:46

Nice! Personally I am convinced this kind of stuff is the future for file systems.

Add a comment

Name required
Email optional, not published
URL optional, published
Comment
Spam don't check this if you want to be posted
Not spam do check this if you want to be posted

Last comments
RSS

John on Bayesian identity re...

john on Bayesian identity re...

Khaizarani Ibrahým bako on What is an informati...

Bruce on Equivalence classes

Stig on Bitcoin: promises an...

Jon Bjerkelien on The curse of NOARK

Lars Marius on Impressions from Str...

Aad Kamsteeg on Impressions from Str...

Lars Marius on The curse of NOARK

Dave Pawson on The curse of NOARK