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

Drop support for server push #538

Closed
markt-asf opened this issue Aug 9, 2023 · 13 comments
Closed

Drop support for server push #538

markt-asf opened this issue Aug 9, 2023 · 13 comments

Comments

@markt-asf
Copy link
Contributor

Given that Chrome has dropped support for server push I'd like to propose the following:

  • deprecate HttpServletRequest.newPushBuilder()
  • deprecate HttpServletRequestWrapper.newPushBuilder()
  • deprecate PushBuilder
  • document that newPushBuilder() always returns null

Remove the deprecated methods in Servlet 7.0

@arjantijms
Copy link
Contributor

Some discussion around the removal of push in Chrome: https://reddit.com/r/programming/comments/wrsu94/removing_http2_server_push_from_chrome/?sort=top

@gregw
Copy link
Contributor

gregw commented Aug 13, 2023 via email

@stuartwdouglas
Copy link
Contributor

I wonder if people have been using this for non-browser based clients, even though this was fairly useless for browsers you could use it as the basis for a bi-directional RPC framework.

I don't know of anyone actually doing this, but maybe we should be a bit more cautious about deprecating this.

@markt-asf
Copy link
Contributor Author

@gregw I'd be fine with deprecated and optional (i.e. may always return null) but note that that will still require an update to the TCK (which I'm fine with making).

@stuartwdouglas I'll ask at the IETF what usages folks are aware of but my impression from a quickish scan of the archives is that server push achieved very low levels of adoption. Would you be OK with deprecation and may always return null? In the unlikely event there turns out to be some critical usage of server push and we want to keep it, we can always remove the deprecation.

@gregw
Copy link
Contributor

gregw commented Aug 15, 2023 via email

@markt-asf
Copy link
Contributor Author

+1 to including support for early hints in the Servlet API. An explicit sendEarlyHints() method?

@gregw
Copy link
Contributor

gregw commented Aug 15, 2023 via email

@stuartwdouglas
Copy link
Contributor

I am fine with deprecation. If lots of people complain we can revisit but I think it will be fine.

@markt-asf
Copy link
Contributor Author

How about this for a plan then:

  • create a PR to deprecate server push with the Javadoc updated to indicate that newPushBuilder() may return null if the server has opted not to support push
  • create a new issue to discuss generic support for 1xx responses and early hints in particular

@gregw
Copy link
Contributor

gregw commented Aug 16, 2023 via email

@pmd1nh
Copy link

pmd1nh commented Feb 23, 2024

Hi,

I posted this in servlet-dev but bring it here to for attention

Hi,

For the Servlet 6.1 HTTP/2 push support,

[Fix #538 - Make HTTP/2 push support optional · jakartaee/servlet@8363ed3 · GitHub](https://github.com/jakartaee/servlet/commit/8363ed338e6875f4e095b6cef8d9571f2fade82d)

Can the API doc remove the last sentence?

"Note that some implementations may opt not to support server push and will therefore always return {@code null} "

That sentence seems to suggest making an optional feature not deprecating.

The Jakarta Spec has tried to stop component specs from saying that a Deprecated API may or may not be implemented.

Regards,

Thanks,

@markt-asf

@pmd1nh
Copy link

pmd1nh commented Feb 26, 2024

Reopen this issue

https://jakarta.ee/committees/specification/versioning/

Component Feature

Changes to Component features follow this versioning strategy:

    Major version change - removal of an optional or mandatory feature, or the transition of an existing mandatory feature to being an optional one.

@pmd1nh pmd1nh reopened this Feb 26, 2024
@markt-asf
Copy link
Contributor Author

The feature has been deprecated and will be removed in a future release.

The possibility of returning null has always existed if "the current connection does not support server push". The final sentence is just making it explicit that one of the reasons the connection might not support it, it that it is not implemented at all.

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

No branches or pull requests

5 participants