ring icon indicating copy to clipboard operation
ring copied to clipboard

HTTP2 support?

Open sabino opened this issue 6 years ago • 11 comments

Any plans for http2 support?

This fork has it https://github.com/sunng87/ring-jetty9-adapter

Is it possible to implement officially?

sabino avatar Jun 08 '18 02:06 sabino

You mean update the Jetty adapter? The only blocker is that Jetty tends to use the latest JVM versions, so updating Jetty means updating the minimum JVM version. And there are always third-party adapters that support HTTP/2 like the one you linked. Ring itself doesn't care if you're sending data through HTTP 1.0, 1.1 or 2.

weavejester avatar Jun 10 '18 01:06 weavejester

Hey @weavejester! Yes, the adapter, sorry about not specifying it.

The thing is that I've opened a PR on another project and got this response:

Hey @sabino, thanks for this PR. We're looking forward to enabling HTTP 2 support, but we'd rather wait until it's supported upstream by Ring instead of switching to an unofficial fork.

That's why I'm asking if there are any plans for HTTP2 support officially. Thank you!

sabino avatar Jun 11 '18 14:06 sabino

It likely won't be for a while yet, as supporting HTTP/2 through Jetty requires updating the minimum required JVM version. For obvious reasons, we'd like to support as many JVM versions for as long as we can.

weavejester avatar Jun 11 '18 14:06 weavejester

Any change on this issue now that Clojure 1.10 requires Java 8 as a minimum, and earlier versions are out of mainstream support?

pete23 avatar Jan 06 '19 14:01 pete23

Ring uses Jetty 9 now, so adding HTTP/2 support shouldn't be too much trouble.

weavejester avatar Jan 06 '19 15:01 weavejester

Do you have an image (spec?) how it should work?

valerauko avatar Nov 19 '19 14:11 valerauko

I'm afraid I don't understand the question.

weavejester avatar Nov 19 '19 14:11 weavejester

There are a bunch of concepts in HTTP/2 that currently don't have a standard "ring way" to express them. For example server push sounds like something that might need some changes to the request-map response-map model. Do you have ideas how to expose stuff like that in the ring api?

I'm thinking of implementing HTTP/2 support in my fork of Aleph, and if ring had a spec for HTTP/2 stuff I'd follow that to stay compatible.

valerauko avatar Nov 19 '19 14:11 valerauko

Adding HTTP/2 support to Ring's existing feature set shouldn't be too difficult, but adding support for new functionality like server push is something I haven't even begun to consider.

weavejester avatar Nov 19 '19 14:11 weavejester

@weavejester: Did HTTP/2 support happen, or are you planning to switch your focus to Ring 2.0?

kendagriff avatar Jan 26 '21 19:01 kendagriff

HTTP/2 support is part of Ring 2.0. However, other adapters can certainly implement it in the meantime, as least so far as the current Ring specification allows.

weavejester avatar Jan 27 '21 03:01 weavejester