Skip to content

Synthetic File System User Documentation

finleymercyabraham edited this page May 26, 2021 · 2 revisions

In this user document, you will learn how to use the synthetic file system quickly and professionally to obtain the relevant information from the metadata extracted from different sources of files. In this chapter, you will learn how to install the synthetic file system.

Prerequisites

To work with the synthetic file system, the following programs are required:

  • git
  • docker
  • docker-compose
  • Metadata-Hub

To download and set up docker and docker-compose, you can visit the website: https://docs.docker.com/docker/ and follow the instructions there if you intend to launch synthetic file system in a docker container. If you prefer to install the synthetic file system directly on your computer, you can leave out both docker and docker-compose.

Installation

  1. Clone the repository amos-ss2021-synthetic-file-system"from github. You can do this by using this command line: git clone https://github.com/amosproj/amos-ss2021-synthetic-file-system.git
  2. Build the container for synthetic file system. You can do this by using the following command lines: cd amos-ss2021-synthetic-file-system docker-compose up --build
  3. Run the container for synthetic file system. You can do this by using this command line: docker-compose up Then you can connect to docker with this command line: docker exec -it synthetic-file-system tmux (Note that tmux can be replaced by a different shell such as zsh or bash.)
  4. The synthetic file system is mounted under the ∼/fuse_mount folder in the Home directory. Create this folder by using this command line: mkdir ~/fuse_mount

Usage

In this chapter you will learn the basic functionalities of the synthetic file system in order to work with it effectively.

Basics

The synthetic file system pulls metadata from a running Metadata-Hub service. You can run the synthetic file system by running this command line: ./mount.sh This mounts the virtual file system at ∼/fuse_mount. Note that the current terminal is blocked when you run the synthetic file system with docker. You can open a new terminal on the host and connect it back to docker by applying this command line: docker exec -it synthetic-file-system tmux You can also use tmux in docker to open a new terminal by typing: ctrl+b and ctrl+%. For more information, see the tmux documentation on this website: https://github.com/tmux/tmux/wiki

What shall be displayed in the synthetic file system?

When the synthetic file system is started, it looks into the con fig/config.cfg configuration file in the repository and reads the filters listed there. These filters will be applied when the metadata is retrieved from the Metadata-Hub. The filters are defined as a list of triplets, where the first element of each triplet specifies the name of the metadata that the filter ought to use, the second is the corresponding value and the third is the relation which specifies how values are compared. For example, to tell the synthetic file system to display only all ".jpg" files with an image height greater than 500, a triplet looks like this: [FILTER] filters = [ ["FileName", "*.jpeg", "EQUAL"] , ["ImageHeight", "500", "GREATER"], ]

To determine what is displayed in the synthetic file system, the filters can be configured either before the program is started or during program runtime. If the filters are reconfigured during the runtime, they are automatically updated. However, to enable this dynamic behavior, you must properly open, write, and close the configuration file. Note that pressing ctrl+s does not always work and that you should press :wq or :x, when using the VIM text-editor.

How to browse the synthetic file system?

You can traverse the synthetic file system via a terminal. You can also traverse the file system using any file browser, such as nautilus. The docker container of the synthetic file system is configured to support X-forwarding, therefore any UI program opened on docker is forwarded to the host. When you run the synthetic file system with docker, you can browse it by running this command line: nautilus As with displaying files in any file system, you can double click the file or open it with any program.