Skip to content

Support Smile streaming in WebFlux [SPR-16151] #20699

Closed

Description

@spring-projects-issues

Benoit LEPREVOST opened SPR-16151 and commented

See issue raised initialy on spring-boot: spring-projects/spring-boot#10756

Jackson2SmileEncoder/Decoder declare "stream+x-jackson-smile" as a streaming MediaType, it doesn't seem to work by default. In my use case, we need binary encoding as we pass a lot a matrices and json just doesn't perform well for that case. CBOR would also be nice, if it came with a streaming option.

I've attached a new sample project.

Thank you


Affects: 5.0.1

Attachments:

Referenced from: commits 31b25b5, 32f6cce

Activity

  1. spring-projects-issues commented on Nov 21, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    I have begin working on a fix (see this draft commit) but I am not 100% yet Smile stream non-blocking parsing is fully supported on Jackson and WebFlux codecs side.
    I need to ask confirmation to the Jackson project lead, add integration tests, and review these changes with Arjen Poutsma, so let's plan that for 5.0.3.

  2. spring-projects-issues commented on Dec 18, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    I have updated the branch which now contains the following changes:

    • Move getDecodableMimeTypes() to AbstractJackson2Decoder
    • Move getEncodableMimeTypes() to AbstractJackson2Encoder
    • Add support for application/stream+x-jackson-smile
    • Remove streaming line separator when pretty print is enabled or Smile encoder is used

    Currently there is a low level error thrown by Jackson in JacksonStreamingIntegrationTests:
    JsonParseException: Still have 13 undecoded bytes, should not call 'feedInput'
    Point has been raised on Jackson side, waiting for a feedback.

  3. spring-projects-issues commented on Dec 18, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    I have created a dedicated issue on Jackson side: FasterXML/jackson-dataformats-binary#127

  4. spring-projects-issues commented on Jan 8, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    I have moved this issue to 5.0.4 since Jackson issue is not fixed yet.

  5. spring-projects-issues commented on Jan 12, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    I have provided a repro project as requested by Tatu. It should allow him to see if the issue is on Jackson side or in our Jackson2Tokenizer.

  6. spring-projects-issues commented on Jan 27, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    Tatu provided guidance that should allow us to update our implementation in order to make it work with Smile streaming (since it is not exactly the same than JSON).

  7. added
    type: enhancement
    in: core
    on Jan 11, 2019
  8. added this to the 5.0.4 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions