You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In geary-1.0 we had the concept of migrating entities when the definition updated. This was put in place to prevent existing items breaking on an upgrade.
Something to support the same use case is necessary for Geary.
Basic outline:
Attach a (non static, persistent) component to every entity containing a simple version number for each component. (if version #0 do not serialize to keep component from bloating)
Component providers provide a migration specific to component whenever a component needs to change. Migration handles updating from serialized form (because the class definition has probably changed). This might be a bit tricky.
On loading an entity for the first time on a server restart (be it from PDC, or what have you) compare the version number for each component with the version number of the latest migration.
On mismatch apply all registered migrations in order starting from the first one with a higher version #.
The text was updated successfully, but these errors were encountered:
https://github.com/bazaarvoice/jolt
A similar Java lib for making JSON to JSON transformations, but it uses an actual JSON file to do those transformations. By the looks of it mapneat is essentailly this but a Kotlin DSL.
Since a lot of these libraries are focused on JSON, the full migration process from PDC would require us to convert from CBOR to JSON, migrate, then use ktx.serialization on that json file (we dont need to convert it back to CBOR since ktx.serialization works on multiple formats).
Unfortunately, we dont have access to the old serializer so we can't use ktx.serialization to directly make the CBOR to JSON transformation, we need something in between. We need to find a library to do that.
In geary-1.0 we had the concept of migrating entities when the definition updated. This was put in place to prevent existing items breaking on an upgrade.
(see https://github.com/MineInAbyss/geary-1.0/blob/ebcfaa4deed2f28c523db9384b16375282eac344/src/main/java/com/mineinabyss/geary/ecs/entity/migration/GearyEntityMigration.java#L11)
Something to support the same use case is necessary for Geary.
Basic outline:
The text was updated successfully, but these errors were encountered: