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

Add Smithy RPC v2 CBOR protocol #2212

Merged
merged 30 commits into from
Mar 27, 2024
Merged

Add Smithy RPC v2 CBOR protocol #2212

merged 30 commits into from
Mar 27, 2024

Conversation

kstich
Copy link
Contributor

@kstich kstich commented Mar 25, 2024

Background

  • What do these changes do?
    Adds a new Smithy wire protocol, Smithy RPC v2 CBOR (@smithy.protocol#rpcv2Cbor), that is an RPC protocol using the CBOR data format for payload transmission.

  • Why are they important?
    CBOR is a more performant encoding, both in time to encode and the resulting payload size, than both JSON and XML.

Testing

  • How did you test these changes?
    Spec builds and reads correctly. Protocol trait is used by services in the new smithy-protocol-tests package, which both aws/smithy-go (client) and smithy-lang/smithy-rs (service) pass.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

crisidev and others added 29 commits March 22, 2024 14:55
* Add Smithy RPC v2 trait definition and implementation

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Add support for wire formats

* Address PR comments

* Rename SmithyRpcV2* to just Rpcv2

* Finish refactor to just have Rpcv2

* Address PR comments. Remove the validator for now

* Address comments from PR

---------

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
* Implement Rpcv2TraitValidator and tests

* Add missing license

* Update smithy-protocols-traits/src/main/java/software/amazon/smithy/protocols/traits/Rpcv2TraitValidator.java

Co-authored-by: Kevin Stich <kevin@kstich.com>

* Address comments from PR

* Make sure format is always set

* Fix typo

* Fix comment

* Fix comment

* Fix trailing whitespace

---------

Co-authored-by: Kevin Stich <kevin@kstich.com>
This commit refactors the trait implementation to be specific to the
CBOR wire format instead of taking a collection of possible wire
formats, simplifying the process of resolving the protocol to use
for generated code.

It also moves the package to `smithy-protocol-traits`, removing the
pluralization on `protocols`.
@kstich kstich requested a review from a team as a code owner March 25, 2024 17:45
@kstich kstich requested a review from sugmanue March 25, 2024 17:45
@kstich kstich merged commit 56917e7 into main Mar 27, 2024
14 checks passed
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.

5 participants