This project provides a durable object-based file system that mimics traditional file system operations. Leveraging SQLite's asynchronous capabilities, it ensures rapid responses to file system calls. With potential for integration into APIs, this implementation allows the creation of durable object stubs as directory names, making file management seamless.
The Cloudflare Virtual FS in Durable Object repository presents an innovative solution for creating a virtual file system using Durable Objects and SQLite. The project's goal is to emulate a file system where all standard file system (fs) calls can be executed swiftly and efficiently through a Durable Object (DO). This is achieved by taking advantage of the asynchronous nature of SQLite and RPC capabilities.
To get started, run the main program and visit localhost:3000 to see the initial version in action. Developers can integrate it into their projects by simply copying fs.ts into their Cloudflare worker.
An update to the repository includes an alternate implementation in blocks.ts, which leverages blocks to handle larger files. This approach is designed to accommodate virtually infinite file sizes, with initial tests demonstrating functionality for files up to 400kb, such as images.
While the project is in its early stages and has not undergone extensive testing, it serves as a foundation for those interested in building a reliable virtual file system powered by Durable Objects and SQLite. Future updates may expand its capabilities and stability.
No comments yet.
Sign in to be the first to comment.