• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What kind of applications can I make with Websockets?

 
Ranch Hand
Posts: 701
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Author
Posts: 7
5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WebSockets are great for games. They allow you to communicate asynchronously with the server and reduce the communications overhead. You are not limited to games though. Any application which needs to send several small pieces of information to the server can benefit from WebSockets. Also, applications that expect to receive information from the server without needing to prompt the server first are great uses of WebSockets.

Streaming of data from sporting events is a great example use case for WebSockets. In a baseball game, there are periods of activity (pitch, hit, throw) follow by periods of inactivity (warm up between innings, signals between pitches, etc). With AJAX polling, you make a lot of calls and get no updates back. Occasionally, one of the calls returns some information. That information is only timely if your polling interval is small enough. Reducing the interval, increases the number of empty responses. Using WebSockets, the server sends data to the client as it happens without the client needing to poll for information. WebSockets reduce overhead and improve application performance in this example.
 
reply
    Bookmark Topic Watch Topic
  • New Topic