DataLossPrevention
ONLY AVAILABLE IN VERSION 7 OR HIGHER
What is DataLossPrevention?
When enabled, data loss prevention will attempt to improve and prevent data from being loss. This feature is still being expanded on as part of an ongoing commitment to ensure flexibility for developers and data loss prevention for player's.
What this enables
Outdated version prevention:
Outdated version prevention will save the game version ID of their latest play session, when the player attempts to join a new server that has a number lower then the saved version ID then the player will be kicked from the game and the saving process will be aborted. The kick message will say "This server is outdated! You was kicked to prevent data loss, please join an up to data server."
On a developer's end, it's important that you also shut down server's when rolling out updates regardless but this is an extra prevention method.
Auto-Save Duration:
When set, this will save all the player's current data after a specific duration. If set to 15 or below then it will only save when the player leaves the game to prevent overloading data stores API limit's. Remember that games with higher player count's will need to have higher numbers. For most games, 30-60 seconds is a good duration.
Retry Data Save:
Retry Data Save is an optional Data Loss Prevention method that will attempt to save player data again after a save has failed. You can customised how many times the game tries to do this in a single loop by using Max_Retrys and you can choose how long it should take a break between each retry by using Duration_Per_Retry. WARNING: While flexibility has been allowed for this feature, if you attempt to save to frequently it can make server shutdowns longer, have a negative impace on memory and could prevent the system from making changes onwards. Be cautious when setting variables or just use the defaults
What is coming soon
Value Change tracking
When enabled, instead of saving to the server Lua table (not data stores) when the player dies or leaves, the game will save each value based on changes made to them. This will be a setting due to the usage of coroutines and memory usage which could get heavy on games with high data dependency and high player count games. Testing will occur before release!
What is a pre-set feature?
A feature that is not optional in DataLossPrevention is Server-Side Saving Cashe's. In versions 6 and below, data would be saved as soon as a player dies or leaves but in versions 7 or higher data is saved to a server script Lua table and is only saved to the data stores itself when the player leaves to lower the usage rate of data store calls.
Alongside this, the default data stores method has been changed from SetAsync to UpdateAsync. This method aims at preventing data loss further by not allowing for over-write attempt's. Remember that this does not account for Custom Data Module's!
Last updated