-
Notifications
You must be signed in to change notification settings - Fork 154
Filer.next
Files are stored as single objects in IndexedDB, which doesn't allow efficient read/write for large files (the entire file must be read/written for each data operation).
Files should instead map their data onto extents. This means replacing the data
attribute on each node with an extent map, allowing the client to read/write the minimal number of extents.
This is what filer.io
is supposed to be. The main idea is that applications can embed a third-party iframe that allows access to cross-domain storage rather than application-specific storage.
A web application would load up filer.io
and ask the user (once) to allow access. The main application would then proxy storage API requests to the third-party iframe, and the iframe would be responsible for creating read/write dialogs for the user to interact with the shared storage. Once the user interaction is completed, the data is returned to the main application without ever having exposed the storage directly.
An application may have several filer instances: one application-wide instance (e.g. common assets), a user-specific instance to store application-specific user data (e.g. settings and preferences) and a shared cross-domain instance to store user-generated data (e.g. saved documents).
IndexedDB object stores should be encrypted to prevent unauthorized access to private data by either a malicious application or by access to the OS filesystem directly.
Mounts are currently done in software, but it's useful and familiar to mount other filesystems onto an existing directory tree. Mounts would be in-memory (not stored to IndexedDB). Support for mounting local instances (from the same machine) as well as remote instance (from filer.io using third-party iframe) would be awesome.
The application would start with an initial virtual filesystem and would layer mounted filesystems on top, much as Linux does. This is also a good place to do caching.
A web UI for navigating a tree of mounted filesystems. Usable as an application feature for filer.io
when users visit that domain.
The existing API uses callbacks. Enhance the API to return a promise when no callback is provided.
Convert existing constructors to proper ES classes.
- The Linux Kernel Documentation has some great reading on implementation details.