Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Websocket or Server Sent Event or Combination of both

 
Maneesh Godbole
Saloon Keeper
Posts: 11338
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was reading about Server Sent Events and Websockets and am a bit confused.
From what I understood SSE are one way i.e. Server - client whereas Websockets are two way communication.

A chat application sounds like the obvious choice to learn about this. The question is what do I use?
1) Pure websockets should serve my purpose
2) Combination of SSE and a simple Post should still work.

Are there any other points I need to consider before making this choice? Besides the technology learning experience, I also aim at finding out how it would perform in 'real life' e.g. when thousands of users are online chatting away to glory.

Any pointers would be most appreciated.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't had a chance to play with either technology. I'm afraid that you might be treading new ground and you'll become the expert!
 
Ron McLeod
Bartender
Pie
Posts: 1049
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I looked at both of these myself a while back, and I ended-up using SSE. My application was a live system status dashboard rather than chatting system, but I would imagine that SSE would work fine for that type of application as well. I haven't had an opportunity (or need) to go beyond 10 or so connected clients, so I'm not sure what issues (if any) there might be if there were 1000's of connections.

On the server-side, I used Grizzly/Jersey/Jackson and took advantage of Jersey's built-in support for SSE and event broadcasting. I posted an example message flow in the topic two-way communication in web services.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very nice, Rod. I assume your audience was those who use modern browsers. Did you have fallbacks for the Luddites? Or just tell them to suck it up?
 
Ron McLeod
Bartender
Pie
Posts: 1049
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For this application we were able to dictate which browsers could be used. Works well with recent versions of Chrome and Firefox, no support with with either of the Microsoft browsers.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ron McLeod wrote:For this application we were able to dictate which browsers could be used.

I love it when that happens.
 
Maneesh Godbole
Saloon Keeper
Posts: 11338
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear, Ron.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic