Introducing FSter

18
FSter Guglielmo’s Hyper File System Lorenzo Bellini, Roberto Guido, Marco Loregian, Michele Tameni <name.surname>@itsme.it

description

FSter is the first component we (itsme) are releasing to the development community, as an essential part of Guglielmo that might be reused by other projects and applications with similar needs: you can get it from here.FSter is a virtual file system implementation based on Fuse technology and exploiting Tracker metadata technology to allow access to files according to the metadata they’re associated to. Practically, FSter enables scenarios such as the following ones: * browsing the content of a drive (or simply of a folder) according to a user-defined hierarchy or progression of filters based on metadata; * associating metadata to files whenever operations are performed on them. For example, copying or saving a file in a specific place means storing it along with a description (metadata); * generating “virtual” files from metadata, e.g., a vCard file that is not really on the file system, but dynamically built from metadata.In order for you to be able to install, use, and extend FSter, or to contribute in any other way, we have set up some tools online: * a wiki where you can find detailed information on the project, descriptions and instructions: http://gitorious.org/itsme/pages/Fster * a bug reporting system (i.e., Bugzilla) where you can file any problem you find in our software: http://bugs.itsme.it * a mailing lists system where you can subscribe to discussions and interact with us and other developers: http://lists.itsme.it * an IRC channel where you will find (most of) the itsme technical staff all day long (well, Italian time mainly – i.e., GMT +1): #itsme-dev on irc.freenode.net

Transcript of Introducing FSter

Page 1: Introducing FSter

FSterGuglielmo’s Hyper File System

Lorenzo Bellini, Roberto Guido,Marco Loregian, Michele Tameni

<name.surname>@itsme.it

Page 2: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 2

What is FSter?

➔FSter is a virtual file system implementation, based on Fuse technology and exploiting Tracker metadata technology to allow access to files according to the metadata they’re associated to

Page 3: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 3

Sample scenarios

➔Browsing the content of a drive, according to a user-defined hierarchy based on metadata;

➔Associating metadata to files whenever operations are performed on them;

➔Generating “virtual” files from metadata, e.g., a vCard file dynamically built from metadata

Page 4: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 4

Requirements anddomain architecture

FSter uses libtracker-client to build and execute sparql query on tracker-store

Queries are built according to a user-defined (XML) filesystem hierarchy

Page 5: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 5

Configuration file

➔A configuration file defines what the user will see in FSter directories

➔Configuration files must follow XML 1.0 standards➔An XML schema of the configuration file is avalaible (Fster.xsd)

Page 6: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 6

Xml element: folder

➔Shows each RDF subject matching with defined conditions as a folder and:

➔defines both inheritable and self conditions➔Allows generating a folder name from metadata➔allows nesting content object inside it➔defines editing policies for the content

Page 7: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 7

Xml element: set_folder

➔Shows each RDF object used with a specific RDF predicate as a folder and:

➔defines a RDF predicate to get the set of RDF objects used with it➔defines inheritable conditions➔allows nesting content objects inside it➔defines the editing policies of the content

Page 8: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 8

Xml element: file

➔Shows each RDF subject matching with defined conditions as a file and:

➔defines self conditions➔Allows generating a file name from metadata➔defines whether to expose the real file or a dump of file metadata from the repository

Page 9: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 9

Examples: Fster media library (1)➔Media grouped by images, audio and video

Page 10: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 10

Examples: Fster media library (2)➔Building the SPARQL query for folder element

static GList* collect_children_from_storage (HierarchyNode *node, ItemHandler *parent){

(..)

more_statements = condition_policy_to_sparql (&(node->priv->self_policy), parent, &values_offset);statements = g_list_concat (statements, more_statements);if (node->priv->child_policy.inherit == TRUE) { parent_node = node->priv->node; while (parent_node != NULL) { more_statements = condition_policy_to_sparql (&(parent_node->priv->child_policy), parent, &values_offset); statements = g_list_concat (statements, more_statements); if (parent_node->priv->child_policy.inherit == TRUE) parent_node = parent_node->priv->node; else break; } } sparql = build_sparql_query (NULL, var, statements);

(..)

}

Page 11: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 11

Examples: Fster media library (3)➔ <condition metadata="rdf:type" value="nfo:Audio" />

<name value="$self{nie:title}" />

SELECT ?item ?a WHERE { ?item nie:title ?a . ?item rdf:type nfo:Audio }

➔ <condition metadata="rdf:type" value="nfo:Image" /><name value="$self{nfo:fileName}" />

SELECT ?item ?a WHERE { ?item nfo:fileName ?a . ?item rdf:type nfo:Image }

➔ <condition metadata="rdf:type" value="nfo:Video" /><name value="$self{nfo:fileName}" />

SELECT ?item ?a WHERE { ?item nfo:fileName ?a . ?item rdf:type nfo:Video }

Page 12: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 12

Examples: Fster music library (1)➔Music grouped by artist, album or genre

Page 13: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 13

Examples: Fster music library (2)➔Building the SPARQL query for folder_set element

static GList* collect_children_set (HierarchyNode *node, ItemHandler *parent){

(..)

statements = g_list_append (statements, g_strdup_printf ("?item %s ?a", node->priv->additional_option));more_statements = condition_policy_to_sparql (&(node->priv->self_policy), parent, &values_offset);statements = g_list_concat (statements, more_statements);if (node->priv->child_policy.inherit == TRUE) { parent_node = node->priv->node; while (parent_node != NULL) { more_statements = condition_policy_to_sparql (&(parent_node->priv->child_policy), parent, &values_offset); statements = g_list_concat (statements, more_statements); if (parent_node->priv->child_policy.inherit == TRUE) parent_node = parent_node->priv->node; else break; }}sparql = build_sparql_query ("SELECT DISTINCT(?a)", 'a', statements);

(..)

}

Page 14: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 14

Examples: Fster music library (3)➔ <folder>

<condition metadata="rdf:type" value=" nmm:MusicAlbum" />

SELECT ?item ?a WHERE { ?item nmm:albumTitle ?a . ?item rdf:type nmm:MusicAlbum }

➔ <condition metadata="nmm:musicAlbum" value="$parent{/subject}" />

SELECT ?item ?a WHERE { ?item nie:title ?a . ?item nmm:musicAlbum "urn:album:Ci%20Vuole%20Orecchio" }

➔ <set_folder metadata="nfo:genre">

SELECT DISTINCT(?a) WHERE { ?item nfo:genre ?a }

➔ <condition metadata="nfo:genre" value="$parent{nfo:genre}" />

SELECT ?item ?a WHERE { ?item nie:title ?a . ?item nfo:genre "Folk" }

Page 15: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 15

Examples: Fster music library (4)

Page 16: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 16

Future development

➔SparQL in the <condition> tag

➔Plugin architecture allowing FSter to render metadata exposing them in standard format files (e.g., vcard, ...);

➔User-friendly configuration editing interface

➔Creation of folders

Page 17: Introducing FSter

Itsme – Fster: Guglielmo's Hyper File System 17

References

➔Code: http://gitorious.org/itsme/fster

➔Wiki: http://gitorious.org/itsme/pages/Fster

➔Mailing lists: http://lists.itsme.it/

➔Support: #itsme-dev on irc.freenode.net

Page 18: Introducing FSter

Thank you for your attention

www.itsme.it

Lorenzo Bellini, Roberto Guido,Marco Loregian, Michele Tameni<name.surname>@itsme.it