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

4.1.2: New implementation for SSE in webserver #9297

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

barchetta
Copy link
Member

Backport of #9224 to Helidon 4.1.2

Description

Provides a new implementation for SSE in webserver. This implementation does not use the normal output stream to serialize the events to avoid problems with buffering and chunked encoding. Instead, it writes directly to the underlying socket writer and flushes data as needed. As a result, chunked encoding is no longer used for SSE. Several tests have been updated. Fixes #9164.

Summary of Changes

  1. New create method in SinkProvider that deprecates the old one. This change is required for the new implementation. Not a very popular SPI, but we shall continue to support the old method (and continue to include the old implemtnation) for some time. Class Http1ServerResponse updated accordingly.
  2. New SSE implementation in SseSink that writes directly to a writer. Also needs to write response status line and headers. No longer uses the output stream from the response.
  3. New SimpleSseClient class to test SSE endpoints without using WebClient. This is required because we don't use chunked encoding anymore. Related tests have been updated.

Provides a new implementation for SSE in the webserver. This implementation does not use the normal output stream to serialize the events to avoid problems with buffering and chunked encoding. Instead, it writes directly to the underlying socket writer and flushes data as needed. As a result, chunked encoding is no longer used for SSE. Several tests have been updated.
@barchetta barchetta added webserver backport Issues that are merged into a single branch, but missing in either master or previous release 4.x Version 4.x labels Sep 27, 2024
@barchetta barchetta added this to the 4.1.2 milestone Sep 27, 2024
@barchetta barchetta requested a review from spericas September 27, 2024 16:16
@barchetta barchetta self-assigned this Sep 27, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 27, 2024
@barchetta barchetta mentioned this pull request Sep 27, 2024
16 tasks
@barchetta barchetta merged commit fa7e684 into helidon-io:helidon-4.1.x Sep 27, 2024
44 checks passed
@barchetta barchetta deleted the 4.1.2-9224-sse branch January 3, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x backport Issues that are merged into a single branch, but missing in either master or previous release OCA Verified All contributors have signed the Oracle Contributor Agreement. webserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants