Tuesday, 23 October 2007

Scalable Ajax Push with ICEfaces and GlassFish Grizzly Comet


ICEfaces now has preliminary integration with GlassFish Grizzly Comet. You can download a recent nightly GlassFish build and ICEfaces 1.7DR2 to try it out.

Ajax Push (aka "Comet") allows applications to update the web page independently of user events, but to do so, a connection must remain open from the server to the browser. This connection is used to notify the browser of the page updates to apply. Unfortunately, if standard Java Servlets implement the notification mechanism, a scalability problem arises: one thread for each user becomes blocked in the Servlet.service() method. Grizzly solves this problem with asynchronous request processing: using Java NIO, many requests and responses can be dealt with using a small thread pool. ICEfaces now makes use of these Grizzly features to provide Ajax Push without consuming a thread for each user. Special thanks goes out to Jean-Francois for all the hard work he put in helping us to integrate ICEfaces with Grizzly and GlassFish.

These features are not enabled by default. You will need to modify your ICEfaces web.xml to contain the following mapping as the first mapping (so that the GrizzlyPushServlet is the first match on the overlapping url-pattern):

    <servlet>
        <servlet-name>Grizzly Push Servlet</servlet-name>
        <servlet-class>com.icesoft.faces.webapp.http.servlet.GrizzlyPushServlet</servlet-class>
        <load-on-startup> 1 </load-on-startup>
    </servlet>

   <servlet-mapping>
        <servlet-name>Grizzly Push Servlet</servlet-name>
        <url-pattern>/block/receive-updated-views/*</url-pattern>
    </servlet-mapping>

Add the cometSupport property to your http-listener in (for example) domains/domain1/config/domain.xml:

        <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="8080" security-enabled="false" server-name="" xpowered-by="true">
          <property name="cometSupport" value="true"/>
        </http-listener>

With those configuration changes, you have enabled scalable Ajax Push. This makes GlassFish and ICEfaces a powerful combination for building large-scale multi-user Ajax applications.

An easy way to get started is to try the .war file for the ICEfaces auction monitor

Technorati Tags:

Posted by ted.goddard at 2:50 PM in Entries by Ted Goddard

Thursday, 18 October 2007

ICEfaces And Mobile Ajax

We have been pretty involved with exploring the applicability of ICEfaces in the Mobile Ajax space recently, so wanted to keep everyone in the loop. As it turns out, given our existing support for the mobile Opera and Safari browsers we have a pretty good story around mobile ICEfaces applications today. In fact, we have a customer, C3 Solutions, that has already developed a mobile enterprise system based on ICEfaces. Ted also blogged here about ICEfaces on the iPhone recently, illustrating a number of our demo applications running.

Key to ICEfaces suitability for Mobile Ajax applications is the server-centric nature of the framework. To begin with, the application runs as a pure JSF application, so the server does all the heavy lifting, utilizing only the lightweight Ajax bridge to facilitate the Ajax interactions. Regardless of application complexity, with ICEfaces, the client side of the deployment is a fixed, lightweight piece of JavaScript that is well-suited to resource-constrained mobile devices, provided they support a modern mobile browser.

We also see Ajax Push as a key feature for mobile applications, as it makes it feasible to updated the client in real time without the user needing to interact with the device. Despite improvements in interaction mechanisms you find in devices like the iPhone, they remain awkward to interact with, so reducing the need for interaction is critical to developing effective mobile applications.

I recently did a talk on ICEfaces and Mobile Ajax at AjaxWorld and demonstrated a couple of mobile ICEfaces applications at the show. We went to the painstaking effort to record these demos and they are now available for your viewing pleasure here. You will see the prominence of Ajax Push in both the demos, so make sure you have a look. If you are interested in viewing the slide deck that was presented, you can grab it here. I will also be giving at talk at WEB Builder 2.0 on the same subject in Vegas on Dec 3, so if you are planning on attending you can track me down there.

While the demos are wireless mobile demos, the process of capturing them on video was far from wireless as the photo below illustrates.

Wireless Demo??

Right after AjaxWorld, the OpenAjax Alliance and W3C cosponsored a workshop on Mobile Ajax, and I was lucky enough to be one of the attendees. There was a vast cross-section of the industry represented there and a wide range of discussion topics. While it was a tremendously interesting day, it is unlikely that anything concrete will come from this gathering in the near term. I think that once again Moore's Law will have a bigger impact on penetration of Ajax technologies into the mobile space than standards initiatives ever will. But why wait when you can deliver in the mobile space today with ICEfaces?

I will keep you posted on new developments around ICEfaces and Mobile Ajax as they arise.

Steve

Technorati Tags:

Posted by steve.maryka at 6:57 PM in Entries by Steve Maryka

Monday, 15 October 2007

Technorati Tags

Would a "tagging component" be worthwhile, or is the construction of tags simple enough that an outputlink is sufficient? This may be true when only one tagging ontology is being used, but a tagging component would allow tagging ontologies to be added to the application without modification of the pages. For instance, this blog server supports the Technorati Profile but others may be popular in the future.

Technorati Tags:

Posted by ted.goddard at 5:12 PM in Entries by Ted Goddard

Friday, 12 October 2007

Welcome to the ICEfaces Water Cooler

Welcome everyone. You are looking at the new blogging site for the ICEfaces team. As you can see, we are just getting up and going. I am Steve Maryka, CTO at ICEsoft, and will be spearheading our external technical communications initiative, for which this blog site will become one of our primary vehicles.

Until now, Ted Goddard, senior architect for ICEfaces, has been our primary blogger. You may already be following his story here . Ted will be mirroring his posts to both his existing blog and this one, so you can follow his Ajax Adventure at either.

I will start with a few posts related to the history of ICEfaces, our partnering efforts in the community, and our progress in the mobile space. Most importantly, we want to make sure the information we provide is interesting, relevant and useful to the ICEfaces community, so please let us know what you want to hear about.

As we build momentum, I will get other members of the team involved. Over the last 4 years of R&D we have developed such a tremendous breadth and depth of knowledge that no single mind (except maybe Ted's) can contain it all, so as we delve in to more complex subjects, we will make sure the subject matter experts are involved.

Once again, welcome. I trust that you will find the new ICEfaces Water Cooler useful, and I hope to hear from you along the way so that we can consistently present the kind of information that is pertinent to you. Stay tuned for more from myself and the ICEfaces team.

Steve

Posted by steve.maryka at 8:59 AM in Entries by Steve Maryka

Tuesday, 9 October 2007

ICEfaces Security Scan by Fortify


Fortify Software provides a free security scanning service to open source projects. We've applied the results of the scan to ICEfaces with great results:

Great care has been taken in the architecture to ensure that the use of ICEfaces promotes the development of secure Ajax applications, but a large part of security lies in the details of the implementation. This is where the Fortify scan comes in.

Technorati Tags:

Posted by ted.goddard at 12:23 PM in Entries by Ted Goddard