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

RESTEasy Reactive: investigate JSON streaming #13663

Closed
FroMage opened this issue Dec 3, 2020 · 11 comments · Fixed by #20908
Closed

RESTEasy Reactive: investigate JSON streaming #13663

FroMage opened this issue Dec 3, 2020 · 11 comments · Fixed by #20908
Assignees
Labels
area/rest kind/enhancement New feature or request
Milestone

Comments

@FroMage
Copy link
Member

FroMage commented Dec 3, 2020

There are several existing competing mime types / RFCs for streaming JSON in requests/responses.

We should investigate them and possibly support one or more.

@FroMage FroMage added kind/enhancement New feature or request area/rest labels Dec 3, 2020
@FroMage
Copy link
Member Author

FroMage commented Dec 3, 2020

@gytis this is what @geoand talked to you about.

@FroMage
Copy link
Member Author

FroMage commented Dec 3, 2020

Note that for the "response streaming" part this may depend on #13661

@gytis
Copy link

gytis commented Dec 3, 2020

Great! I'm happy to take this one. Feel free to assign me.

@FroMage
Copy link
Member Author

FroMage commented Dec 3, 2020

Great!

@FroMage
Copy link
Member Author

FroMage commented Mar 26, 2021

Apparently Kubernetes API server (https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/) uses application/json;stream=watch and streams.

@geoand
Copy link
Contributor

geoand commented Mar 26, 2021

WTF is that stream=watch thing :)

@FroMage
Copy link
Member Author

FroMage commented Jun 28, 2021

One option is http://ndjson.org/

@ntrp
Copy link
Contributor

ntrp commented Jun 28, 2021

Just to add ndjson is the default streaming method of Spring WebFlux Multi responses

@ntrp
Copy link
Contributor

ntrp commented Jun 30, 2021

I could start implementing a solution to support Ndjson on JaxRS endpoints if anybody can point me in the right direction. I have seen the SSE provider in JaxRS core but I think this one can be much simpler. I am still missing all the links to understand fully what is necessary to make it happen. Did a quick and dirty 10 min PoC with a custom provider but the provider receives a list of objects instead of receiving single Multi emits of course.

@ntrp
Copy link
Contributor

ntrp commented Jul 1, 2021

Ah cool, I did not find that one yet hehe. That's a really good entry point, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants