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

Versioned session schema #21

Merged
merged 5 commits into from
Apr 22, 2020
Merged

Versioned session schema #21

merged 5 commits into from
Apr 22, 2020

Conversation

lstoll
Copy link

@lstoll lstoll commented Feb 13, 2020

To evolve the session data over time, it would be idea if we could associate
them with a version that we can act on at deserialization time. This introduces
a top-level type that just tracks the version, and the session as a raw
message. We can then handle this appropriately.

As part of this, we just move to go JSON serialization rather than protobufs.
This is data only we consume and is used in Go code, so proto added a bunch of
noise for no additional value.

Because we do have existing unversioned and proto-based data out there, code
has been added to detect this and parse the data correctly.

To evolve the session data over time, it would be idea if we could associate
them with a version that we can act on at deserialization time. This introduces
a top-level type that just tracks the version, and the session as a raw
message. We can then handle this appropriately.

As part of this, we just move to go JSON serialization rather than protobufs.
This is data only we consume and is used in Go code, so proto added a bunch of
noise for no additional value.

Because we do have existing unversioned and proto-based data out there, code
has been added to detect this and parse the data correctly.
@lstoll lstoll requested a review from a team February 13, 2020 17:25
Copy link
Contributor

@alindeman alindeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea and implementation

@lstoll lstoll merged commit c33ded7 into master Apr 22, 2020
@lstoll lstoll deleted the lstoll-sess-schema branch April 22, 2020 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants