Giter Club home page Giter Club logo

taffy's Introduction

Taffy

Taffy is an experiment to explore tag-based file systems. It runs on top of an existing file system, and requires the use of hard links.

Usage

$ taffy --help

  Usage:
    taffy add [--tags <tag>...] <file>...
    taffy ls [--no-bloom] [<tag>...]
    taffy -h | --help
    taffy --version

  Options:
    -h --help   Show this screen.
    --version   Show version.
    --tags      Tags for new file(s).
    --no-bloom  Disable bloom filter optimization.

$ taffy add --tags "2016 summer" pics/2016/summer/*
$ taffy add --tags "2016 winter" pics/2016/winter/*
$ taffy ls
68bf7067-1cb7-4779-8a55-362418d8a167  2016 winter
8671850b-395c-48a3-950a-015412a81865  2016 summer
ede9525a-c902-4ed0-95db-4b833bf12279  2016 winter

$ taffy add --tags "2017 summer" pics/2017/summer/*
$ taffy ls summer
8671850b-395c-48a3-950a-015412a81865  2016 summer
ba241a47-e441-4493-89ee-5a2408fd94f7  2017 summer
ff38eb65-b515-4484-abbc-f6c2dd9e57ee  2017 summer

Bloom Filters

When using ls with multiple tags, all of the tags are ANDed together. This can be a very expensive operation if the first tag returns a lot of results.

To optimize this (and to seize the opportunity to explore an exciting topic), bloom filters are maintained per tag. Instead of querying the underlying file system thousands of times to see if the files resulting from the first query have the second tag, they are checked against the second tag's bloom filter. This will tell us if the file is "definitely not" tagged with the second tag, and allows us to quickly filter out a bunch of files.

Overall, this "optimization" slows down the system quite a bit. add operations have to maintain the filters, and ls operations have the option of disabling the optimization with --no-bloom. The bloom filters help eventually, when the first query returns >20k files, but until then, they only serve to slow things down.

taffy's People

Contributors

jamiesyme avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.