fury icon indicating copy to clipboard operation
fury copied to clipboard

[Scala] proposol a new capability mode for maintain core data strucutre in the server

Open LoranceChen opened this issue 1 year ago • 0 comments

[Background] For safe maintain core persistence data compatible are the most consider things in server-side. In many server-side project, only add new field in every new release version and carefully delete existing field is a good practice usually.

Our COMPATIBLE mode are not check for delete field. There are difficult check safty when release new version.

[Advice] Add a new CompatibleMode only allow add new field and explicitly give a register process allow ignore field. Such as:

case class Foo(a: Int, b: String, c: Long)

val fury = Fury.builder()..withCompatibleMode(CompatibleMode.ALLOW_NEW_FIELD).build()
fury.registerDeletableField("Foo.c") // which means Foo.c bytes data can ignored when doing deserilaize process.

This can give a great help to check new release version are safe on data structure level.

LoranceChen avatar Jun 12 '24 04:06 LoranceChen