users@grizzly.java.net

Re: cometd not performing properly

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Tue, 15 Nov 2011 09:34:46 +0100

Hi Joe,

can you pls. share your app (may be simplified version), so I can
reproduce the problem?

Thank you.

WBR,
Alexey.

On 11/15/2011 05:22 AM, Joe Canon wrote:
> I tried it using JDK7 with -Djava.net.preferIPv4Stack=true. This
> works! It is also slow. But it is working. Every message is sent and
> received.
>
> On Mon, Nov 14, 2011 at 8:04 PM, Joe Canon <jcanon.summit_at_gmail.com
> <mailto:jcanon.summit_at_gmail.com>> wrote:
>
> Hi Alexey,
>
> I tried the Atmosphere cometd demo today, as you suggested. The
> issue was the same - that messages would not make it from one
> client to the other in the chat.
>
> I was about to give up on it when I decided to try to run it under
> JDK 6 instead of JDK 7. Going to JDK 1.6.0_29 seems to have
> resolved the issue.
>
> Now that I am using jdk6, there are no dropped messages. It is
> kind of slow though. Sometimes 2 or 3 seconds before the message
> comes back from the server. This will be a show stopper for us. So
> I have to get this resolved or we can't use it. But I am happy to
> see some reliability.
>
> Does this make sense? Any idea what might be happening?
>
> Thanks and Regards,
>
> Joe
>
>
> On Mon, Nov 14, 2011 at 12:15 AM, Oleksiy Stashok
> <oleksiy.stashok_at_oracle.com <mailto:oleksiy.stashok_at_oracle.com>>
> wrote:
>
> Hi Joe,
>
> we'd suggest to use Atmosphere project for cometd support.
> Is it ok with you?
>
> WBR,
> Alexey.
>
>
>
> On 11/14/2011 01:43 AM, Joe Canon wrote:
>
> Hi All,
>
> I am having issues using the cometd implementation in
> GlassFish. None of the samples seem to work correctly for
> me. I've tried GF 3.1.1 and 3.1.2.
>
> For example, with the chat demo, I can join by enterring a
> username and clicking join. Then I can chat. But the
> messages I send sometimes show up at the client, and
> sometimes do not.
>
> Here's an example:
>
> client:
> message=[{"data": {"user": "joe", "chat": "rgte"},
> "channel": "/chat/demo", "clientId":
> "pVJUfQl3gExtwMs+IAhAJQ==", "id": "15"}]
> server:
> [{"channel":"/chat/demo","successful":true,"clientId":"pVJUfQl3gExtwMs+IAhAJQ==","id":"15"}]
>
> client:
> message=[{"channel": "/meta/connect", "connectionType":
> "long-polling", "clientId": "pVJUfQl3gExtwMs+IAhAJQ==",
> "timestamp": "Mon, 14 Nov 2011 00:32:18 GMT", "id": "16"}]
> server:
> headers only 200 OK. No JSON message.
>
> But I don't see my message at the client (I expected to
> see "rgte").
>
> I am running a single client in a browser. I also have
> been running the BayeuxExternalServlet. The messages that
> are sent from this servlet almost never get to the browser
> client. One of maybe a hundred or so.
>
> Note that I have comet running. It seems to be performing
> properly. But cometd is the problem.
>
> What could I be doing to cause this kind of behavior? I
> tried GF 3.1.1 and 3.1.2 (build 7). Same behavior.
>
> Any suggestions would be greatly appreciated.
>
> Thank you,
>
> Joe
>
>
>
>