Store user cache in mysql #1341
-
Surely it would be better to store the user cache in mysql. But it should be implemented in such a way that it works with the MySQL Connection and it is not simply loaded into RAM, because it should also work for multiple servers. So a shared usercache. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
What happens when mysql dies or takes long to respond? There are always tradeoffs for any solution. Sure, using a file loaded in memory only works for a single server, but it's also really safe since it can't really fail in any way. Single server is also by far most common setup and mysql solution doesn't really benefit that and even might be a detriment. |
Beta Was this translation helpful? Give feedback.
-
I mean, when someone joins which is not in the cache. Then it will be added in the memory and then there will be an async mysql request to add it. The Primary Key will stop that there will be duplicates. It shouldn't break anything. |
Beta Was this translation helpful? Give feedback.
-
I think that there are plenty of possible issues with something like this that really aren't up for debate. This is also far, far, out of scope of Purpur's job. In fact, it sounds exactly like what some plugins do for syncing player data between BungeeCord/Velocity instances. The idea of including a MySQL connection built into the API is nice in a perfect world, but unrealistic at best and feels like something that would come out of the 1.6 era of Minecraft. |
Beta Was this translation helpful? Give feedback.
I think that there are plenty of possible issues with something like this that really aren't up for debate. This is also far, far, out of scope of Purpur's job. In fact, it sounds exactly like what some plugins do for syncing player data between BungeeCord/Velocity instances. The idea of including a MySQL connection built into the API is nice in a perfect world, but unrealistic at best and feels like something that would come out of the 1.6 era of Minecraft.