To support the WOPI protocol files must be addressable using a unique ID regardless of moving or renaming operations. One solution is to put the file metadata into the database instead of keeping it in millions xml files as we have it with the current implementation. Using the database approach, looking up and delivering a file is trivial.
Keeping file metadata in the database has many other advantages:
- Looking up which files belong to a user can be done while such an operation today means to crawl the entire filesystem. Not feasible for large installations
- Looking up which files consume most space (including the revisions) and managing them will become possible
- Calculating a quota can be done with a db query without filesystem calls
- Directory listings can be produces with a single db query instead of more expensive filesystem calls
For larger installations it is expected that the filesystem load will drastically be reduced.
Things to be considered:
- The solution must migrate existing metadata to the new infrastructure
- All file operations must make use of the metadata. This involves locking, download counter, upload and create metadata etc.
- Web UI
- REST calls
- Export/Import of folders/courses with metadata
- Unzip operations
- Some maintenance tasks must be available in the admin panel and also on the folder component to re-sync the physical files with the metadata counterparts, e.g. to support manual restore of files from a backup with recreation of metadata via such a sync button