ValhallaGuildTools

ValhallaGuildTools

26.9k Downloads

Reduce the amount of data being sent for syncing dungeon kills

Lyra7 opened this issue ยท 1 comments

commented

From my understanding, the only information that needs to be kept is how many bosses a player has killed in a given month.

My idea is to have a record per player instead of per boss kill. This change alone would cut the number of messages being sent from around 3000 now to a theoretical maximum of 850. (The number of characters in the guild as of now) Realistically, the current database only has 116 players, so I don't expect to come anywhere near that number.

Now for the record, here's my idea for a data structure:

beginning non-numeric chars are player name. First 10 digits after player name is unix timestamp. Final 2 digits is bosses killed for the month (max 99)

Example: Lirah158149511702
Translates to:

  • Player: Lirah
  • Time: Wednesday, February 12, 2020 8:11:57 AM
  • Bosses Killed: 2

Using this structure, the maximum size of a message being sent is 24 bytes. Records could also be batched into a single message reducing the amount of overhead, up to 10 records per message.

When a boss is killed, VGT should read the current records of each player in the party, then increment the boss kill count, set a new timestamp, and send all of the updated party's records in a message.

If this is implemented, the amount of data required to synchronize the database I have currently would be 2kb before overhead, down from 33kb.

commented

solved in 11304.55