Tuesday, 23 October 2007
Scalable Ajax Push with ICEfaces and GlassFish Grizzly Comet
« ICEfaces And Mobile Ajax | Main | Seam 2.0 Released »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: ajax ajaxpush comet glassfish icefaces jsf scalable servlet web20
Posted by at 2:50 PM in Entries by Ted Goddard
[Trackback URL for this entry]
xnzq5e30z5jqj1lp
Orlando Fl Motel
http://3.ryfbdegzb.com/30
French Revolution Guillotine
http://4.ctuzzqj.com/k
Kids Trundle Beds Furniture
http://6.oprefofw.com/2d
Height Adjustable Tables
http://8.zccuqf.com/j
Vitamin D 25
http://3.knnldiw.com/3e
T E Tool Chest
http://4.uqznlruos.com/3a
Kingston Sd Memory
http://7.fidjur.com/4d
Windows Xp Media Center Cd Key
http://9.ysnvvz.com/1x
Central Florida Drunk Driving Attorney
http://2.tikumd.com/1k
Baby Shower Candy Mold
http://3.kreofzgi.com/41
Sewing Machine Troubleshooting
http://7.ryfbdegzb.com/1g
Information Clearing House
http://7.ctuzzqj.com/z
Underground Military Bases
http://4.oprefofw.com/39
Commercial Vehicle Seat Manufacturer
http://0.zccuqf.com/5
Preserving Fresh Cut Flowers
http://8.knnldiw.com/35
Super 8 To Dvd
http://8.uqznlruos.com/1d
Gospel Music Of Mehalia Jackson
http://0.fidjur.com/30
Chapter 7 Chapter 11 Bankruptcy
http://3.ysnvvz.com/3s
Cameron Diaz Homepage
http://4.tikumd.com/3q
Dave S World
http://5.kreofzgi.com/2x
Idaho United Credit Union
http://6.ryfbdegzb.com/31
Radio Music Awards 2005
http://7.ctuzzqj.com/s
Northwest Airlines Frequent Flyer Miles
http://8.oprefofw.com/15
1 Dvd Ripper
http://6.zccuqf.com/2a
Adopt Kittens For Free
http://6.knnldiw.com/3z
Local Number Portability
http://3.uqznlruos.com/1u
Spiral Honey Ham
http://4.fidjur.com/3h
Free Flower Tubes
http://3.ysnvvz.com/x
Antique Jewelry Store Washington Dc
http://3.tikumd.com/2x
Customized Party Favors
http://2.kreofzgi.com/3j
xnzq5e30z5jqj1lp
Orlando Fl Motel
http://3.ryfbdegzb.com/30
French Revolution Guillotine
http://4.ctuzzqj.com/k
Kids Trundle Beds Furniture
http://6.oprefofw.com/2d
Height Adjustable Tables
http://8.zccuqf.com/j
Vitamin D 25
http://3.knnldiw.com/3e
T E Tool Chest
http://4.uqznlruos.com/3a
Kingston Sd Memory
http://7.fidjur.com/4d
Windows Xp Media Center Cd Key
http://9.ysnvvz.com/1x
Central Florida Drunk Driving Attorney
http://2.tikumd.com/1k
Baby Shower Candy Mold
http://3.kreofzgi.com/41
Sewing Machine Troubleshooting
http://7.ryfbdegzb.com/1g
Information Clearing House
http://7.ctuzzqj.com/z
Underground Military Bases
http://4.oprefofw.com/39
Commercial Vehicle Seat Manufacturer
http://0.zccuqf.com/5
Preserving Fresh Cut Flowers
http://8.knnldiw.com/35
Super 8 To Dvd
http://8.uqznlruos.com/1d
Gospel Music Of Mehalia Jackson
http://0.fidjur.com/30
Chapter 7 Chapter 11 Bankruptcy
http://3.ysnvvz.com/3s
Cameron Diaz Homepage
http://4.tikumd.com/3q
Dave S World
http://5.kreofzgi.com/2x
Idaho United Credit Union
http://6.ryfbdegzb.com/31
Radio Music Awards 2005
http://7.ctuzzqj.com/s
Northwest Airlines Frequent Flyer Miles
http://8.oprefofw.com/15
1 Dvd Ripper
http://6.zccuqf.com/2a
Adopt Kittens For Free
http://6.knnldiw.com/3z
Local Number Portability
http://3.uqznlruos.com/1u
Spiral Honey Ham
http://4.fidjur.com/3h
Free Flower Tubes
http://3.ysnvvz.com/x
Antique Jewelry Store Washington Dc
http://3.tikumd.com/2x
Customized Party Favors
http://2.kreofzgi.com/3j