The Ultimate Unified Database & Redis Connection Pool for PaperMC
Stop wasting server resources with redundant connections! SharedDB is a high-performance, developer-centric library designed to consolidate your MariaDB and Redis connection pools into a single, efficient source.If you run a network with multiple custom plugins, each one usually opens its own Hikari or Lettuce pool—clogging your database threads and eating RAM. SharedDB fixes this by providing a shared, static API that any plugin can hook into.
Performance Features
- Intelligent Read/Write Splitting: Built-in support for MariaDB and Redis read replicas. Direct your SELECT queries to a local replica and your UPDATES to the primary—perfect for multi-region or high-traffic networks.
- HikariCP & Lettuce Integration: Uses industry-standard pooling for maximum stability and speed.
- Resource Efficiency: Drastically reduces the overhead on your SQL and Redis instances by sharing a single set of pools across all compatible plugins.
- Zero Dependency Conflicts: All libraries are fully shaded and relocated. It won't break your other plugins.
- Developer Friendly: Features a simple static API. Just add SharedDB to your plugin.yml and start querying.
Diagnostic & Admin Tools
Stay in control with a robust suite of management commands to monitor your database health in real-time:- Detailed Usage Stats: See exactly which plugins are making calls and how often.
- Live Connection Testing: Verify your SQL and Redis status instantly from the console or in-game.
- Real-time Debugging: Toggle debug mode to track every query and pub/sub message as it happens.
Commands & Permissions
- /shareddb status – Overall pool health and connection states.
- /shareddb stats – Per-plugin usage breakdown.
- /shareddb test <db|redis|all> – Run a live connection benchmark.
- /shareddb debug <on|off> – Monitor live calls for troubleshooting.
- Permission: shareddb.admin (Default: OP)
