Open Snowiiii opened 3 months ago
I can do that.
I can do that.
great, go ahead
I think it makes sense to use SQLite, or a similar file-based database.
I think it makes sense to use SQLite, or a similar file-based database.
Yep, I already had that in mind
Why would we want a database for permissions, and not just store it on the player? Or are we thinking its stored on both? Like its loaded from a db when player joins?
Why would we want a database for permissions, and not just store it on the player? Or are we thinking its stored on both? Like its loaded from a db when player joins?
Storing permissions in a database allows the server to have a lower memory overhead, especially for servers which have large numbers of permissions / online players. Database performance is quite fast and highly optimized for memory and cpu usage, and queries against permissions are relatively simple to index, so for most practical purposes, running something like SQLite in the background will be better for performance and maintainability than storing a bunch of strings on the player's struct in memory. No sense reinventing the wheel here IMO.
I think it makes sense to use SQLite, or a similar file-based database.
I think it would be nice to be able to plug+play the database in the long run, so users who want databases running on separate servers can provide a connection URL and swap from SQLite to MySQL, PostgreSQL, or some other implementation or machine, but this would be a lower priority than just implementing it to begin with on SQLite.
It would be very interesting if somehow LuckPerms can be ported to work far down the line. Potentially that plugin would be a great reference on what features would be useful here - particularly, design choices made in its API might be notable to consider designing Pumpkin's.
I will try to implement sources like LuckPerms as well.
We want to have an good Permission system using SQL Databases