Salut,
gustav trede wrote:
> THello,
>
> Continuation is initialized per default for all new comethandlers.
> What about the Streaming usage case, where continuation is not needed ?.
OK I'm not sure I fully understand. By continuation, what are you
meaning exactly? Grizzly Continuation might be what you are looking for:
http://weblogs.java.net/blog/jfarcand/archive/2007/11/grizzly_attack.html
https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/Continuation.html
https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/GrizzlyContinuation1x.html
>
> Please correct me if im wrong, but to me it seems that the current comet
> implementation is designed for the polling mode.
Pooling and streaming. When CometHandler.onEvent() is called, to support:
[Pooling]
1. write the response
2. invoke resumeCometHandler(this)
[Streaming]
1. write the response
2. don't invoke resumeCometHandler() on the first push, but wait and
resume later. That implement the Comet "streaming" mode.
>
> While looking in the CometContext.java it seems like alot of work to
> rewrite to allow for pure streaming.
> the handler hashmap is based around the id continuation init etc.
Can you elaborate about pure streaming. Just gives an example of how you
envision the API to work to see if we can improve it.
>
> I see 2 ways of fixing this:
>
> 1.Make the current cometcontext.java alot more complex.
>
> 2.Introduce a baseclass or interface and let there be two different
> implementations/subclasses,
> for polling and streaming. CometEngine needs to be told what
> implementation class to use.
So far so good...but I would really like to learn more about what you
means by continuation :-)
>
> The second option seems more future proof to me also allowing for
> something users cant do today: making their own cometcontext
> implementation with their specific needs.
I agree.
>
> Im anyhow willing to implement whats needed, with Arcands guarding eye.
:-)
>
> what does mr Arcand and others have to say about this ?.
Patches are more than welcome :-)
A+
-- Jeanfrancois
>
>
> regards
> gustav trede