Giter VIP home page Giter VIP logo

shmr's Introduction

Goals

Non-goals

Efficient Handling of Small Files

Because shmr is a file based redundancy system

Subsystems

Block Cache

The Block Cache lazy-loads StorageBlocks that make up VirtualFiles when the block is read.

Blocks remain in cache until one of the following happens:

  • All FileHandles are closed
  • Block is evicted

Block Evictions take place when the Cache is reaching it's configured memory limit.

File Handles

File Handles are used to manage the lifecycle of the block cache for a specific VirtualFile.

VirtualBlocks cannot be modified after creation. You need to create

shmr's People

Contributors

volfco avatar

Stargazers

 avatar

Watchers

 avatar

shmr's Issues

RPC/API Interface

There will need to be some sort of API/RPC Interface to allow users to:

  • Metadata operations, such as view the full topology of a file
  • Migration Operations, such as moving a file's storageblocks from one pool to another

Additionally, this will require some way to manage background operations so that operations can be stopped & restarted if the main program exits

Determine Final Metadata Structure

Right now metadata is bincoded and stored in two sled databases- inode_db and descriptor_db. These hold the FUSE Inodes and then the Inode Contents.

I'm not sure if this is the best approach. It works and is perfectly acceptable, I just wonder if it would make more sense to store this information in json/yaml/toml files on disk.

This would make disaster recovery easier (as the metadata is easily accessable) and remove a blackbox from the stack (not to say Sled is bad).

Performance Impacts

Because metadata is currently flushed asynchronously, swapping the storage medium doesn't impact I/O performance directly.

There will be some more overhead for serialization, but because that is done in the background; it shouldn't matter much.

Complexity Impacts

I think the complexity is a wash, as this will trade Sled for a module that presents a Key/Value interface that is backed by files in a directory.

There might be some complexity around safely generating inode numbers, but that can just be an incrementing AtomicUsize that is populated on engine start.

This would only swap the underlying datastore that FsDB2 uses as backing, which doesn't change the semantics much.

Possible Issues

The two main issues I see are:

  1. This could enable users to modify the state of files in a way that could cause undefined behavior which might result in Dataloss.
  2. We need to make sure the module that provides the Database like interface can handle if the file changes underneath it.

#1 doesn't seem like a big issue. 2 could be solved by aggressive permission management and file locking.

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.