tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: getting frustrated with web sockets
Date Tue, 05 Jun 2012 21:42:34 GMT
On 05/06/2012 22:16, Ravi wrote:
> Mark you are absolutely right if you only talk about future applications
> with latest technologies and only specific use cases like chat
> applications.
> However there are billions of people whose browsers/phones will not be
> upgraded for years. Also a lot of existing applications and existing web
> libraries are built around requests and sessions.
> As a practical example, I have an existing smartphone app that works
> with a tomcat webapp. Firing a HTTP request for each action is slow and
> I would like to use websockets, however I am faced with following options:
> 1. develop different versions of my app, one for users who have latest
> phones/browsers and another one for users who do not. This means double
> the cost of developing and maintaining.
> 2. manually try to retrofit websockets to existing app/libraries so I do
> not end up maintaining two versions. Most web libraries/frameworks
> assume presence of request/session. Even in JEE servlet classes, many
> methods take httprequest as an input parameter. So this is also not easy.
> 3. stay with http as that works across all existing browsers/phones.
> i.e. do not use websockets.
> Websockets will be lot more useful if both client and server sides can
> seamlessly fallback to http when websockets are not available. This will
> make it easy to upgrade existing apps, support all kinds of users
> (including IE6), develop single app that works on android (android has
> no websocket support) and iphone ... and so on
> I hope I was able to communicate what I was trying to do.

Then use a framework that sits on top of WebSocket / HTTP / Comet / a.n.
other protocol and abstracts the protocol away from the application
code. Something like Atmosphere.

You'll still need to re-write your app but you'll only need to do it once.

WebSocket != HTTP and you simply can't replace one with the other.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message