users@grizzly.java.net

Re: Delivery Guarantee Mechanism for Comet(d)

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 17 Oct 2008 13:41:18 -0400

Salut,

sorry for the dekay.

Phil Syme wrote:
> Apologies if this is a repost, but doesn't appear to be after an initial
> pass...
>
> I unfortunately missed JavaOne this year and missed Jeanfrancois'
> and Ted's talk
> (http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-5250.pdf?cid=25455)

If you are in California, you can always come to a similar one:

https://sv-web-jug.dev.java.net/servlets/NewsItemView?newsItemID=6458


>
> <http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-5250.pdf?cid=25455>Page
> 27 mentions "Delivery Guarantee"(s) and page 28 mentions that Glassfish
> has them.
>
> I'm looking for any additional information on this that anyone could
> provide (links, pointers to code, etc.) I'm interested in a CometD
> server with delivery guarantees, but am curious about the mechanism in
> general.


OK by default our Cometd implementation doesn't have any feature
supporting delivery of guarantee. Our Comet implementation has, and
configuring cometd to use it is quite simple. But for Comet, the
filtering/aggregation/delivery can be customized by implementing your
own NotificationHandler:

https://grizzly.dev.java.net/nonav/xref/com/sun/grizzly/comet/NotificationHandler.html

This is where you can implement any mechanism to makes sure the push
happens in the right order, on time, etc. and decide the strategy to
under special circumstance's like slow network, delayed push operations,
  etc. The difference between Tomcat and Jetty is that you have special
API, where those two you have to write everything from scratch. I've
briefly talked about it here:

http://weblogs.java.net/blog/jfarcand/archive/2007/03/new_adventures_1.html

So before I jump into code snippet, does that help you to start? I can
certainly gives concrete example if you want :-)

A+

-- Jeanfrancois



>
> Thanks,
> Phil
>