FSter
Guglielmo’s Hyper File System

  Lorenzo Bellini, Roberto Guido,
  Marco Loregian, Michele Tameni
   <name.surname>@itsme.it
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




  Itsme – Fster: Guglielmo's Hyper File System          2
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


  Itsme – Fster: Guglielmo's Hyper File System             3
Requirements and
                          domain 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


Itsme – Fster: Guglielmo's Hyper File System                                           4
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)




  Itsme – Fster: Guglielmo's Hyper File System                          5
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




Itsme – Fster: Guglielmo's Hyper File System            6
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




  Itsme – Fster: Guglielmo's Hyper File System                            7
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




  Itsme – Fster: Guglielmo's Hyper File System                   8
Examples: Fster media library (1)
➔Media grouped by images, audio and video




  Itsme – Fster: Guglielmo's Hyper File System   9
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);

(..)

}


       Itsme – Fster: Guglielmo's Hyper File System                                      10
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 }




   Itsme – Fster: Guglielmo's Hyper File System                    11
Examples: Fster music library (1)
➔Music grouped by artist, album or genre




  Itsme – Fster: Guglielmo's Hyper File System   12
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);

(..)

}

       Itsme – Fster: Guglielmo's Hyper File System                                   13
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" }



   Itsme – Fster: Guglielmo's Hyper File System                       14
Examples: Fster music library (4)




Itsme – Fster: Guglielmo's Hyper File System   15
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
Itsme – Fster: Guglielmo's Hyper File System    16
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


  Itsme – Fster: Guglielmo's Hyper File System            17
Thank you for your attention
www.itsme.it
Lorenzo Bellini, Roberto Guido,
Marco Loregian, Michele Tameni
<name.surname>@itsme.it

Introducing FSter

  • 1.
    FSter Guglielmo’s Hyper FileSystem Lorenzo Bellini, Roberto Guido, Marco Loregian, Michele Tameni <name.surname>@itsme.it
  • 2.
    What is FSter? ➔FSteris 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 Itsme – Fster: Guglielmo's Hyper File System 2
  • 3.
    Sample scenarios ➔Browsing thecontent 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 Itsme – Fster: Guglielmo's Hyper File System 3
  • 4.
    Requirements and domain 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 Itsme – Fster: Guglielmo's Hyper File System 4
  • 5.
    Configuration file ➔A configurationfile 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) Itsme – Fster: Guglielmo's Hyper File System 5
  • 6.
    Xml element: folder ➔Showseach 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 Itsme – Fster: Guglielmo's Hyper File System 6
  • 7.
    Xml element: set_folder ➔Showseach 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 Itsme – Fster: Guglielmo's Hyper File System 7
  • 8.
    Xml element: file ➔Showseach 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 Itsme – Fster: Guglielmo's Hyper File System 8
  • 9.
    Examples: Fster medialibrary (1) ➔Media grouped by images, audio and video Itsme – Fster: Guglielmo's Hyper File System 9
  • 10.
    Examples: Fster medialibrary (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); (..) } Itsme – Fster: Guglielmo's Hyper File System 10
  • 11.
    Examples: Fster medialibrary (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 } Itsme – Fster: Guglielmo's Hyper File System 11
  • 12.
    Examples: Fster musiclibrary (1) ➔Music grouped by artist, album or genre Itsme – Fster: Guglielmo's Hyper File System 12
  • 13.
    Examples: Fster musiclibrary (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); (..) } Itsme – Fster: Guglielmo's Hyper File System 13
  • 14.
    Examples: Fster musiclibrary (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" } Itsme – Fster: Guglielmo's Hyper File System 14
  • 15.
    Examples: Fster musiclibrary (4) Itsme – Fster: Guglielmo's Hyper File System 15
  • 16.
    Future development ➔SparQL inthe <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 Itsme – Fster: Guglielmo's Hyper File System 16
  • 17.
    References ➔Code: http://gitorious.org/itsme/fster ➔Wiki: http://gitorious.org/itsme/pages/Fster ➔Mailinglists: http://lists.itsme.it/ ➔Support: #itsme-dev on irc.freenode.net Itsme – Fster: Guglielmo's Hyper File System 17
  • 18.
    Thank you foryour attention www.itsme.it Lorenzo Bellini, Roberto Guido, Marco Loregian, Michele Tameni <name.surname>@itsme.it