Dasfaust / GlobalMarket

Buy and sell items in a global market
Other
28 stars 59 forks source link

Where is MySQL in the 2.0.X version ? #94

Closed fhebuterne closed 8 years ago

fhebuterne commented 8 years ago

Hi,

Can you re-add mysql in the last version ?

Sincerely, Fabien

Dasfaust commented 8 years ago

MySQL support won't happen, officially at least, for a few reasons: all inventory functions in CraftBukkit/Spigot run on the main thread, and MySQL is kind of slow. So, to not kill server TPS you'd have to load the whole DB into memory and make incremental changes as trades happen. In my opinion, it's kinda pointless and can lead to database and memory de-sync issues if not handled properly. So flat-file (the current JSON system) is way easier to work with and generally faster. That's not to stop anyone from making their own storage layer as an addon, it's possible, but I won't be doing it.