Cartoon presents Restlet

November 25, 2008

Posted by Jerome Louvel in : Java, REST, Restlet, Restlet General - no comment

On the 4th of November, I presented a session on REST, Restlet and our port to GWT at the local JUG (Paris Java User Group). More than 200 juggers attended, with a first part on GWT presented by Didier Girard, from onGWT.

Eric Le Merdy, from Valtech, very creatively illustrated the presentation. Here is our first Restlet cartoon!


Thanks to Antonio Goncalves, David Dewalle and Zouheir Cad, the co-founders of Paris JUG for organizing this event. Keep up the fun, the passion and the professionalism!

Here are additional links about the event (all in French):

Web 2.0 forms with frevvo

March 26, 2007

Posted by Jerome Louvel in : Java, Restlet General, User interface, XML - no comment

I would like to encourage you to have a look at frevvo, a Web start-up launched by some friends, that provides a full solution to handle complex Web 2.0 forms, right from your browser. One of their strong selling points is the great form designer available as a Web application (AJAX based).

Also, the form can be directly mapped to an XML Schema that you have imported. Their server component will directly generate valid XML instances when you submit the form to it. Currently it is based on a Servlet container but they are experimenting with Restlet (and already provided key feed-back), so I’m hoping that they will migrate when our final 1.0 version comes out ;)

You can see screenshots and sign up for a live test. Congratulations Ashish, Leandro, Nancy and Yuri, and keep up the great work!!

JSR 311 approved for development

February 28, 2007

Posted by Jerome Louvel in : Java, JSR 311, Restlet General - no comment

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

February 14, 2007

Posted by Jerome Louvel in : Java, JSR 311, Restlet General - no comment

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.

Interview of Tim Bray on Ruby, Rails, REST, XML, Java

October 12, 2006

Posted by Jerome Louvel in : Java, Rails, REST, Ruby, Semantic Web, XML - no comment

InfoQ has done a great interview from Tim Bray (director of Web Technologies at Sun Microsystems, co-inventor of XML). He has a pleasing, enthusiastic and frank tone, which we tend to miss in the Java community. There is also a transcript available. Highly recommended.

Predicting the rise of lightweight REST in Java

July 20, 2006

Posted by Jerome Louvel in : Java, Restlet General - no comment

In a previous post, I tried to answer to this question: “Will Java EE 5 bring REST to Java”. On one hand I felt happy with the adoption of some REST concepts within Java EE 5 and its first coverage at a JavaOne conference. On the other hand, the current attempt to retrofit REST into the existing JAX-WS stack seems like a dead end to me.

However, I missed an interesting quote from Tim Bray, the director of Web technologies at Sun Microsystems. While asked for prognostications for Java’s short-term future at the end of 2006 Java Technology Roundtable, he replied:

“I would say that by this time next year there will be increasingly widespread perception that the stack of standards around WS-* has largely failed, and anybody who puts significant tooling and resources, significant energy and investment, into tooling and tools around lightweight, REST-flavored Web services is going to look like a major genius.” Reported by FTP Online. Update: see also this interview where Tim Bray explains his views on SOA, POX and REST.

I do hope that this prediction will come true and that Sun will fully embrace this lightweight REST vision within Java EE 6. We are already working toward this goal with our Restlet project, with a first 1.0 release scheduled for 2006Q4. As detailed in our road map document, we will continue pushing for the adoption of REST and its standardization within the Java community. This should become concrete in 2007 by a submission of the Restlet API to the JCP (Java Community Process).

If you also wish that Tim Bray’s prediction comes true for the next Java One, here are some suggestions on how you could help:

  • Create a modelling tool to design RESTful applications. Stefan Tilkov has an interesting proposition on Resource-oriented Design and how to visually represent resources and their URIs.
  • Write a book on REST and how to design and develop RESTful web services in Java. Dave Johnson, from Sun, has just published a book on RSS and Atom that contains a chapter on the Atom protocol which is an excellent example of RESTful design.
  • Contribute to the Restlet project with comments, ideas, bug reports, testing, code contributions, documentation. See the list of open issues.
  • Discuss and blog about REST and how it can help you build better and more Web-centric applications in Java. Manohar Viswanathan has just wrote a nice post on “Developing RESTful Web Services in Java”. He’s illustrating it with an example showing the integration of Restlet, Spring and Tomcat.

If you also think that REST deserves a better place in Java, asks to yourself how you can contribute and do it!

Update: In an interview with Paul Krill of InfoWorld, Robert Brewin, co-CTO of software at Sun Microsystems, has confirmed Tim Bray’s vision that lightweight REST Web Services and Web 2.0 in general are getting a higher priority than ever for Sun.

Java Browser Edition

July 6, 2006

Posted by Jerome Louvel in : Java - no comment

I’ve been wondering for years about the reasons of Java’s failure in the Web browsers. Initially, we thought that it was due to Java performance and that improvements in the JVM (JIT, hostspot), faster processor and larger memories would finally allow Java Applets to live up to their promises.

Unfortunately, we were wrong again. As Java evolved, the JRE became larger and larger. In addition numerous integration issues came up which caused some installation and upgrade nightmares. Of course, Microsoft didn’t help in this area, shipping by default an older and non standard JVM with Windows.

There was a recent poll at on “What’s wrong with applets?” and the results are no surprise: more than 24% thought that it is “too hard to deploy”. Some comments specifically complain about the JRE size, the slow start-up and the unstable integration with some browsers.

But there’s hope, especially because we are at the start of a new wave of Rich Internet Applications with AJAX, Flash/Flex and XUL being the serious contenders. Microsoft also appear to have some competitive technology in Vista.

