Skip to content

Commit c21b0cf

Browse files
committed
working on websockets page
1 parent 51b3596 commit c21b0cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+599
-2
lines changed

about-author.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ <h3 class="panel-head">Table of Contents</h3>
366366
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
367367
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
368368
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
369+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
369370
</div>
370371
</div>
371372
</div></div>

all.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4590,6 +4590,62 @@ <h1>What "full stack" means</h1>
45904590
be just one of <a href="/best-python-resources.html">many resources</a> that help Python
45914591
developers build and maintain their programming skills.</p>
45924592
<h3>What to do now that we've got "full stack" defined?</h3>
4593+
<h1>WebSockets</h1>
4594+
<p>A WebSocket is a <a href="http://tools.ietf.org/html/rfc6455">standard protocol</a> for
4595+
two-way communication between servers and clients. The WebSockets protocol does
4596+
not run over HTTP, instead it is a separate implementation on top of
4597+
<a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP</a>.</p>
4598+
<h2>Why use WebSockets?</h2>
4599+
<p>WebSockets allow two-way communication between the client and server.
4600+
A WebSockets-enabled application allows a web server to push data to a web
4601+
browser without the browser having to poll for updates via HTTP. Allowing
4602+
push from the server to the client and vice versa is much more efficient than
4603+
having the client constantly ask the server "are there any updates?".</p>
4604+
<p>Previous approaches for for keeping a connection alive between client and
4605+
server over HTTP, such as
4606+
[Comet](http://en.wikipedia.org/wiki/Comet_(programming), have either used
4607+
long polling or were not implemented by all browsers.</p>
4608+
<h2>JavaScript client libraries</h2>
4609+
<ul>
4610+
<li>
4611+
<p><a href="http://socket.io/">Socket.io</a>'s client side JavaScript library can be
4612+
used to connect to a server side WebSockets implementation.</p>
4613+
</li>
4614+
<li>
4615+
<p><a href="https://github.com/gimite/web-socket-js">web-socket-js</a> is a Flash-based
4616+
client-side WebSockets implementation.</p>
4617+
</li>
4618+
</ul>
4619+
<h2>WebSockets resources</h2>
4620+
<ul>
4621+
<li>
4622+
<p>The official W3C
4623+
<a href="http://www.w3.org/TR/websockets/">candidate draft for WebSockets API</a>
4624+
and the
4625+
<a href="http://dev.w3.org/html5/websockets/">working draft for WebSockets</a> are
4626+
good reference material but can be tough for those new to the WebSockets
4627+
concepts. I recommend reading the working draft after looking through some
4628+
of the more beginner-friendly resources list below.</p>
4629+
</li>
4630+
<li>
4631+
<p>Mozilla's
4632+
<a href="https://developer.mozilla.org/en-US/docs/WebSockets">Developer Resources for WebSockets</a>
4633+
is a good place to find documentation and tools for developing with
4634+
WebSockets.</p>
4635+
</li>
4636+
<li>
4637+
<p><a href="http://mrjoes.github.io/2013/06/21/python-realtime.html">Real-time in Python</a>
4638+
provides Python-specific context for how the server push updates were
4639+
implemented in the past and how Python's tools have evolved to perform
4640+
server side updates.</p>
4641+
</li>
4642+
<li>
4643+
<p>The <a href="https://www.twilio.com/blog/2014/11/choose-your-own-adventure-presentations-with-reveal-js-python-and-websockets.html">Choose Your Own Adventure Presentations</a>
4644+
tutorial uses WebSockets via gevent on the server and socketio.js for
4645+
pushing vote count updates from the server to the client. </p>
4646+
</li>
4647+
</ul>
4648+
<h3>What's next for your web application after setting up WebSockets?</h3>
45934649
</div>
45944650
<div class="col-md-offset-1 col-md-3" id="sidebar">
45954651
<div class="panel panel-success">

api-creation.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ <h3 class="panel-head">Table of Contents</h3>
514514
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
515515
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
516516
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
517+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
517518
</div>
518519
</div>
519520
</div></div>

api-integration.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ <h3 class="panel-head">Table of Contents</h3>
468468
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
469469
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
470470
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
471+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
471472
</div>
472473
</div>
473474
</div></div>

application-dependencies.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ <h3 class="panel-head">Table of Contents</h3>
501501
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
502502
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
503503
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
504+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
504505
</div>
505506
</div>
506507
</div></div>

application-programming-interfaces.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ <h3 class="panel-head">Table of Contents</h3>
430430
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
431431
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
432432
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
433+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
433434
</div>
434435
</div>
435436
</div></div>

best-python-resources.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ <h3 class="panel-head">Table of Contents</h3>
545545
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
546546
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
547547
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
548+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
548549
</div>
549550
</div>
550551
</div></div>

bottle.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ <h3 class="panel-head">Table of Contents</h3>
410410
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
411411
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
412412
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
413+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
413414
</div>
414415
</div>
415416
</div></div>

caching.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ <h3 class="panel-head">Table of Contents</h3>
404404
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
405405
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
406406
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
407+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
407408
</div>
408409
</div>
409410
</div></div>

cascading-style-sheets.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ <h3 class="panel-head">Table of Contents</h3>
499499
<a href="/change-log.html" class="list-group-item smaller-item ">Change Log</a>
500500
<a href="/future-directions.html" class="list-group-item smaller-item ">Future Directions</a>
501501
<a href="/what-full-stack-means.html" class="list-group-item smaller-item ">What "Full Stack" Means</a>
502+
<a href="/websockets.html" class="list-group-item smaller-item ">WebSockets</a>
502503
</div>
503504
</div>
504505
</div></div>

0 commit comments

Comments
 (0)