Anyone using gwt-rpc over websockets?

858 views
Skip to first unread message

Gal Dolber

unread,
May 4, 2012, 12:05:20 PM5/4/12
to google-we...@googlegroups.com
Found http://code.google.com/p/gwt-websocketrpc/ and https://github.com/Atmosphere/atmosphere

The first one only works with jetty and atmosphere looks good but I was only able to get working long pull, no websockets.
Anyone had better luck?

--
Guit: beautiful gwt applications

https://github.com/galdolber/Guit




Yaya @ Work

unread,
May 6, 2012, 6:16:59 AM5/6/12
to google-we...@googlegroups.com, gal.d...@gmail.com
Hi !

Don't forget that websockets will only be used if both the server and the client support them.

Also, your goals are a bit unclear :  you mention RPC, which is client initiated communication, and websockets, whose initial aim was to push data from the server to the client.  However, indeed, both types of communications could (should ?) be unified, see below.

Regarding Atmosphere, I played a very little bit with this framework a few few months ago, for a PoC I left aside, and wasn't very excited :  the documentation was quite shallow and the framework itself is quite "low level".  Basically, it allows you to send strings from the server to the client, with some support for object serialization which is/was a bit tedious.  I don't remember any support for client initiated communications.  However, this opinion should not be taken in a too harsh way :  Atmosphere is a generic framework, with a bit of specialized support for GWT, not a GWT specific framework.
Also, at Devoxx FR 2~3 weeks ago, Sami Jabber reported a similar "disappointment" with Atmosphere (http://www.slideshare.net/samijaber/session-gwt-devoxx-france-2012-cobra, slide 11, sorry that's in French ;-) ), although they may have evaluated this while ago, on less mature versions.

Anyway, I'd rather recommend you to have a look at JBoss' Errai [http://www.jboss.org/errai.html], which adds very nice stuff on top of GWT, like CDI, JAX-RS related stuff and "a unified federation and RPC infrastructure with true, uniform, asynchronous messaging across the client and server".
Regarding communications, see e.g. https://docs.jboss.org/author/display/ERRAI/Messaging :
This section covers the core messaging concepts of the ErraiBus messaging framework.
ErraiBus forms the backbone of the Errai framework's approach to application design. Most importantly, it provides a straight-forward approach to a complex problem space. Providing common APIs across the client and server, developers will have no trouble working with complex messaging scenarios from building instant messaging clients, stock tickers, to monitoring instruments. There's no more messing with RPC APIs, or unweildy AJAX or COMET frameworks. We've built it all in to one, consice messaging framework. It's single-paradigm, and it's fun to work with.

Best regards,
          Yannis
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> 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.



--
Best regards,
          Yannis

Steve

unread,
May 7, 2012, 8:21:06 AM5/7/12
to Google Web Toolkit
I'm using jWebSockets to stream "telemetry" to our GWT app. I don't
currently use a GWT wrapper on the client side. I use a JavaScript
Overlay to access the stream contents from client GWT code.

I really like the model and am considering using it like JMS (already
a jWebSocket plugin) so that I have an event bus that extends from
server to GWT client.

The only issue is jWebSocket is a bit heavy - you need to pick out the
right pieces - and also I've had to go through a couple upgrades in
order to support the apparently still-fluid websocket protocol. But I
recommend it.

Steve

Nikolas Gauvreau

unread,
May 9, 2012, 9:23:47 PM5/9/12
to google-we...@googlegroups.com
I combed the web for a servlet based solution to async that allowed a full range of transport solutions for GWT and the only one that comes close to working, it seems, is Atmosphere. I've finally settled on Atmosphere for a few reasons. But first to address your concern...

At the moment, Websockets seem to have suffered a regression in Atmosphere and that transport is not under active maintenance for a few months. The owner of Atmosphere told me that he would have time to have a look at the Websocket transport issues once he releases 1.0.0 of atmosphere (which he said probably wouldn't be for a few months AND, he's not actually a GWT guy). 
That being said, I'm fully motivated to see Atmosphere-GWT support Websockets, Flash-Websocket, Comet, Long-Polling, and Polling. The guy who wrote the module originally is still actively using the framework for his project and he IS available for questions BUT, his project only requires the use of Comet (which is why websockets have fallen to the way-side). I've had a good look through the module and it seems websockets are infact implemented and there have been some reports of it working for some people in the past. I think it wont be long until Atmosphere supports all transports again for GWT. 

As for me, I just started a GWT project to put Atmosphere through the ringer. I'm writing a performance webapp that anyone will be able to run online. It'll keep track of the OS/Platform used to run the tests as well as the results from each run. We will soon know just how robust the framework is and if there are any Atmosphere related issues, JFarcand (the owner) is very active on the project and he would take care of anything we turn up.

At the moment, I'm just going to go ahead and write my performance webapp and Atmosphere wrapper under comet, but assuming websockets will get fixed at some point, be it by me, JF, or someone else in the community. 

Hope this helps!

Nik
Reply all
Reply to author
Forward
0 new messages