EssentialsX

EssentialsX

2M Downloads

MySql Support to make essentials multiserver compatible

Phreag opened this issue ยท 14 comments

commented

Would it be possible to store all the data in a mysql so it can share like status of /go, /fly etc over different servers?
That would be a huge improvement for it...

commented

;s

commented

heh

commented

1 thing that definitely needs to been mysql is the trade.log, that needs to have a mysql option to save economy data, if your doing it, make it universal, MySQL Balance for players, so this is cross server and safe from loss of data, groupmanager definitely needs a mysql option for groups.

commented

Having simple mysql for logging trades is much easier and more basic than having it for players (just writing and not caring about results vs reading and writing).

We won't be touching groupmanager.

commented

Just a little back ground on how this works...
Just storing the data in mysql, wouldn't make it multiserver compatible.

If in Essentials you had to read the players 'balance' from mysql every time the balance is needed, you could easily introduce major latency, as currently players balances are stored in RAM while the player is connected to the server. This is true of all player metadata. While a player is connected to the server, any edits to the players yml file would be wiped, as while the player is online, the file is just a 'backup'.

commented

/sub
It is not just about the economy. Other data like last login time could easily be queried from a website for example.

commented

While you can easily add mysql back end support. I try to ask why people want it. At least 60% of the time people want to be able to edit players settings or balance via a website. Even if mysql support was added trying to do this would work most times but due to the required level of caching, editing online players would be reverted.

I often use the example of economy as this would cause duping exploits.

The way essentials is written, it can query config data hundreds of times per second, so setting it up to use mysql without the cache would lover an average server to <5 tps.

While it could be added for the other people, I didn't want to open the can of worms of people complaining about duping and such.

It is worth noting I have successfully set up web api for economy a few times. Ecocitycraft is using a bank plugin I wrote that allows people to transfer money to their website/forum account for either safe keeping or used in their web minigames. The plugin just allows communication between the plugin and website, so this is dupe safe.

commented

Yes,I think so too.Craftconomy has not been updated for a year.IConomy has a lot of bug

commented

I think we can safely conclude that this isn't going to happen any time soon, due to the complications that would arise. Cross-server syncing may exist eventually, but not in the form of official support for MySQL as an EssentialsX backend.

commented

Can I open a new ticket to request trade logs have the option to be saved in mysql?

commented

@FrozenBeard #167 already covers that.

commented

How do I keep forgetting I already have tickets for these things.

commented

Please? :S This is a feature i have wanted for a long time since i running a network i will like to use same information on other servers

Even on lobby, I using EssentialsXSpawn on my lobby servers it stand welcome messages for each time then join a lobby them never have joined before

And i have heard many other networks hate file storage too since its being much on each minigame/server

Just need to be userdata

commented

At least get the trade log into mysql, it's unmanaged size and is definitely better off in a database.