Compress collected objects for efficient database storage and repush #17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Collected Common Crawl objects are currently stored as raw payload bytes in the SQLite
object_cachetable implemented bysvr/object_cache.py. The cache is used bysvr/object_routes.pyandsvr/svc_ccwget.pyfor server downloads and authenticated client cache uploads.The object payloads can be large, and storing them without an explicit compression strategy increases SQLite and future ClickHouse storage costs. The compressed representation should be compatible with the original Common Crawl WARC storage where possible. The system must also retain a way to produce the original uncompressed bytes when an object needs to be re-pushed or served.
Proposed approach
Add fast object compression for persisted database payloads while preserving the Common Crawl representation and the ability to recover original bytes.
The implementation should:
Scope
svr/object_cache.pystorage metadata and read/write paths for compressed payloads.svr/object_routes.pyandsvr/svc_ccwget.pyto transparently decode objects before serving or repushing them.Acceptance criteria
Dependencies
CACHE_DB.