[wp-hackers] WordPress and Websockets

Eric Mann eric at eam.me
Thu Sep 29 21:27:18 UTC 2011


Very good points. Disappointing, but a good reality check nonetheless.

On Tue, Sep 27, 2011 at 6:26 PM, Dion Hulse (dd32) <wordpress at dd32.id.au>wrote:

> Push Events/SSE still have the same problem however, It requires a single
> connection to remain open for the browser, a header/data chunk is sent
> along
> with a HTTP 100 continue header from memory, so the browser continuously
> receives the updated data. In order for that to happen, you'll have a PHP
> script in a infinite loop (until the client disconnects).
>
> Push Events and Websockets are nice standards, but not available for most
> people right now due to that server support requirement, If you're
> deploying
> a single dedicated site, you can ensure the server can handle it.. but for
> everyone else out there not managing their servers? Ajax Long polling is
> the
> best option which is going to perform whilst not bringing their server to
> it's knees.
>
> On 28 September 2011 02:18, Eric Mann <eric at eam.me> wrote:
>
> > At the Portland WordPress User Group meetup last night, someone
> recommended
> > an alternative to Websockets that might fit my use-case.  The HTML5 spec
> > also includes a definition for Server-Sent Events.  It's not two-way
> > communication, but still allows the server to asynchronously push data to
> > the client without the use of AJAX long-polling.
> >
> > It works in all of the major "modern" browsers (Chrome, Firefox 6+,
> Safari,
> > Opera) ... but will need to fall back to an alternative for older
> versions
> > or for anything IE (and no, not even the IE10 developer preview supports
> > SSE).
> >
> > Additionally, SSE will work with a stock Apache setup ... no need to
> > install
> > Nginx or host the system on a central location (both of which were
> > solutions
> > I was dreading for a plugin).  It communicates over standard HTTP, so no
> > additional protocols need to be set up at all.
> >
> > So I'll still benefit from the new systems defined by HTML5 ... just not
> > the
> > ones I *thought* I'd end up using.  Thanks to everyone who took a stab at
> > the question, though.  I'll eventually find a WP use case for websockets,
> > and this will definitely come in handy!
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list