Is it definitely lost for Java or do we have a chance to catch up? Well, while discussing this topic with friends at the OSSGTP (Open Source Software Get Together Paris), I did some research and found interesting things:

  1. Ethan Nicholas, while working at Yahoo! came to similar conclusion and posted an excellent note in his blog. His note received many comments and much attention around the Web: see here and hear there.
  2. Back in 2001, a request for enhancement was filed in Java’s bug database, asking for a modular JRE. The issue was marked as a duplicate of another issue which unfortunately is invisible to the public.
  3. The JCP is working on a Java Module JSR (#277) which will provide a much needed upgrade to JAR file, addressing issues such as versioning, dependencies or remote update. Stanley Ho, the JSR spec lead, has more info about this effort, see his slides from JavaOne 2006.

The good news:

  1. Ethan was recently hired by Sun! Congrats Ethan and good luck in this new endeavour.
  2. Java 7 (Mustang) will include the new Java Module technology specified by the JSR 277.

It seems that Sun has all the elements for a good solution in its hands. Hopefully, we’ll see a modularized Java Runtime Edition 7.0 with a companion Java Browser Edition 7.0 coming out of Sun’s labs!

Atom and Restlets

April 11, 2006

Posted by Jerome Louvel in : Java, Restlet General, XML - no comment

I’ve recently met Henry Story who is working for Sun Microsystems on many interesting technologies such as the Semantic Web and the Atom syndication standard. After reviewing the Restlet project, he was kind enough to publish a note about it on his blog: Restlets, the next thing after servlets?

This note started an interesting discussion between Henry, Dave Johnson (author of a book titled “RSS and Atom in action”) and myself which led to the idea of demonstrating the capabilities of Restlets by implementing an Atom publishing client.

Atom is a new syndication standard that aims to overcome the limitations of the RSS 2.0 standard. The first part is the Atom XML-based document format which was released in version 1.0 in December 2005. The second part is the Atom Publication Protocol which allows the remote edition of syndication sources and that is the best application of REST I’ve seen so far.

As a result, an Atom extension was recently added to the Noelios Restlet Engine. It should be a useful basis to write Atom client and server applications, for example to programmatically subscribe to blogs. In addition, it is a good example on how to implement RESTful applications using Restlets.

Swing is alive…and doing well

January 3, 2006

Posted by Jerome Louvel in : Java, User interface - no comment

Have you noticed all the recent pessimism around Java and the hype pushing concurrent platforms like Ruby on Rails? A domain which frequently receives critics is the Swing GUI framework, supposed to be old, slow and badly designed. I’ve worked with it since the beta releases and still follow its evolution closely.

The release of Tiger (Java 5.0) provided a much needed update of the look and feels, the default one and the Windows XP one ; speed was also significantly improved. Meanwhile the concurrent SWT framework was aggressively pushed via the Eclipse platform. This pressure was probably needed to provoke a strong reaction and it seems to me that Mustang (Java 6.0) will hold on its promises.

Take a look at the 160 slides long presentation by Romain Guy and Alexis Moussine-Pouchkine (in English except for the first two slides). It’s comprehensive and truly exciting: congratulations! Here are some interesting facts:

  • The size of the JRE 1.5 is 7.1 MB and the size of the .NET Framework 2.0 is 23 MB
  • Better desktop integration (icons, Windows system tray, Mac dock integration, slash screens)
  • Perfect native look and feels. Also see directory.
  • SwingLabs hosts several interesting projects like the standard SwingX components suite (date picker, login panel, table improvements like column selection, sorting, task panel similar to Windows explorer panels, etc.)
  • Great third-party components complete the features like JFreeChart, JGraph, JGoodies. Also see directory.

That’s great to see a strong and active community around GUI frameworks in Java (see Java Desktop and Client Java) and that Swing is alive…and doing well.

Java services on Linux

December 15, 2005

Posted by Jerome Louvel in : Java, Linux - no comment

After spending quite a bit of time today figuring out how to properly register a Java-based server as a Linux service on Debian Sarge, I thought I would share the results of my findings. My requirements were:

  1. Automatically start, stop and restart
  2. Cleanly integrate with other system services
  3. Run the Java processes under a non-root user

Here is the script template that can be added to /etc/init.d :

#! /bin/sh
# -----------------------------------
# Initscript for the ...
# -----------------------------------
# This controls the ...
# Author:	Jerome Louvel .
# Version:	@(#)daemon  1.0  16-Dec-2005  ...@...

set -e

DESC="My daemon"

MAIN="...main class..."
ARGS="...main arguments..."

DAEMON="/usr/bin/java -server -cp $CP -Djava.awt.headless=true $MAIN $ARGS"

# Gracefully exit if the package has been removed.
test -x /usr/bin/java || exit 0

# ---------------------------------------
# Function that starts the daemon/service
# ---------------------------------------
su -p -s /bin/sh - $USER "$DAEMON &> /dev/null & echo $!" > $PIDFILE

# --------------------------------------
# Function that stops the daemon/service
# --------------------------------------
start-stop-daemon --stop --quiet --pidfile $PIDFILE

case "$1" in
echo -n "Starting $DESC: $NAME"
echo "."
echo -n "Stopping $DESC: $NAME"
echo "."
echo -n "Restarting $DESC: $NAME"
sleep 1
echo "."
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1

exit 0

Here are the related resources I found:

Update: the script was modified from the initial post to follow more closely the /etc/init.d/skeleton script provided with Debian.