Skip to content

Support CBOR codec for RSocket #16830

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

Closed
bclozel opened this issue May 13, 2019 · 1 comment
Closed

Support CBOR codec for RSocket #16830

bclozel opened this issue May 13, 2019 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented May 13, 2019

As of spring-projects/spring-framework#22767, Spring Framework supports CBOR as a codec for single values. This binary format is a good candidate for default inclusion with the RSocket starter.

Hey @sdeleuze @rstoyanchev

  1. is this codec ready for such a commitment on both client and server for RSocket? It seems that it's not the case yet for WebFlux (see spring-projects/spring-framework/issues#20513).

  2. Right now, Jackson+JSON is the default codec configured as an RSocket strategy.
    Looking at the current behavior in DefaultRSocketRequesterBuilder, it seems that the requester is choosing automatically the first concrete media type. Should Spring Boot consider auto-configuring a single codec then (i.e. should we remove JSON and have CBOR instead)?

@bclozel bclozel added the type: enhancement A general enhancement label May 13, 2019
@bclozel bclozel added this to the 2.2.x milestone May 13, 2019
@bclozel bclozel self-assigned this May 13, 2019
@bclozel bclozel modified the milestones: 2.2.x, 2.2.0.M3 May 13, 2019
@bclozel
Copy link
Member Author

bclozel commented May 13, 2019

Discussed this with the Spring Framework team and:

  1. this codec is ready for production use; the single value support is fine for RSocket, since the protocol itself is splitting elements with payload frames
  2. RSocket is well suited for binary formats, so I've configured this codec ahead of the JSON one. Developers can always use the RSocketRequester.Builder to select the MimeType of their choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant