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

Decouple payload encoder and add CBOR as an encoding mechanism #1347

Merged
merged 27 commits into from
Dec 9, 2021

Conversation

namtruong
Copy link
Collaborator

This PR adds another type of payload encoding (CBOR) as the preferred codec with the view of replacing the legacy binary encoding mechanism. This is to make the EncodedPayload more extensible and also an enabler to accommodate any interoperability requirements in the future. Changes include

  • Introduce EncodedPayloadCodec and store in an extra database column. Purpose of this is to maintain backward compatibility.
  • Add EntityListeners that handle data encoding/decoding from/to database
  • Heavy refactoring to decouple the payload encoder and perform lookup to work out the relevant encoder to use based on codec
  • Mapping of api versions and preferred codec - publisher to encode and publish payload in preferred format depending on supportedApiVersions of the remote node
  • Add CBOREncoder
  • Refactoring unit tests

For now the scope of the change is for pushing payload between Tessera peer-to-peer

Part of the change was initially done in PR #1335 by @melowe

@namtruong namtruong marked this pull request as ready for review November 24, 2021 19:32
@Krish1979
Copy link
Collaborator

LGTM

@Krish1979 Krish1979 merged commit 0d554db into master Dec 9, 2021
@namtruong namtruong deleted the decouple-payload-encoder branch January 10, 2022 12:10
@Krish1979 Krish1979 added 22.1.0 2022 First Tessera release enhancement Non-user code enhancements labels Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
22.1.0 2022 First Tessera release enhancement Non-user code enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants