Can there be an option to change the location of the lp data?
EOT3000 opened this issue · 13 comments
Could you make a config.yml, which, among other things has a path variable. If you leave it blank, the info is stored in the default folder, if you add a file path, the config folder will be in the specifies path.
So you want to be able to change the storage location of the data or the actual config?
The latter wouldn’t make much sense to be honest.
But it’d be a good idea to elaborate your use case for the suggestion.
Luck will Tag it as a suggestion when he reads it. Nothing you (or I) can do.
I want to do this so that I don't have to set up a my sql server to share data between servers
That's in my opinion not really something useful.
If you really want to have perms syncing across servers, then having a MySQL-database setup is your best option.
Having such an option in LP wouldn't make anything better. It would most likely do the opposite and decrease the performance of LP.
If you’re on Linux you can use symlinks so it’ll use the same file. And you should use H2 too.
And I understand it correctly that you want to be able to change the storage location of the data? If so please change the title accordingly as the current title is not descriptive of your suggestion at all.
While it is a valid suggestion, why exactly do you not want to set up a database server? Not more than 10 minutes of work and vastly superior to file based storage types.
I use windows and I don't exactly know how to set up an sql server, and I also don't want to have to run 5 servers at the same time(plus my Minecraft client).
If you’re using Windows, just use XAMPP. By far the best option for non dedicated servers. Installation is super simple and there's nothing you need to do other than to start the database.
As far as I know in java, Having one data file instead of multiple would actually make the server more efficient(at least use less storage space and run just as well).
Not when you want to use the same file for multiple instances... Also
and I also don't want to have to run 5 servers at the same time(plus my Minecraft client)
What now? Do you want to use it LP for multiple servers, or just one?
And I assume you want to selfhost it on your PC? Because that isn't really a good solution.
The file based storage system (yml, json, hocon etc) is not safe for use between multiple servers.
There are concurrency checks built into the handler to ensure race conditions don't occur, but these checks are not implemented at a file system level. You could potentially experience data corruption/loss as a result of using the same directory of storage files between different servers - it is not something I recommend.
As such, it doesn't really make sense for this to become a "supported" feature of the plugin. As Brainstone said, yes you can symlink directories, but as mentioned, I don't recommend you do.
Databases like H2 support multiple Access flawlessly. They could be easily used that way.