Player data in one line
Annotate a class and the connector loads, caches and saves it. Schema changes are handled for you.
In development · early access opening soon
One server for player data, leaderboards, cross-server messaging and your website. LeonsDB replaces the MySQL + Redis setup with a single install, and stops server-switch dupes at the database level.
@PlayerData(namespace = "practicepvp", collection = "stats")
public class Stats {
@Indexed public int kills;
public int deaths;
@Transactional public double coins;
}
Stats stats = LeonsDB.player(player).get(Stats.class);
// instant: read from the local cache
stats.kills++;
// merged with other changes, saved in the background
General-purpose databases don't know what a player is. LeonsDB is built around how plugins actually use data.
Annotate a class and the connector loads, caches and saves it. Schema changes are handled for you.
Online players' data lives in memory on your server. Reads are instant; writes are merged and sent in the background.
Only one server can own a player's data at a time. Late writes from a lagging or crashed server are refused.
Mark a field @Indexed and get instant top-N lists and "rank of player X", always up to date.
Transfers between players are atomic, across servers and through crashes. Coins are never created or lost.
Cross-server messaging and "tell me when this changes" notifications, from the database you already run.
A built-in HTTP and WebSocket API with per-field permissions feeds websites, Discord bots and stores directly.
See or restore any player's data at any point in time. Roll back a dupe or an exploit in one command.
Fast where it can be, careful where it has to be.
stats.kills++ updates the copy in memory. Nothing touches the network or the disk on the main thread.@Transactional go immediately.The classic dupe happens when two servers both think they own a player and both save. LeonsDB makes that impossible.
| MySQL + Redis + custom backend | LeonsDB | |
|---|---|---|
| Setup | Three services, schemas, connection pools, a web backend | One install, schemas from your Java classes |
| Reads during gameplay | Network round trip unless you write your own cache | Local memory, cache included |
| Stat updates | One query per change, or your own batching code | Merged automatically |
| Server-switch dupes | Your problem | Prevented by ownership and epochs |
| Leaderboards | Sorting queries or a Redis sorted set to keep in sync | Built-in sorted indexes |
| Cross-server messages | Redis pub/sub | Built in |
| Website and Discord access | Write and host an API | Built-in HTTP and WebSocket API |
| Restore a player's data | Restore a whole backup | Any player, any point in time |
Performance numbers will be published with open, reproducible benchmarks against MySQL and MongoDB before launch.
The database and the connector are open source and free to self-host, forever.
Apache-2.0
Use it in any plugin, including paid and closed-source ones. No strings attached.
AGPL-3.0
Free to run on as many machines as you like. A commercial license is available for companies that need one.
Coming later
Hosted LeonsDB with backups, a web dashboard and analytics, for networks that don't want to run it themselves.
Early access is opening to a small group of servers and plugin developers. Tell us what you run and what slows you down.
contact@leonsdb.com