Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema evolution in zserio #328

Closed
PieterSmith-TomTom opened this issue Jun 16, 2021 · 6 comments
Closed

Schema evolution in zserio #328

PieterSmith-TomTom opened this issue Jun 16, 2021 · 6 comments
Assignees
Labels
documentation Documentation change is needed enhancement New feature or request
Milestone

Comments

@PieterSmith-TomTom
Copy link

How does zserio support schema evolution?

In Google Protocol Buffers, the field numbers are an important component to supporting schema evolution, but I cannot find anything similar or documentation on schema evolution in the documentation.

@fklebert
Copy link
Contributor

zserio does not have a so-called wire format, which means that it does not add stuff to the binary stream that is not written by the designer/developer. Protobuf does that.
It is one of the reasons why zserio outperforms protobuf in terms of data size since it is more bare-metal than proto.

So schema evolution is at the moment not directly supported by zserio. Basically you can only do some backward compatible stuff that includes:

  • Add value to enum (do not change underlying datatype of enum)
  • Add const
  • add stuff to the end of a structure (which itself may not be contained in other structures)

I do not know if we have anything in the backlog on this, but there is a concept lingering around for some years to accomplish a similar feature like protobuf but basically decouple this from the original bytestream. Basically it is adding wireformat info into a separate blob that can then be read (or not). So basically the lightweightness of zserio is maintained but if somebody wants to add the additional data size then we can also accomplish schema evolution like protobuf or others.

@mikir
Copy link
Contributor

mikir commented Jun 16, 2021

I do not know if we have anything in the backlog on this, but there is a concept lingering around for some years to accomplish a similar feature like protobuf but basically decouple this from the original bytestream. Basically it is adding wireformat info into a separate blob that can then be read (or not). So basically the lightweightness of zserio is maintained but if somebody wants to add the additional data size then we can also accomplish schema evolution like protobuf or others.

There is already a dedicated issue for compatibility data: #43. We even did some quick investigation of this issue in the past to make sure that the suggested approach is feasible.

@PieterSmith-TomTom
Copy link
Author

Hi @fklebert ,
Given your explanation, it sounds like schema evolution with zserio is possible, but not intuitive. Before diving into implementation change proposals and the compatibility data (#43) proposal, might it not be a better to just document a workable approach / recommendation to schema evolution based on existing functionality?

@mikir
Copy link
Contributor

mikir commented Jun 16, 2021

Given your explanation, it sounds like schema evolution with zserio is possible, but not intuitive. Before diving into implementation change proposals and the compatibility data (#43) proposal, might it not be a better to just document a workable approach / recommendation to schema evolution based on existing functionality?

OK, we will try to improve documentation for schema evolution. At least some notes what is currently possible and what is not possible would be better than nothing.

@mikir mikir added documentation Documentation change is needed enhancement New feature or request labels Jun 25, 2021
@mikir mikir added this to the Backlog milestone Jun 25, 2021
@mikir
Copy link
Contributor

mikir commented Jan 26, 2022

Documentation will be done within scope of issue #43.

@mikir mikir closed this as completed Jan 26, 2022
@mikir mikir removed this from the Backlog milestone Feb 7, 2022
@mikir mikir added this to the Backlog milestone Nov 3, 2022
@mikir mikir reopened this Nov 3, 2022
@mikir mikir modified the milestones: Backlog, 2.11 Feb 27, 2023
@mikir mikir modified the milestones: 2.11, 2.12 May 10, 2023
@mikir mikir self-assigned this Sep 13, 2023
mikir added a commit that referenced this issue Sep 14, 2023
@mikir
Copy link
Contributor

mikir commented Sep 14, 2023

New Zserio Schema Evolution Guide has been created.

@mikir mikir closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation change is needed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants