CometD migration to new version

13 views
Skip to first unread message

Ram C

unread,
Aug 2, 2019, 6:11:55 PM8/2/19
to cometd-users
Hi,

We have an application that uses CometD (cometd.js was downloaded on 07/18/2016 - could not find the correct version). we configured the cometd to use long polling technique. When it was developed the traffic to our application was less but now it is significantly increased that cause more events to be pushed to browser clients. we are noticing long running script errors in the client side and the client drops bayeux connection often resulting in loss of events.

Is upgrading to the latest version 4.04 helps? Should we use websockets than long polling? 

Any help would be much appreciated.

thank you!
Ram

Simone Bordet

unread,
Aug 2, 2019, 7:27:33 PM8/2/19
to cometd-users
Hi,

On Sat, Aug 3, 2019 at 12:11 AM Ram C <time...@gmail.com> wrote:
>
> Hi,
>
> We have an application that uses CometD (cometd.js was downloaded on 07/18/2016 - could not find the correct version).

Probably 3.1.4.

> we configured the cometd to use long polling technique. When it was developed the traffic to our application was less but now it is significantly increased that cause more events to be pushed to browser clients. we are noticing long running script errors in the client side and the client drops bayeux connection often resulting in loss of events.
>

Sounds more like an application problem... Do you really need to push
all those events to a single browser?

> Is upgrading to the latest version 4.04 helps? Should we use websockets than long polling?

I cannot tell. You may try and see how it goes.

You may also want to look into support:
https://docs.cometd.org/current4/reference/#_support

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.

Ram C

unread,
Aug 3, 2019, 9:22:41 AM8/3/19
to cometd-users
Thanks for the quick reply.

Yes we definitely need to push those events to a single client. Do you think it's not going to handle high volume or you think it's a kinda design issue?

We follow the demo code that came with comted. The app is deployed in JBoss EAP 6.4. client side is dojo 1.10.4

If I switch to latest version then I have to update Dojo to 1.15? Please help.

Thanks
Ram

Simone Bordet

unread,
Aug 3, 2019, 10:02:50 AM8/3/19
to cometd-users
Hi,

On Sat, Aug 3, 2019 at 3:22 PM Ram C <time...@gmail.com> wrote:
>
> Thanks for the quick reply.
>
> Yes we definitely need to push those events to a single client. Do you think it's not going to handle high volume or you think it's a kinda design issue?

Depends on the cases, but it's typically a design issue to deliver a
high volume of events to a browser for human consumption.
Humans are only able to process 1-10 events/s so sending more it's
typically not necessary.

> We follow the demo code that came with comted. The app is deployed in JBoss EAP 6.4. client side is dojo 1.10.4
>
> If I switch to latest version then I have to update Dojo to 1.15? Please help.

Latest CometD runs with Dojo 1.15. It _may_ run with older versions,
but we don't support combinations with older Dojo releases.
Message has been deleted

Ram C

unread,
Aug 3, 2019, 11:20:40 PM8/3/19
to cometd-users
Thanks again!
Ok. I will play around on Dojo versions with Cometd 4.04.

Is SSE a transport option in Cometd?

Also I would like to know when client drops a Bayeux connection the missing messages are resent to the client on reconnect?

Thanks for your valuable inputs.

Ram

Simone Bordet

unread,
Aug 4, 2019, 5:18:26 AM8/4/19
to cometd-users
Hi,

On Sun, Aug 4, 2019 at 4:12 AM Ram C <time...@gmail.com> wrote:
>
> Thanks again!
>
> Ok. I will play around on Dojo versions with Cometd 4.04.
>
> Is SSE a transport option in Cometd?

No, SSE is not an efficient transport for web messaging. It's ok for
Hello Worlds.

> Also I would like to know when client drops a Bayeux connection the missing messages are resent to the client on reconnect?

This is possible with the acknowledgment extension:
https://docs.cometd.org/current4/reference/#_extensions_acknowledge

Ram C

unread,
Aug 5, 2019, 9:44:49 AM8/5/19
to cometd-users
Ok. I will check the document.

Thank you!

On Sunday, August 4, 2019 at 5:18:26 AM UTC-4, Simone Bordet wrote:
Hi,
Reply all
Reply to author
Forward
0 new messages