JSR 311 approved for development

As reported by Eduardo Pelegri-Llopart, the JSR 311 was approved by the JCP Executive Committee for development. The results of the vote are also available here. Following a request from Apache, the name of the JSR is now “Java API for RESTful Web Services”.

You can check a comprehensive list of posts following the initial announce on my updated blog post. There is a clear interest from the community for such an API. Some voiced concerns about the JCP process, others about the idea of starting with a higher level API before providing a solid lower level API as a foundation. Some don’t want annotations to abstract the supposed complexity of HTTP when others are afraid that the API won’t be simple enough.

In general, people seem to be positive and supportive of the initiative. The expert group now has an important task in its hands. I hope we will be able to work as closely as possible with the rest of the community to gain a constant feed-back and produce a great and widely accepted API!

New JSR to define a high-level REST API for Java

As the Java community is increasingly using REST to develop their Web applications, Sun Microsystems is proposing to specify a high-level REST API for Java. If accepted for development by the JCP Executive Comitee, this JSR#311 will formalize as a set of Java 5 annotations to facilitate the exposition of Java objects as REST resources.

These annotations will provide a high-level REST API that will be supported by lower-level APIs.

The JSR expert group will be led by Marc Hadley and Paul Sandoz from Sun. Marc is the author of WADL (Web Application Description Language), a RESTful alternative to WSDL. As the lead of the Restlet project, I was invited to be part of the initial expert group for this JSR. I am looking forward to work with other experts and with anyone interested to see a better support for REST in Java.

There is one related effort named JRA (Java REST Annotations) that I am aware of. That will be one source of inspiration. Personnally, I’m hoping it will promote a deeper mapping to REST, covering the following requirements:

  • Doesn”t impose any constraint on resource URIs structure.
  • Support dynamic URIs based on the URI Template draft.
  • Support all HTTP methods as well as extensions like in WebDAV.
  • Support all media types and not just XML.
  • Support multiple representations of the same resource.
  • Fully embrace the resource-oriented design paradigm.

[Update 1] Another related effort I would like to mention is Sommer, led by Henry Story, which provides a mapping (via annotations) between Java objects and RDF graphs. RDF means Resource Description Framework and is the core specification of the Semantic Web. It formally describes resources (in the REST sense), their URIs and their relationships.

[Update 2] A related thread was started in the REST discussion list.

[Update 3] More links about the announce:

[Update 4] Interesting insights from Andrew S. Townley (anterior to JSR announcement)

[Update 5] The JAX-RS extension for Restlet has been added to release 1.1 M3. See the announcement and the documentation about the extension.

Will we reconcile REST, WS-* and SOA?

Even though REST was only formalized in 2000, it is fundamentally based on the Web architecture and its core standards: HTTP and URI. At the same time, efforts to port on the Web older technologies such as CORBA, RMI and DCOM resulted in the specification of SOAP, WSDL and soon after of a full stack of interrelated standards commonly known as WS-*.

While adopting the “Web Services” name as an umbrella for their specification efforts, WS-* proponents didn’t initially realize that they were actually porting an older “remote procedure call” paradigm on top of the Web. But, the Web was already a proven distributed system, based on a set of standards and an informal architecture. Thanks to the amazing work of Roy T. Fielding and a core group of REST proponents (often named RESTafarians) like Mark Baker and Paul Prescod (check this recent interview), the mismatch between both approaches became progressively evident.

This tension, often described as a battle, was in fact fruitful to both sides. The WS-* proponents realized that their approach brought in too much complexity, leading to inextricable interoperability issues (as an illustration, see this video from Simon Guest, a product manager at Microsoft). The REST proponents, within an active community, progressively built a common body of best practices and dedicated tools.

It seems to me that, like in 2000, we are at a cross-road. Hopefully, 2007 will be the year of reconciliation between both camps. REST proponents would understand and start to address more complex enterprise needs, like integration through business processes and provide more concrete guidance on REST usage and better tooling support. WS-* proponents would finally consider REST as the foundation of their architecture and would slowly refactor their stack of specifications into of simpler and coherent set. Everyone would benefit, first by stopping the waste of energy in endless pro/con arguments. REST would become a respected part of the SOA industry and WS-* would be respected as a real and usable Web Services platform.

The W3C members part of the Architecture Domain will meet at the end of February for a workshop on the Web of Services for Enterprise Computing. Looking at the position papers from Mark Baker, BEA, IBM, Iona, Progress Software or Yahoo!, it seems that the whole industry is finally going back on a more sensible track.

Update 1:

Update 2:

  • The presentations slides are now also available online
  • Eric Newcomer (Iona) has a nice two parts summary of the event! (part 1, part 2)
  • Paul Downey (BT), Paul Sandoz (Sun), Pete Lacey and Johnathan Marsh (WSO2) have also reported back
  • Dave Orchard also reported and talks about some ways of reconciling REST and WS-*, namely usage of WADL to formally describe REST applications and a new SOAP binding for HTTP/URI/XML that would be consumable by REST clients. That sounds like very useful propositions to me.

Update 3: