DevelopersArchitectureVdfs
Architecture

Virtual Distributed Filesystem (VDFS)

Spacedrive is a virtual distributed filesystem, but what exactly is that?

A virtual filesystem is simply a layer of abstraction between a physical filesystem and the user. A distributed filesystem is a filesystem that is spread across multiple machines. A virtual distributed filesystem is a filesystem that is spread across multiple machines, but appears to the user as a single filesystem.

How it works

Spacedrive defines a VDFS under the following data model; A Library, Nodes, Volumes, Locations, Paths and Objects.

  • A node is a single machine running the VDFS software.
  • It syncronizes a CRDT based database, called the Library, with other nodes in the network.
  • The library consists of Locations, found on Volumes,
  • These contain Paths to files on the underlying filesystem.

Objects are unique representations of files sorted by a sampled hash called a "cas_id" which stands for "Content Addressable Storage Identifier". Additional metadata like tags and comments are tied to the Objects. Folders are not assigned to objects by default, but if a tag is assigned then an Object is created to accomedate.