On Jul 11, 2012, at 12:10 PM, "Nathan Andelin" <nandelin@xxxxxxxxx> wrote:

From: Kevin Turner
The huge benefit of websockets is that you can have a permanent
connection between the client and the server

You can do that with XMLHTTPRequest objects as well. The Apache server supports persistent connections.

There is big difference between a keepalive (apache) and a websocket. A keepalive may die, but a WS remains open except in case of an error and is bi-diectional. Data may come and go as it wants.



and the server can "push" events to the browser,


I've read that from a number of sources on the Web. But I don't think it's true. WebSockets just hides the request-response cycle. TCP/IP is fundamentally a request-response protocol. A server won't push anything to a client without a client requesting it first.

Web sockets are bi directional and do not do polling. You are thinking about comet which is a way of faking it.


rather than the browser having to poll the server periodically.

A push mechanism is far more efficient that a long polling mechanism.


As I already indicated, I think Web Sockets are still polling the server. But it's not apparent.

-Nathan.

--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.