Skip to main content

HTTP/2 and Java

Posted by edburns on July 29, 2014 at 3:24 PM PDT

As my colleague and co-spec lead Shing-Wai Chan announced last week, Oracle is getting ready to start JCP work on Servlet 4.0, including support for HTTP/2. While this JSR hasn't officially started, there are two undergoing efforts for HTTP/2 in Java that I'd like to bring to your attention.

The first is from long-time Servlet EG member Greg Wilkins, who we all know as the man behind Jetty. Greg is also on the IETF httpbis working group. Greg's credentials for being on the httpbis WG include his implementation of the most recent version of the HTTP/2 specification in the latest versions of Jetty. I look forward to bringing Greg's experience to bear on exposing the important features of HTTP/2 to users of the Servlet API.

The other effort is one you probably don't know about: the new HTTP 2 client in Java SE. For over 17 years java.net.HttpUrlConnection has been the face of HTTP in Java SE. All that is about to change in Java SE 9 with the implementation of JEP 110: HTTP 2 Client. This work is being done under the umbrella JSR for Java SE 9. That mean's the java community is welcome to weigh in and contribute ideas. You can start out with the net-dev mailing list on openjdk. Shing-Wai and I are staying in touch with the development team behind JEP 110 and will very likely be re-using some code in the implementation of Servlet 4.0.

Stay tuned for more developments on this exciting new area of the Internet.

Related Topics >>

Comments

There is also a JEP for Application Layer Protocol ...

There is also a JEP for Application Layer Protocol Negotiation (ALPN) in Java SE 9: < https://bugs.openjdk.java.net/browse/JDK-8051498 >.

Does anybody actually use java.net.HttpUrlConnection? My ...

Does anybody actually use java.net.HttpUrlConnection? My impression is that it's one of those JDK anti-classes that are ridden with bugs and can only be globally "configured" with system properties. I thought everybody just uses Apache HTTP client.

Apache HTTP client to me is the poster child for all the ...

Apache HTTP client to me is the poster child for all the things that can go wrong in Java.

Every time I want to use the library it is like trying to read a novel to do something that should be simple. I become very envious of python/requests where an HTTP GET/PUT/DELETE is blunt simple.

It might be that I do not have the correct examples... Apache HTTP gives me the willies.