Context:
Baby Globe is configured to show different animations on different pages through the use of WikiData Qids. We have a list of Qids matching different wiki pages, mapped to BG state names. Compiling all the proposed mappings - there are 667170 Qids. That mapping was planned to be stored in a json file.
Problem:
As a json file this is ~15M, which IIUC does not fit into WANObjectCache
Current implementation:
- Storing of the json file in WANObjectCache https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WP25EasterEggs/+/refs/heads/master/src/PageCompanionService.php#102
- Look up of Qids in the mapping https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WP25EasterEggs/+/refs/heads/master/src/PageCompanionConfigResolver.php#165
Proposed solutions:
s1. Shard the json file and create a WANObjectCache for each shard. This would get a bit messy, as we would need to have at least 15 json files with sorted Qids
s2. Remove entries from the configuration mapping to the json file under 1M. Probably the last resort solution
s3. Use Cdb https://www.mediawiki.org/wiki/CDB, compile the binary file locally, commit it in the extension repo, utilize \Cdb\Reader in extension to check the Qids mapping.
Further questions:
q1. Is using Cdb in extension permitted?
q2. Would using Cdb in extension require some tedious setup, or is it "plug and play"?
q3. Will there be security review complications because it is a binary file?
q4. Are the other better suited solutions than the ones mentioned here?