<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/tag/web-sockets">
  <channel>
    <title>Web Sockets</title>
    <link>https://www.linuxjournal.com/tag/web-sockets</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Real-Time Messaging</title>
  <link>https://www.linuxjournal.com/content/real-time-messaging</link>
  <description>  &lt;div data-history-node-id="1084379" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/plug.jpg" width="200" height="200" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/reuven-lerner" lang="" about="https://www.linuxjournal.com/users/reuven-lerner" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Reuven Lerner&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
Want to send messages to all the browsers connected to your site? The pub-sub
paradigm, run through Web sockets, might be just the solution.
&lt;/p&gt;
&lt;p&gt;
Back in the 1980s, BSD UNIX introduced the idea of a "socket", a data
structure that functioned similarly to a file handle, in that you
could read from it or write to it. But, whereas a file handle allows a
program to work with a file, a socket is connected to another
process—perhaps on the same computer, but quite possibly running on another
one, somewhere else on the Internet. Sockets brought about a
communications revolution, in no small part because they made it easy
to write programs that communicated across the network.
&lt;/p&gt;

&lt;p&gt;
Today, we take that for granted. Dozens or hundreds of sockets are
open on my computer at any given moment, and I don't know if they're
communicating with local or remote programs. But, that's just the
point—it's so easy to work with sockets, we no longer think of
networked programs as anything special or unusual. The people who
created sockets couldn't possibly have imagined the wide variety of
protocols, applications and businesses that were built using their
invention.
&lt;/p&gt;

&lt;p&gt;
My point is not to praise sockets, but to point out that the inventors
of a technology, particularly one that provides infrastructural
support and a new abstraction layer, cannot know in advance how it'll
be used.
&lt;/p&gt;

&lt;p&gt;
In that light, consider a new network communication protocol called
Web sockets, part of the standards known collectively as HTML5.
To me, at least, Web sockets are the most undersold, least discussed
parts of the HTML5 suite, with the potential to transform Web browsers
into a fully fledged application platform.
&lt;/p&gt;

&lt;p&gt;
Web sockets don't replace HTTP. Rather, much like BSD sockets, they
provide bidirectional, long-term communication between two
computers.
The "bidirectional" and "long-term" aspects distinguish Web sockets
from HTTP, in which the client sends a request, the server sends a
response, and then the connection is terminated. Setting up a Web
socket has very little overhead—and once communication is
established, it can continue indefinitely.
&lt;/p&gt;

&lt;p&gt;
Now that Web sockets exist, and are even supported by a growing number
of browsers, what can you do with them? That question is still
hard to answer, in no small part because Web sockets are so new.
After all, if you had asked someone in the 1980s what you could do
with BSD sockets, it's unlikely that streaming video would have come
to mind.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/real-time-messaging" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 14 Mar 2013 16:45:05 +0000</pubDate>
    <dc:creator>Reuven Lerner</dc:creator>
    <guid isPermaLink="false">1084379 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
