Chicken-Bones / EnderStorage

MIT License
23 stars 20 forks source link

[Suggestion] MySQL support? #67

Closed LuxusDarkangel closed 8 years ago

LuxusDarkangel commented 8 years ago

Hi! I'm not sure if forge allows this, but implementing a mysql database to add suport for two servers using the same enderchest/endertank frequencies and content is viable? This allows a bunch of possibilities, because right now because you can't do it using a external software.

Chicken-Bones commented 8 years ago

There's no limitation in forge, but I don't think it's technically viable, due to the fact that every transaction (item add/remove) would have to be authenticated with the mysql server. This would take too long. It could be implemented for players accessing via the gui, because there is already async transaction support there, but machines expect a result instantly.

LuxusDarkangel commented 8 years ago

Saving the enderchest/endertank data in real time in the ES file instead of waiting the entire world save and synchronizing this file with an external software would be viable? At least that way it can be synchronized at the cost of more hdd usage. Using something like Rsync wich only copies the modified part of the file would be more or less fast.

Chicken-Bones commented 8 years ago

Anyone is welcome to take a crack at it, but consider this: What happens when two machines on two servers go to extract the same item at the same time? Then repeat that 20 times. If that takes even a millisecond, the solution is not scalable.