-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
Background
Currently, Ganesha includes storage adapters for Redis, Memcached, APCu, and MongoDB within the main repository. While this provides convenience for users, it introduces several maintenance challenges:
- Maintenance overhead: Some adapters (APCu, MongoDB) were contributed by community members, but I (@ackintosh) lack deep expertise in these storage systems, making it difficult to properly maintain, debug, and evolve these components (e.g., MongoDB adapter - SlidingTimeWindow support #88)
- Testing complexity: CI/CD pipeline must test against multiple storage systems (e.g., Tweak ext-mongodb #134)
- Dependency bloat: Maintainers must install dependencies for all storage backends in require-dev even when working on unrelated components
Proposal
I propose to extract the following adapters into separate, dedicated packages:
- APCu adapter (Apcu.php, ApcuStore.php)
- MongoDB adapter (MongoDB.php)
Keeping in core:
- Redis adapter (most commonly used, stable, and within my expertise)
- Memcached adapter (widely used, stable, and within my expertise)
Implementation Plan
Phase 1: Create separate packages
- Create
ganesha-apcu-adapter
repository - Create
ganesha-mongodb-adapter
repository - Each package will:
- Implement the same
AdapterInterface
- Include its own test suite
- Have dedicated CI/CD pipeline
- Maintain backward compatibility
- Be maintained by contributors with expertise in the respective storage systems
- Alternatively, I am also considering transferring ownership of these separated adapters to motivated developers who are willing to take responsibility for their maintenance
- Implement the same
Phase 2: Update core repository
- Mark APCu and MongoDB adapters as deprecated in core
- Update documentation to reference new packages
- Add migration guide for existing users
Phase 3: Remove from core
- Remove deprecated adapters in next major version
- Clean up related dependencies from
composer.json
- Simplify CI/CD pipeline
Migration Path
Existing users can migrate seamlessly by:
# For APCu users
composer require ganesha-apcu-adapter
# For MongoDB users
composer require ganesha-mongodb-adapter
The API remains identical, ensuring zero breaking changes during migration.
Please feel free to comment if you have any questions or feedback.
CC: @MikkelPaulson @nikitaksv - I'm notifying you as the original contributors of the APCu and MongoDB adapters respectively, in case you're interested in maintaining the separated packages.