The Remote File System (RFS) is a distributed file system solution designed to efficiently store, distribute, and access file system data across various storage backends. It uses a compact metadata format called FungiList (FL) to represent file system structures while storing the actual data in configurable storage backends.
The rfs command is a comprehensive tool that provides all the functionality needed to work with flists. It integrates several capabilities:
- Core Functionality: Creating, mounting, and extracting flists
- Docker Conversion: Converting Docker images into flists
- Server Functionality: Running a server that provides a REST API for managing flists
- Client Functionality: Interacting with the server API
All these capabilities are accessible through various subcommands of the rfs command, providing a unified interface for all operations.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ User │ │ Frontend │ │ RFS Server │
│ Interface │────▶│ (Web UI) │────▶│ Functionality│
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐ ┌─────────────────────────────────────────┐
│ Storage │◀───▶│ RFS │
│ Backends │ │ (Core, Docker, Server, Client Features) │
└─────────────┘ └─────────────────────────────────────────┘
The rfs command is organized into several subcommands:
- Core Commands:
pack,mount,unpack,clone,config - Docker Commands:
docker - Server Commands:
server - Client Commands:
upload,upload-dir,download,download-dir,exists,flist create,website-publish
Each subcommand provides specific functionality while sharing common libraries and approaches.
-
Creation Flow:
- User selects a directory or Docker image to convert to an flist using the appropriate
rfssubcommand - RFS processes the files, creating metadata and storing content in the configured storage backends
- The resulting flist (.fl file) contains metadata and references to the stored content
- User selects a directory or Docker image to convert to an flist using the appropriate
-
Consumption Flow:
- User mounts an flist using the
rfs mountcommand - RFS reads the metadata from the flist
- When files are accessed, RFS retrieves the content from the storage backends on-demand
- Retrieved content is cached locally for improved performance
- User mounts an flist using the
-
Server Flow:
- User starts the server using the
rfs servercommand - The server provides a REST API for managing flists
- Users can interact with the server through the web interface or directly through the API
- The server uses the same core functionality as the command-line tool
- User starts the server using the
-
Unified Interface: All functionality is accessible through the
rfscommand, providing a consistent user experience. -
Separation of Metadata and Content: By separating file metadata from content, RFS enables efficient distribution of file system structures while minimizing data transfer.
-
Storage Backend Flexibility: Support for multiple storage backends (directory, ZDB, S3, HTTP) allows for flexible deployment scenarios.
-
On-Demand Access: Files are only retrieved when accessed, reducing bandwidth and storage requirements.
-
Caching: Local caching of accessed files improves performance for frequently used data.
-
Sharding and Replication: Content can be sharded across multiple storage backends and replicated for redundancy.
For more detailed information about specific aspects of the RFS architecture, refer to: