Friday Jul 31, 2015

Servlet 4 Early Draft Needs You!

HTTP/2 support via Servlet 4 is one of the most significant changes coming in Java EE 8. The Servlet 4 specification is now gearing up for it's first early draft. The intent is to publish the early draft by JavaOne 2015. If you have an interest in Servlet 4, this is a perfect time to get involved in helping shape the draft. The two items specification lead Ed Burns has in his mind at the bare minimum for inclusion into the early draft includes:

  • Support for HTTP/2 server push.
  • A decision to pursue or deliberately ignore the Reactive Streams concept.
  • Any open issues on the mailing list at the moment.
There are many ways for you to get involved as always. You are always welcome to join the expert group proper via the JCP page for the specification. You can always simply join the discussion by subscribing to the Servlet 4 specification user alias. If you would rather participate as a group through your JUG you can do that easily via Adopt-a-JSR.

Thursday Jun 25, 2015

HTTP/2 and Server Push

HTTP/2, which has been finalized a few weeks ago, is composed of 2 related specifications: RFC 7540 and RFC 7541 (see below). With HTTP/2, the existing HTTP 1.1 semantics are fully preserved as this new version of HTTP aims to be as compatible as possible with current uses of HTTP. The main goal of HTTP/2 is to provide a more efficient use of the network resources and, at the same time, to reduce the overall latency. So the fundamental difference between HTTP/2 and HTTP/1.1 is really at the transport level, i.e. how the bits are exchanged over the network. And that is what HTTP/2's new binary-framed protocol is all about.

HTTP/2 relies on the existing HTTP/1.1 semantics, we keep using the same HTTP verbs (GET, PUT, POST, etc.), the same HTTP status codes and so on. So from a Server-side Java developer perspective nothing should really change. Running an existing application over a HTTP/2 stack should be transparent. We obviously could expect to see improvements at the wire level. That means that most of the HTTP/2 capabilities should not be exposed at the Servlet API level. But there are few exceptions to this rule and Server Push is one the important new HTTP/2 feature that should ideally be made available to the developer.

Server Push is a new HTTP/2 feature that allows a server to proactively 'push' multiple unsolicited resources as a response(s) of a regular client request. And since a server-side application knows what resources are needed to render a particular page, this capability basically let an application to pro-actively push resources needed by a client... before the client even knows that it will need those resources.

The Servlet 4.0 Expert Group now needs to figure out how this Server Push capability should be exposed at the API level. One of the possibilities might be inspired from Greg Wilkins's proposal based on Jetty 9.3's PushBuilder API (see here). Greg is an active Servlet EG member and is the original Jetty developer, he started to develop Jetty 20 years ago using Java 0.9! So happy 20th birthday to Jetty as well!

Useful resources:

Tuesday Jan 20, 2015

Heads Up on Java EE @ DevNexus 2015!

DevNexus 2015 will be held on March 10-12 in Atlanta. If you are a US based developer and do not know about DevNexus, you are definitely missing out. DevNexus was started a few years ago as an initiative by the Atlanta Java User Group (now one of the largest Java user groups in the world) and Burr Sutter (one of the earliest Java champions). Since then DevNexus has grown to become one of the largest Java leaning conferences in the US, perhaps second only to JavaOne. I've spoken at the conference a few times over the years. This year's roster is unsurprisingly impressive both in terms of speakers and content. Java EE has a strong showing including a few talks from me.

Below are the talks that might interest you if you are a Java EE fan (the schedule is not quite final yet so do stay tuned to the conference agenda for changes):

  • Down and Dirty with Java EE 7: This is essentially our flagship lab/workshop at the moment covering Java EE 7. It has always proven popular so far and it is a great way to get some hands-on experience with Java EE 7. The materials for the lab is always available here. The lab is largely intended to be self-guided so you should be able to take advantage of the material even if you can't attend the lab in person. This will be my first talk at the conference.
  • JMS.Next(): JMS 2.0 and Beyond: This is essentially an overview of JMS 2 (already in Java EE 7), with a bit of an early preview of JMS 2.1 (to be included in Java EE 8). The slides for the talk are available here. This will be my second talk at the conference.
  • Java Persistence API: This session is a good mix of the basics, best practices and real world adoption stories for JPA. It's a talk by Jason Porter. Jason is a good speaker, a long time Java EE advocate and a Red Hat engineer.
  • HTTP 2.0 comes to Java. What Servlet 4.0 means to you: This session will discuss what's in HTTP 2 and what that means for the next major revision of the foundational Servlet specification. I would say this is a must-attend for all server-side Java developers. My friend, colleague and Servlet specification lead Ed Burns is giving this talk. Ed is a brilliant speaker that's always a pleasure to listen to.
  • Java EE 8: A Community Update: This is essentially a high level overview of what's coming in Java EE 8. This should be my last talk at the conference. Besides covering the current state of Java EE 8 I will also talk about how you can get involved in the process including through highly inclusive programs like Adopt-a-JSR. The slides for the talk are here.

Hope to see you at the conference? Besides giving my talks I will be attending a few talks myself as time allows. As always never hesitate to stop me if there is something I can help with. I'll also bring along some Java/Java EE goodies you are welcome to.

Thursday Oct 30, 2014

JavaOne Replay: 'HTTP/2 and Servlet 4' by Ed Burns and Shing Wai Chan

The main focus of Servlet 4 (JSR 369) is to introduce HTTP/2 support into the Java EE Platform. During their JavaOne session, Ed Burns and Shing Wai Chan, the 2 Servlet 4 Specification Leads, gave a good introduction to HTTP/2 and its main features.

Ed and Shing Wai started by explaining some of the HTTP 1.1 limitations we are facing such as Head-of-Line Blocking and how we have all been trying to work-around some of those issues.

They then explained HTTP/2 main features (Binary Framing, Stream Multiplexing and Prioritisation, Server Push, etc.) and how those will solve the HTTP 1.1 limitations.

Some of those new HTTP/2 enhancements are optimisations that are fully transparent to the upper layers (e.g. Stream Multiplexing, Header Compression) but some of those new capabilities might improve applications that are able to exploit them (e.g. Server Push). Ed and Shing Wai showed how the Servlet 4 API might expose some of those capabilities to the developer.

The session was finally concluded with an overview of the HTTP/2 plans for Java SE 9.

Even if you are not really focused on the Web tier, this session is a good HTTP/2 introduction and given the importance of HTTP (and soon HTTP/2), this information should be valuable to your general (IT) knowledge!

You can get the slides here.

Tuesday Sep 02, 2014

Greg Wilkins' Jetty/Servlet Sessions at JavaOne 2014

For the Java EE track at JavaOne 2014 we are highlighting some key sessions and speakers to better inform you of what you can expect, right up until the start of the conference.

To this end we recently interviewed Greg Wilkins. Greg is the mastermind behind Jetty and a long-time key contributor to the JCP, particularly for the foundational Servlet specification. In fact Greg is likely to be instrumental in the upcoming Servlet 4 specification slated to be included in Java EE 8. He will likely be the only person in the Servlet 4 expert group that is also part of the IETF HTTP 2 working group. We wanted to talk to Greg about his Jetty/Servlet sessions at JavaOne 2014 and HTTP 2 generally:

Greg has several sessions on the track that he talked about:

  • Jetty Features: In his open-ended Birds-of-a-Feather session, Greg will share the latest features added and to be considered in Jetty.
  • Into the Wild with Servlet Async IO: In this deeply technical session, Greg will be exploring the ins-and-outs of the Servlet 3.1 asynchronous I/O feature. If this is a topic that interests you, the session is probably your best opportunity to gain knowledge from a true subject matter expert.

Bear in mind, Oracle's own Ed Burns will have a detailed session on Servlet 4/HTTP 2. Besides Greg's sessions, we have a very strong program for the Java EE track and JavaOne overall - just explore the content catalog. If you can't make it, you can be assured that we will make key content available after the conference just as we have always done.

Monday Aug 18, 2014

Ed Burns' Servlet 4/HTTP 2 Session at JavaOne 2014

For the Java EE track at JavaOne 2014 we are highlighting some key sessions and speakers to better inform you of what you can expect, right up until the start of the conference.

To this end we recently interviewed Ed Burns. Ed is a veteran of Sun and now Oracle. He has been and is instrumental in pushing the JSF ecosystem forward as specification lead. Besides his specification lead work Ed is well regarded as an author and speaker on his own right. In addition to carrying the JSF torch Ed will be co-leading the key Servlet 4 specification for Java EE 8, along with Servlet specification guru Shing Wai Chan. The primary goal of Servlet 4 is to enable the fundamentally important changes in HTTP 2 for the entire server-side Java ecosystem. We wanted to talk to Ed about his Servlet 4 session at JavaOne 2014 and HTTP 2 generally:

The details for the Servlet 4 session can be found here. Ed has several other key sessions on the track that we hope to talk to him about separately in the near future:

  • What’s Next for JSF?: In this key session, Ed will be sharing the next steps for the continued evolution of the JSF specification in Java EE 8.
  • Where’s My UI? The 2014 JavaOne Web App UI Smackdown: The UI space for web applications, especially in the Java ecosystem continues to be as hotly contested as ever. This is especially true with the (re)introduction of JavaScript based rich client frameworks like AngularJS. This lively panel brings together experts representing the diverse schools of thought for web UIs. Ed will be representing JSF of course. Neal Ford will moderate the panel as an independent and hopefully reasonably neutral party.
  • Adopt-a-JSR for Java EE 7 and Java EE 8: Adopt-a-JSR has been a reasonable success for Java EE 7. With Java EE 8 we are planning to strengthen it far more as away of getting grassroots level participation in the specification efforts. This session will introduce Adopt-a-JSR, share how it worked for Java EE 7 and what we plan to do with it in Java EE 8. Ed will be sharing his perspectives on Adopt-a-JSR for both Java EE 7 and Java EE 8.

Besides Ed's sessions, we have a very strong program for the Java EE track and JavaOne overall - just explore the content catalog. If you can't make it, you can be assured that we will make key content available after the conference just as we have always done.

Thursday Jul 24, 2014

Servlet 4.0

The Servlet API is one of the most used API, if not the most used API of the Java EE Platform! It was revised for Java EE 7, Servlet 3.1 (JSR 340) added quite some new capabilities such as support for the HTTP 1.1 upgrade mechanism (required for supporting WebSocket for example), non-blocking asynchronous IO, various security related improvements and so on. Shing Wai Chan (Spec Lead of Servlet 3.1) has just posted a draft proposal for the Servlet 4.0 JSR.

Moving from 3.1 to 4.0 clearly means that this will be a major revision of the Servlet specification and it has a key theme, i.e. HTTP/2. It will be the first new version of the HTTP protocol since the current version (HTTP 1.1) which was standardized ... end of the last century (RFC 2616)! HTTP/2 will bring many improvements over HTTP/1.x. In his draft proposal, Shing Wai lists the HTPP/2 features that he expects to be exposed by the Servlet 4.0 API:

  • Request/Response multiplexing
  • Stream Prioritization
  • Server Push
  • Upgrade from HTTP 1.1 

HTTP 1.x is a fairly simple request/response protocol. Things will probably change with HTTP/2 multiplexing capabilities, so some of the paradigms we know since years will have to evolve too! And since it is not a small task to drive a major evolution of such an important API, Ed Burns will help Shing Wai and will co-lead this JSR with him.

HTTP/2 will be the key theme of Servlet 4.0 but the Expert Group will probably tackle additional capabilities.

In terms of timing, we expect Java EE 8 to support Servlet 4.0 but there is a constraint: HTTP/2 itself! At this stage, HTTP/2 is still in active development. It is however expected to be completed well in advance of the completion date of Java EE 8. In his proposal Shing Way explains why it is now relatively safe to consider adding HTTP/2 support to the Servlet API.

So make sure to check the Servlet 4.0 draft JSR proposal and give your feedback before the proposal is submitted to the JCP.

PS: you can now follow @Servlet_Spec on Twitter! 
PPS: feedback can be sent to the Servlet Spec User mailing list (registration is only required to post to the list, not to read it)