3Hren / 3Hren/msgpack-rust

Specfication of behavior with changing data types (versioning / schema evolution)

Open
#302 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.4k
Forks
162
PR merge metrics
No merged PRs in 30d

Description

I'm looking for a highly compact serialization format that allows for a certain backwards compatibility. rmp-serde looks like a very interesting candidate, because its non-named representation is very concise indeed. What I couldn't answer from studying the docs is the aspect of backwards compatibility, i.e., how rmp-serde handles changes to data types -- in particular when using the compact non-named serialization.

Imagine serializing a struct with fields `a` and `b` and storing it on disk. Later an optional field `c` (with a default) is added. Will that work, or will the data become unreadable? What about removing or renaming fields? Does the order of fields matter, i.e., will the data become unreadable when swapping the field order to `b` and `a`? Does that depend on whether `a` and `b` have the same or different types?

It would be great if the documentation could specify what kind of assumptions users can make regarding changing data types.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.