RESTEasy 1.0.2.GA Released

Leave a comment

More bugs found by our users. See our release notes on 1.0.2.GA for more details.

Next release will be 1.1-RC1 beginning of March which will introduce client and server side interceptors. Client side “Browser” caching. Server side cache support. GZIP encoding support

RESTEasy 1.0.1.GA released, Minor Bug Fixes

2 Comments

Users found a few minor bugs with 1.0.GA.  See our release notes on 1.0.1.GA for more details.  Unless there is a critical bug reported, no releases until March.

Writing RESTFul Java Book

16 Comments

I’ve contracted with O’Reilly to write a “RESTFul Java” book about REST, Java, and JAX-RS.  Should be out sometime this summer.

RESTEasy 1.0.0.GA Released!

2 Comments

See more info on blogs.jboss.com.

RESTEasy 1.0-RC1 Released: Need help finalizing GA!

Leave a comment

RESTEasy 1.0-RC1 has just been released.  Please see our main project page and follow links to documentation and downloads.  Not much new functionality in this release.  After 77 days of waiting for Sun to allow us to download the JAX-RS TCK, I was able to pass all TCK tests after a fixing a few minor bugs.  1.0-RC1 reflects these changes.

Onward to 1.0 GA!

After a 2 week incubation of RC1, 1.0 GA will be released (sometime January 21st) and will be fully certified with Sun as a JAX-RS implementation.  I need your help finalizing the GA release! Specifically

  • I need existing RESTEasy users to upgrade and test their applications.
  • I need pointers on improving usability
  • Documentation improvements
  • Bugs reports and patches are always welcome too!

Since the window for the GA is only 2 weeks, there’s not a lot of features I can accomodate in the usability department, but I will try.

Mini-conference in Nice, France: RESTEasy/JAX-RS talk there

Leave a comment

Stéphane Epardaud, one of RESTEasy’s active users, is having a mini-conference/JUG in Nice, France on January 14th.  One of the talks is on RESTEasy and JAX-RS.  See his wiki for more details.

JAX-RS + Asynch HTTP

10 Comments

A RESTEasy user (and JBoss customer) asked about 6 weeks ago if we were planning on supporting Resteasy with Asynchronous HTTP.  For those of you not familiar with Asynchronous HTTP, take a look at Servlet 3.0, Tomcat Comet APIs, or Jetty’s continuations.  I decided to add some limited support after doing some research.

The primary (and IMO, the only) usecase for Asynchronous HTTP is in the case where the client is polling the server for a delayed response.  The usual example is an AJAX chat client where you want to push/pull from both the client and the server.  These scenarios have the client blocking a long time on the server’s socket waiting for a new message.  What happens in synchronous HTTP is that you end up having a thread consumed per client connection.  This eats up memory and valuable thread resources.  No such a big deal in 90% of applications, but when you start getting a lot of concurrent clients that are blocking like this, there’s a lot of wasted resources.

As for Resteasy and asynchronous HTTP, I don’t want to create a COMET server.  Maybe I’m totally wrong, but it seems that the idea of COMET is to use HTTP solely for the purpose of initiating a dedicated socket connection to your server.  After the initial connection is made, the client and server just tunnel their own message protocol across the socket for any number of requests.

Now, this isn’t necessarily a bad idea.  Its actually a good one for performance reasons.  As a JBossian David Lloyd explained to me in private email, what this API allows you to do is create a direct connection to your service so that you don’t have to redispatch with every message that is exchange from the client and server.  Sure, HTTP Keep Alive allows you to avoid re-establishing the socket connection, but you don’t have to worry about all the other path routing logic to get the message to the Java object that services the request.

Still, this is something I don’t want or need to provide through RESTEasy.  Its really using HTTP to tunnel a new protocol and something that is very unRESTful to me.  Basically it requires that the client knows how to communicate the COMET protocol, which IMO, makes ubiquity very hard.  Besidesk, Tomcat, JBoss Web, and Jetty will probably do a fine job here.  There are also already a number of COMET servers available on the web.  No, I will focus on giving asynchronous HTTP features to a pure HTTP and JAX-RS request.

What I will initially provide through RESTEasy is a very simple callback API.

@Path("/myresource")
@GET
public void getMyResource(@Suspend AsynchronousResponse response) {

   ... hand of response to another thread ...
}

public interface AsynchronousResponse {

   void setResponse(javax.ws.rs.core.Response response);

}

The @Suspend annotation tells Resteasy that the HTTP request/response should be detached from the currently executing thread and that the current thread should not try to automaticaly process the response.  The AsynchronousResponse is the callback object.  It is injected into the method by Resteasy.  Application code hands off the AsynchronousResponse to a different thread for processing.  The act of calling setResponse() will cause a response to be sent back to the client and will also terminate the HTTP request.

Servlet 3.0 has asynchronou APIs.  When you suspend a request, the request may be redelivered when a timeout occurs.  I don’t want to have a Resteasy replacement for these APIs.  What I want is something that complements these APIs and makes a specific usecase easier to write.  The use case I want to solve is detaching the processing of an HTTP response from the current thread of execution so that another thread can do the work when ready.  That’s it.  So, there will be no redelivery of a request.

Initially I plan to work with the asynchronous apis within the Tomcat 6.0 NIO transport as this is what is distributed with JBoss 4.2.3.  Next I plan to work with the JBoss Web asynchronous apis, then Jetty 6, then finally with a Servlet 3.0 implementation.

If you have any ideas on this subject, please let me know.  I can work them into the prototype I’m developing.

Newer Entries