Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Couple of suggestions for the WebSocket page #47
Overall the content is very good (as usual). But I have a few small corrections:
There is native support for the WebSocket protocol in most browsers. In many cases clients use a wrapper library, but that is technically not required, as browsers expose the
I think that either here in this place, or later in the document you have to describe Socket.IO as pair of client and server libraries that wrap WebSocket. The nice thing about Socket.IO is that if you run it on a browser that doesn't have native WebSocket support, it can emulate the real-time communication using long polling or other methods and the implementation differences are hidden by the library. The important point here is that WebSocket != Socket.IO, which I think is not totally clear now.
A discussion on how to support WebSocket server-side is missing. You mention gevent a couple of times, but I think it would be helpful to discuss the implications of WebSocket on the server. Something on the lines of: since the connection is long lived, a multi-threaded or multi-process based server cannot scale appropriately, so you need an asynchronous server such as gevent for any practical implementation.
Definitely agree on all these points @miguelgrinberg. Working on a couple of updates to the page I think will clarify, especially the point about needing a JS library instead of the libraries just exposing the browser API in a more developer-friendly cross-browser way.