users@grizzly.java.net

Grizzly 2.X Comet VS response.suspend

From: wild <itchy75_at_hotmail.fr>
Date: Sun, 12 Jun 2011 07:59:35 -0700 (PDT)

Hi Everyone,

I have some questions about grizzly 2.X and comet (or connection suspension
more generally speaking).

I have already made some posts, asking why comet implementation did not use
async write. Oleksiy Stashok answered that is made that way and that Grizzly
team wanted to keep it like that 1.X because of backward compatility. He
also told me it would be fixed for Grizzly 2.0.

I want to migrate to grizzly 2.0, but before that I'd like to ask some
questions :

1. Does comet (in 2.0) uses asynchronous writing in order to prevent to
block a thread ?
2. Do you think grizzly 2.0 is suitable for production ? Any feedback about
grizzly 2.X used in production will be helpfull.

Oleksiy also suggested to use HTTPServer directly, which seems fine since I
already have a logic of groups implemented in my business logic code. I
looked at NonBlockingHttpHandlerSample, it seems very simple to handle a non
blocking read but I want to do non blocking write. I looked at the
documentation and NIOOutputSink class should do the job but here are my
questions.


1. If I call notifyCanWrite multiple times on the same outputstream, will
all the handlers be queued and executed ? If the connection is closed (for
any reason), did all the handlers will be flushed ?

2. Is there any way to be notified that a connection has been closed ?

Thanks.

Guillaume.

--
View this message in context: http://grizzly.1045725.n5.nabble.com/Grizzly-2-X-Comet-VS-response-suspend-tp4481846p4481846.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.