Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HuskSync 2.0 - no more proxy plugin, redis caching, rewritten database handling, remove sqlite support #33

Merged
merged 33 commits into from
Jul 11, 2022

Conversation

WiIIiam278
Copy link
Owner

@WiIIiam278 WiIIiam278 commented Jul 1, 2022

I thought about it and decided it was time for a change of approach. The goal of this rewrite is basically to deprecate the need for a proxy plugin while maintaining the speed afforded by redis, and also opening the door to more platforms (fabric). It'll do this through utilizing redis key caching and a rewrite of the common module.

  • Use redis key caching, remove need for proxy plugin
  • Rewrite database class for much, much better access
  • Make platform independent to allow porting to other platforms
  • Better handling if connection is lost to redis (Server crash in rare cases where connection to the Redis database is lost #26)
  • Finally support multi-user backups as was originally planned (and to hopefully reduce complaints) - including new in-game commands to support this
  • Serialize with gson (to jsons) rather than implements Serializable (this is a big improvement for many reasons). Should also improve database performance
  • Support data conversion from HuskSync 1.4
  • Synchronisation of player PersistentDataContainers (Sync player's PersistentDataContainer #30)
  • Write new locales
  • Fix issues with /inventory and /enderchest command
  • 📌 "Pinning" user data backups so they don't get rotated
  • Update other locales, start requesting updates from translators
  • Plan integration
  • Test everything (esp. PDC syncing, location syncing)

The work done for HuskSync 1.4 with regard to removing the MPDB dependence will still be very useful for this.
Unfortunately, that means SQLite support will be dropped, though this isn't really an issue. Nobody running HuskSync doesn't have a MySQL database. Further work to support additional database types can be explored.

A side effect of all this work, particularly on serialization, is that there should be decent performance gains, especially on expensive events (#31)

Thoughts and feedback welcome.

Use redis key caching, remove need for proxy plugin
Make platform independent to allow porting to other platforms
@WiIIiam278 WiIIiam278 added the status: in progress This issue is in progress label Jul 1, 2022
@ZConnorZ
Copy link

ZConnorZ commented Jul 2, 2022

Disconnecting from the proxy is a good solution.
Is it possible to transfer data from Sqlite to Mysql?

@ghost
Copy link

ghost commented Jul 5, 2022

Too fast....
Thanks you for such a great plugin ❤

@WiIIiam278 WiIIiam278 marked this pull request as ready for review July 9, 2022 15:52
@WiIIiam278
Copy link
Owner Author

WiIIiam278 commented Jul 9, 2022

My initial checklist is now done, but still todo before merge & release:

  • Fix issues with /inventory and /enderchest command
  • 📌 "Pinning" user data backups so they don't get rotated
  • Add location to data view if enabled Edit: decided against this for now.
  • Update other locales, start requesting updates from translators
  • Test everything (esp. PDC syncing, location syncing)

Worth noting, I wrote a little library to aid 1.4 --> 2.0 importing (https://github.com/WiIIiam278/HSLDataConverter). I've decided that data importing wont be manual, as adding stuff to the plugin enable logic is liable to go wrong.
Clear documentation on how to migrate is better than just doing it manually whether you like it or not. The console command for doing this, by the way, is husksync migrate legacy <args>, which will bring up a wizard just like the mpdb migrator.

Update (Jul 10, 2022): Moved checklist to original post.

@WiIIiam278
Copy link
Owner Author

Merging this now to begin final checks and polish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in progress This issue is in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants