Skip to content

Latest commit

 

History

History
66 lines (39 loc) · 4.79 KB

README.md

File metadata and controls

66 lines (39 loc) · 4.79 KB

Scorpio - FUSE Support for Mega/Monorepo Client

What's the Fuse?

FUSE is the abbreviation for "FileSystem in Userspace".It's an interface for userspace programs to export a filesystem to the linux kernel. The FUSE project consists of two components: the fuse kernel module (maintained in the regular kernel repositories) and the libfuse userspace library (maintained in this repository). FUSE

When VFS receives a file access request from the user process and this file belongs to a certain fuse file system, it will forward the request to a kernel module named "fuse". Then, "fuse" converts the request into the protocol format agreed upon with the daemon and transmits it to the daemon process.

Currently, there have been many successful fuse based projects,

  • s3fs makes you operate files and directories in S3 bucket like a local file system Github stars
  • sshfs allows you to mount a remote filesystem using SFTP Github stars
  • google-drive-ocamlfuse lets you mount your Google Drive on Linux. Github stars

Why the Mega Need a FUSE?

Because the code organization requirements are different from the existing popular distributed version management software Git, clients targeting Monorepo need to implement various additional features to support code pull tasks for large repositories. These requirements include:

  1. Partial clone: reduces the time required to obtain a working repository by not immediately downloading all Git objects.

  2. Background prefetch: Download Git object data from all remote sources every hour, reducing the time required for front-end Git fetch calls.

  3. Sparse checkout: Restrict the size of the working directory.

  4. File system monitor: tracks recently modified files, eliminating the need for Git to scan the entire work tree.

  5. Submit graph: Accelerate submission traversal and reachability calculations, and speed up commands such as git log.

  6. Multi pack index: Implement fast object lookup in many package files.

  7. Incremental repackage: Using multiple package indexes, repackage packaged Git data into fewer package files without interrupting parallel commands.

Some Related

VFS for Git from Microsoft

VFS For Git is a preliminary attempt by Microsoft on the Monorepo client, which implemented the FUSE system based on Sqlite and Mutli pack index, achieving on-demand partial pull functionality. The client will perceive the user's "open directory" operation before pulling the code content under the corresponding directory.

Sapling from Meta

The structure of Sapling is achieved through a multi-layered architecture, with each checkout corresponding to a mount point, followed by an Overlay layer. At the same time, it provides third-party interfaces for other programs to use, so that some heavy IO and computational parts do not need to be consumed by the performance of the virtual layer.

How to Use?

How to Contribute?

Reference

[1] Rachel Potvin and Josh Levenberg. 2016. Why Google stores billions of lines of code in a single repository. Commun. ACM 59, 7 (July 2016), 78–87. https://doi.org/10.1145/2854146

[2] Nicolas Brousse. 2019. The issue of monorepo and polyrepo in large enterprises. In Companion Proceedings of the 3rd International Conference on the Art, Science, and Engineering of Programming (Programming '19). Association for Computing Machinery, New York, NY, USA, Article 2, 1–4. https://doi.org/10.1145/3328433.3328435

[3] libfuse is the reference implementation of the Linux FUSE (Filesystem in Userspace) interface.

[4] CS135 FUSE Documentation (hmc.edu)

[5] sapling : A cross-platform, highly scalable, Git-compatible source control system.

[6] fuser : A Rust library crate for easy implementation of FUSE filesystems in userspace.

[7] Scalar : Scalar is a tool that helps Git scale to some of the largest Git repositories. Initially, it was a single standalone git plugin based on Vfs for git, inheriting GVFS. No longer using FUSE. It implements aware partial directory management. Users need to manage and register the required workspace directory on their own. Ease of use can be improved through the fuse mechanism.