Blog

  • Jetty @ EclipseRT

    The jetty @ eclipse project is now in incubation at the eclipse foundation as part of the EclipseRT runtime project. On Tuesday 24th March, the Jetty-7 code base was converted to org.eclipse.jetty package space and checked  into the eclipse jetty svn repository!!!

    What is changing?

    It is only the core components of Jetty that are moving to eclipse. The project will also remain at codehaus and it will be at codehaus the the jetty@eclipse components are packaged into distributions of an application server, potentionally mixing in other OS projects (eg. cometd.org, Atomikos JTA and activeMQ JMS).   Thus Jetty will be able to be consumed as components from either maven or eclipse repositories, or as a complete product from codehaus downloads.

    Some components previously built and released with Jetty are being spun out to their own projects or at least modules with their own release cycles.  The cometd implementation has already moved from the contrib repository to the cometd.org project of the Dojo Foundation.

    Jetty will remain apache 2.0 licensed, but the ECL will be added as a dual license so that Jetty may be used and distributed under the terms of either.

    Why the change?

    The move to eclipse was motivated for a variety of reasons that affect all parties concerned:

    Good for Jetty:

    New Ideas and Requirements

    Change is good! It prevents a project from becoming static and complacent. Exposing jetty to new communities, new requirements and new environments will give us an opportunity to continue to improve jetty or validate that it is still relevant and well targeted.

    Improved process

    The eclipse foundation offers jetty improved processes for building and distributing components. The improvements are both legal and technical. Legally, The IP status of Jetty will be greatly improved by the rigour of the eclipse contribution processes. Technically, the eclipse packaging processes have highlighted a number of issues:

    • Too much software was included in each jetty release. Every release was releasing everything from utility libraries and protocol engines, through the servlet container and to specific servlets frameworks like cometd. Many of these components need their own release lifecycles.
    • The module inter dependencies had some issues like the jetty HTTP client depended on the Jetty HTTP server.
    • Some java package where split over multiple jars, preventing reasonable OSGi usage.

    Community

    The move to eclipse will grow the jetty community. The OSGi and eclipse runtime community, already significant jetty users, will be brought into the process of developing and enhancing Jetty. Hopefully new contributions, contributors an corporate sponsorship will result.

    Publicity

    The move generates publicity for the project, which is good in attracting attention to the latest features and developments.  Publicity also helps the commercial interests that sponsor the development of Jetty and of those who use Jetty.  We would like to use this publicity to increase awareness of the asynchronous HTTP client components with in jetty, so that the jetty project is seen as the source of a HTTP server, HTTP client and Servlet container.

    Good for eclipse:

    New Ideas and Requirements

    The Jetty project and community will bring new ideas and requirements to the eclipse runtime community and through it to the OSGi community. For example, the OSGi HTTP Service has been stuck at servlet 2.2 level for a number of years and the Jetty project is keen to see how we can help move equinox and/or the standard onto a more recent HTTP feature set.

    Validate process

    The extensive processes of eclipse are tested by the contribution of a large project like Jetty. The issues already found and fixed in Jetty validate these processes, while the pain points of the process (ipzilla) reveal where they may need to be improved.

    Community

    Jetty will bring hundreds of thousand of new users to the eclipse community, many of whom would have been unaware that eclipse is more than just an IDE and that there is a foundation behind it and that the foundation has an already significant runtime project.

    Publicity

    Eclipse is much more than the eclipse IDE. The eclipse foundation is an open source community focused on building an open development platform comprised of
    extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. By joining the eclipse runtime project, Jetty will help improve awareness of the eclipse offerings above and beyond the IDE.

    What next?

    The Jetty 6.x version of Jetty will remain at codehausand will continueu to be maintained and supported for some time.  The Jetty 7 code base has now been moved to eclipse and will initially be focused on providing repackage version of the capabilities of Jetty 6.x. Due to the delays in the release of a stable 3.0 servlet API, Jetty 7 will now implement the 2.5 servlet specification and is targetting a Q2 2009 stable release.  In parallel, a Jetty 8.x development branch will be created that will allow continued development of the servlet 3.0 api version, which will now target Q1 2010 stable release.

    In parallel with the jetty development efforts, the Jetty project team intends to engage the OSGi and eclipse equinox community to work to improve, modernize and standardize the OSGi HTTP service for deploying OSGi bundles as web applications that can access the full features of Jetty without the need to assemble a java EE war file.

    Thanks to all contributors and users of Jetty who continue to make this an evolving and dynamic project.

  • GWT 1.6 HostedMode now using Jetty

    GWT 1.6 RC is out and a new feature shines: the new HostedMode is based on Jetty.

    From the release notes:
    “Although the legacy GWTShell still uses an embedded Tomcat server, the new HostedMode runs Jetty instead. There is also a new “Restart Server” button on the main hosted mode window. Clicking this button restarts the internal Jetty server, which allows Java code changes to take effect on the server without having to completely exit and restart hosted mode. This is useful when making code changes to RPC servlets, or when serializable RPC types are modified and the server and client are out of sync.”

  • Come Meet 5 of the Webtide Crew at EclipseCon

    March 24-26, Webtide has a booth at EclipseCon in Santa Clara, and is running Birds of a Feather sessions. Have Jetty/servlet, Cometd questions, or just want to actually meet in person? Come on down! 19/03/2009

  • Cometd Acknowledged Message Extension

    With the release of the latest cometd-jetty in Jetty 6.1.15, the oft requested feature of reliable message delivery is now supported by the Acknowledged Message Extension in the jetty server and in the dojo and jquery clients.

    The initial concept of cometd was to provide "web quality" communications between the server and the browser, ie it was not intended to provide a reliable, transactional and/or atomic delivery of messages. The premise was that if your network failed, then messages can be lost. While this is sufficient for many applications, it is not sufficient for many others. Luckily, the Bayeux protocol implemented by cometd provides for an extension mechanism, which cometd-jetty, cometd-dojox and cometd-jquery have now used to provide an acknowledged message mechanism for reliable message delivery.

    Server side

    To enable cometd-jetty support for acknowledged messages, the extension must be added to the bayeux instance during initialization:

      bayeux.addExtension(new AcknowledgedMessagesExtension());

     

    The AcknowledgedMessageExtension is a per server extension that monitors handshakes from new clients, looking to see if they also support the acknowledged message extension and then adds the AcknowledgedMessagesClientExtension to each client on handshake.

    Once added to a client, the AcknowledgedMessagesClientExtension prevents messages being delivered on any request other than a /meta/connect so to prevent the possibility of out of order delivery. The extension also maintains a list of unacked messages and intercepts the /meta/connect traffic to insert and check ack IDs.

    Dojox Client

    The clients side for dojo is provided by dojox/cometd/ack.js which was released in dojo 1.3.0b2 (but can also be applied to dojo 1.2.x). To enable client side the dojo requires mechanism is used:

      dojo.require("dojox.cometd.ack");

    This is sufficient to enable the extension, however it may then be programmatically disable/enabled before initialization by setting the ackEnabled boolean field:

      dojox.cometd.ackEnabled = (dojo.query("#ackInit").attr("checked") == "true");
    dojox.cometd.init(cometdUrl);

     

    JQuery Client

    The client side for jquery is enabled by including the jquery.cometd-ack.js file (bundled with jetty 6.1.15):

      <script type="text/javascript" src="../../jquery/jquery.cometd.js"></script>

     

    Details

    In order to enable message acknowledgement, both client and server must indicate that they support message acknowledgement. This is negotiated during handshake. On handshake, the client sends "ext":{"ack": "true"} to indicate that it supports message acknowledgement. If the server also supports message acknowledgment, it likewise replies with "ext":{"ack": "true"}.

    The extension does not insert ack IDs to every message, as this would impose a significant burden on the server for messages sent to multiple clients (which would need to be reserialized to json for each client). Instead the ack id is inserted in the ext field of the /meta/connect messages that are associated with message delivery. Each /meta/connect request contains the ack ID of the last received ack response: "ext":{"ack": 42}. Similarly, each ack response contains an ext ack ID that uniquely identifies the batch of responses sent.

    If a /meta/connect message is received with an ackId lower that any unacknowledged messages held by the extension, then these messages are requeued prior to any more recently queued messages and the /meta/connect response sent with a new ack ID.

    Demo

    There is an example of acknowledged messages in the dojox chat demo that comes bundled with cometd-jetty.

    To run the demo, download the Jetty implementation of cometd, then:

      cd contrib/cometd/demo
    mvn jetty:run

    Point your browser to http://localhost:8080/examples/chat/ and make sure to check "Enable reliable messaging?".

    Use two different browsers instances to initial a chat session, then briefly disconnect one browser from the network (work offline option will do this). While one browser is disconnected, type some chat in the other browser and this will be received when the disconnected browser is reconnected to the network.

    Note that if the disconnected browser is disconnected for in excess of maxInterval (default 10s), then the client will be timed out and the unacknowledged queue discarded.

  • jetty @ eclipse updates

    As avid users of jetty are bound to have caught wind of, jetty7 is in the process of migrating to the Eclipse Foundation as a component of the Eclipse Runtime. We even already have our own happy little news group which we need to get into the habit of checking and using more. The milestone in the process we have in sight right now is the next Creation Review date which is March 11, 2009. We are ironing out the requirements for a successful review and all indications are positive on that note. Oh, and one of the requirements that we have two mentors that are on the Architectural Council, the first already being Jeff McAffer of EclipseSource fame and the most recent being Bjorn Freeman-Benson of the Eclipse Foundation itself. Couldn’t be happier having them on board for this process, makes life ever so much more straight forward.
    Regardless, once we have the source in its new home we’ll have to adjust to some new processes and work out some sort of arrangement for managing jetty7 and jetty6 across two svn repositories and two bug tracking systems. It shouldn’t be terrible as we are planning on slowing feature additions to jetty6 and get it into a more methodical maintenance release schedule. Of particular interest is how we are going to manage snapshot development for jetty7 as eclipse doesn’t have the infrastructure for that maven setup, at least as far as I have seen. Could be we make use of Nexus at oss.sonatype.com for that as it has been quite useful for dojo and cometd as of late.
    A big thing that I think is important to note over and over again is that Jetty will be dual licensed once it goes into the Eclipse Foundation, taking on both the EPL and the ASL as options for use. So no bait and switch tactics or anything like that going on here, it is only adding an additional option to the mix.
    It is probably also good to note that we have started the IP review process up for the lion share of jetty that will be going to eclipse. In preparation for that we recently shifted around the basic structure of jetty in svn trunk to a new flatter structure that is more typical of maven projects. We also started factoring out some of the larger jetty artifacts, creating jetty-io and jetty-http artifacts that allow us to clean up the dependency tree a little bit since we added in the asynchronous jetty-client a while back.
    Not all jetty artifacts of old will be going to the Eclipse Foundation. A lot of the third party integrations and things like that will be remaining at The Codehaus and will be packaged into another form of jetty distribution…likely something similar to the existing Hightide release which rolls together jetty integrations into an easy download bundle. A lot of those details will be worked out shortly after we get jetty into eclipse svn and the jetty7 development environment stabilizes some. We are still targeting to get our first jetty7 release out along with the release of the servlet-api 3.0 release sometime around JavaOne. Obviously we have a lot of details to iron out with jetty7’s new home and how it integrates with the packages remaining at The Codehaus. One thing that will not change is jetty releases being in the central maven repository. Jetty7 will be available in the central repository, simply under different coordinates.
    Amoung the other issues we have to work out is JSP. While it is not critical for the initial import of jetty into eclipse, eventually we are going to need to offer jsp support from jetty in the osgi bundles that we are going to produce. Sadly there is currently no ‘perfect’ solution for this that I at least know of. Currently in jetty we are checking out the glassfish jsp api and implementation, applying some patches and fixed it up to work with the jetty logging mechanics and then releasing those artifacts in the org.mortbay.jetty:jsp-api-2.1-glassfish coordinates. To do that under the eclipse umbrella we would have get the glassfish jsp source run through the eclipse IP verification process, which is not a task I particularly relish at the moment. Perhaps in a month or two I won’t be quite as leery of the idea, but for now that is an issue we are firmly passing on until we have the host of other process related issues resolved.
    Anyway, once any or all of these details clear up we’ll make sure people know via the mailing lists, blogs and of course our handy dandy shiny eclipse.jetty newsgroup.

  • w00t! netcraft survey results

    The results are in for the Febuary 2009 Netcraft Survey and the news is great for Jetty! In January the sites reported using Jetty was at 258k and this month it is at over 289k! That is an increase of over 31k sites in just a month. Sure results vary from month to month as different hosting solutions change back and forth between competing technologies, but it is always nice to see a solid increase for Jetty.
    For comparison, Netcraft now lists Jetty at about 70 percent of Tomcat, and 120% of Resin. Sometimes we get asked if jetty is used in production deployment…um. YES!
    Anyway, wonderful news for Jetty especially on the cusp of the migration of Jetty7 to the Eclipse Foundation which I’ll give an update on the status for in a subsequent blog entry soon.

  • Jetty-based Video on demand in a 'Kangaroo Cull'

    We have always known Jetty is used far and wide. This is the first instance I know of where a governmental watchdog has shut down a project using Jetty on competitive grounds. Not Jetty’s fault, of course, just an industry concentration consideration. As kindly noted, Jetty was the basis of Project Kangaroo for video on demand in the UK, and Webtide have been proud to provide back end support. Unfortunately, the UK’s Competition Commission decided that “this joint venture
    would be too much of a threat to competition in this developing market and has to be stopped.”
    We can hope for the viewing public, that everyone gets to have great video on demand served by Jetty in the future, as hopefully the broadcasters who had joined forces will still continue individually. 🙂

  • Fujitsu – Android Everywhere ?!

    Interesting development – Fujitsu announced recently that they will be offering a service to deploy Android onto all different types of hardware.

    This potentially opens up interesting opportunities for smart software on a whole range of devices, not just mobile handsets. As Jetty is already running on Android, we could see Jetty on all kinds of devices! Of course, Jetty has already been ported to run under J2ME-based devices in the past, but Android provides a more familiar development environment for users accustomed to J2SE. With Jetty onboard, devices could be dynamically updated with new functionality over HTTP simply by downloading a new war file (well, a war file with classes compiled for the Android dalvik vm of course).

    The Jetty-on-Android project – called i-jetty – already provides this dynamic download feature, along with a couple of webapps as demonstrations.

    Although, to make this really fly, Google would need to make some modifications to their classloading security mechanism to really support servlet-style classloader hierarchies. This feature has been requested many times on the android groups, such as here and here. Lets hope this feature moves up the priority list soon!

  • Cometd Grails plugin

    Mingfai Ma has created a grails cometd plugin that combines grails 1.1, jetty-6.1 and cometd 6.1.12 to provide spring based grails application environment.
    Because of the great integration between groovy and java, the java server side Bayeux API may be used to subscribe to channels and have messages delivered to groovy handlers.
    For more details see http://www.grails.org/Cometd+Plugin

  • Jetty as an Eclipse Foundation Project?

    Jetty’s use is obviously extremely widespread. Several projects, including Equinox (OSGi) and the IDE at the Eclipse Foundation actually already include versions of Jetty. And now, Jetty as a project has proposed to join that foundation here. Please do take a look at that proposal, and join the linked newsgroup with your comments. No one currently using Jetty loses any rights, as the existing license still applies and will continue to do so for future releases. Looking forward!

    We are also glad to see the early reactions are hugely positive, and in agreement that this will help spread Jetty and help Jetty’s existing users. For example, Infoworld and EclipseSource

    We encourage you to visit the proposal, and its linked newsgroup to talk about the move and share any suggestions/encouragement/criticisms you may have.