GWT and Comet

491 views
Skip to first unread message

Magnus

unread,
Nov 15, 2012, 11:42:02 AM11/15/12
to google-we...@googlegroups.com
Hi,

I want my server to send events to clients.

It is very important to me to minimize the changes to my project, i. e. the best case would be a jar file and some classes, not a large framework with a lot of other functionality I do not need.

I spent some time now trying to get atmosphere work within my environment, but I am not so happy withit: dozens of atmosphere-*.jar files, the need to use maven to get it running, and other things.

Now I came across Tomcat's comet support:
One jar file (catalina.jar) and a few classes (CometProcessor, ...).

It would be fine if I can use it for my purposes.

Question:
Are there serious drawbacks when using this solution?
Where can I find a minimal example?

Thanks!

Magnus 

dhoffer

unread,
Nov 16, 2012, 2:19:43 PM11/16/12
to google-we...@googlegroups.com
I don't think your getting dozens of dependencies from atmosphere.  If you have a maven build...atmosphere just has two GWT dependencies you need to specify, with all transitive dependencies its about 7-8 jars but you could exclude container specific jars if you wanted.

Also you don't need to use maven to use atmosphere...you can add them manually if you prefer.

-Dave 

Oliver Raupach

unread,
Nov 16, 2012, 3:41:37 PM11/16/12
to google-we...@googlegroups.com
Hi,

I've made up a starter project to demonstrate the combination of GWT / JMS / COMET / SPRING / JTA / Hibernate. If you like have a look at Githup :
https://github.com/raupach/gwt-spring-jpa-jta-jms-comet-hibernate

The Projekt did not use 'atmosphere'. It use the Javascript frontend implementation of ActiveMQ. For this, you have a Queue which is directly propagated to the frontend and make use of comet-style transmissions.

--

  Oliver Raupach
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/RiOgspH-7tIJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Magnus

unread,
Nov 19, 2012, 1:27:22 AM11/19/12
to google-we...@googlegroups.com
Hi Oliver!


Am Freitag, 16. November 2012 22:00:20 UTC+1 schrieb Oliver Raupach:
I've made up a starter project to demonstrate the combination of GWT / JMS / COMET / SPRING / JTA / Hibernate. If you like have a look at Githup :
https://github.com/raupach/gwt-spring-jpa-jta-jms-comet-hibernate

The Projekt did not use 'atmosphere'. It use the Javascript frontend implementation of ActiveMQ. For this, you have a Queue which is directly propagated to the frontend and make use of comet-style transmissions.

Sounds nice. The project demonstrates many technologies. I would be only interested in the comet related part. But it seems there is no minimal example for it, is it?

Magnus

Magnus

unread,
Nov 19, 2012, 1:46:12 AM11/19/12
to google-we...@googlegroups.com
Hi,

I already arrived at my first goal and got a minimal chat example running using gwt-comet!

But it only worked in GWT DevMode. When deploying it to a real tomcat server, it doesn't work.
I would be glad if I could make this work.

Another way to go would be the comet implementation in tomcat (catalina.jar), but I haven't found a minimal example yet.

Magnus

Oliver Raupach

unread,
Nov 19, 2012, 3:02:33 AM11/19/12
to google-we...@googlegroups.com
Hi,

for the comet part, you only need ActiveMQ and a small Javascript. Have a look at this page: http://activemq.apache.org/ajax.html

--

  Oliver Raupach
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Ali Jalal

unread,
Nov 19, 2012, 6:24:47 AM11/19/12
to google-we...@googlegroups.com
Hi,

There is a pretty good solution for Comet or WebSocket problems:

ATMOSPHERE: https://github.com/Atmosphere/atmosphere

It has a complete example of a chat application with GWT. I test it and it works very well. See its wiki: https://github.com/Atmosphere/atmosphere/wiki

I wait for its next release to be compatible with GWT 2.5 (latest release is compatible with GWT 2.4).

It can be integrated with different web (app) servers (like Tomcat or JBoss AS 7).

Regards.

Magnus

unread,
Nov 19, 2012, 12:00:52 PM11/19/12
to google-we...@googlegroups.com
Hi,

why is there always the dependency between a comet solution and the actual GWT version?

Well, I tried around with atmosphere for a while now, but I did not get happy with it. I just want a jar file and some classes to do server push. But to get a minimal example, I had to use maven (which I don't want), download a lot of stuff and even use a specific GWT version. This is simply not that lightweight solution I am looking for.

Magnus



b0b

unread,
Nov 19, 2012, 3:05:42 PM11/19/12
to google-we...@googlegroups.com
There's gwt-comet which somewhat works (at least with GWT 2.4) but it is abandonned and unmaintained.
Which is sad since this is very useful and I think it should this should integrated in GWT itself.
Oh and it doesn't work with IE9+ (nothing that can't be fixed but not exaclty trivial last time I tried).

Magnus

unread,
Nov 21, 2012, 10:41:08 AM11/21/12
to google-we...@googlegroups.com
Hi,

thanks for this info! Then I can stop trying around with it.

But what can I use with these restrictions:
- one jar
- quickly accessible updates, without additional frameworks/tools (e. g. maven)
- no tight dependency to the GWT version, if possible

What sounds nice to me is that tomcat seems to have some comet functionality within catalina.jar. But I did not find a working example yet.

Magnus
Reply all
Reply to author
Forward
0 new messages