This document discusses real-time web technologies like WebSockets. It begins with an introduction to the speaker and an overview of topics to be covered. The document then discusses challenges with traditional polling techniques and how WebSockets provide a more efficient solution with full-duplex connections. Finally, the document reviews server-side WebSocket libraries and solutions like Pusher and ColdFusion WebSockets that can be used to implement real-time features. Code examples and demos are provided. Security considerations and fallbacks without WebSockets are also mentioned.
1 of 51
Download to read offline
More Related Content
Let web sockets hit that f5 for you
1. Let WebSockets hit that
for you
際際滷s:
http://goo.gl/YH6lDp
(YH6lowercase LDp)
Demo:
http://goo.gl/7ecjYY
2. About me
Born and raised in MD
Developer at Teaching Strategies, LLC
Early childhood education resources
Past: UMD, UMUC, NASA, MD Archives, NIST
First time presenting at conference
Project: CFScript Converter
17. 2-year olds approach
Dad are we there yet?
Dad are we there yet?
Dad are we there yet?
No
No
Yes!
18. HTTP headers are inefficient
Request URL:
http://help.adobe.com/en_US/ColdFusion/10.0/Developing/terms.js
Request Method:
GET
Status Code:
200 OK
Request Headersview source
Accept:
*/*
Accept-Encoding:
gzip,deflate,sdch
Accept-Language:
en-US,en;q=0.8
Cache-Control:
max-age=0
Connection:
keep-alive
Cookie:
topicId=WSe61e35da8d31851852cc9f7d1353e88b409-7fff.html;kal3ljKFQLEkldekaaeka;kLEKELKFLiadaoeldoapkekEpakd
19. Streaming
Is in fact a duplex connection
HTTP headers still included
20. Full duplex connection
Client and server maintain an open connection
Light on bandwidth
Ability to broadcast messages
A brand new protocol
What we want
24. WebSockets events
onopen : connection opened
onmessage : message received from server
onclose : connection closed (normally or abruptly)
onerror : error
37. Disadvantages
1. It costs $$$ based on traffic
(e.g. 500 connections per month
= $50)
2. Information goes through an
external service (privacy)
Pusher
Advantages
1. Highly scalable
2. Add new channels at any
time
3. Custom events
4. Will work on any platform,
even static HTML files
5. One less thing to worry
about
42. Disadvantages
1. Need to upgrade to CF10+
2. Cant add channels
dynamically (see Application.
cfc)
3. Global JavaScript vars
4. Load balanced environment?
CFWebSocket
Advantages
1. Supports channel paradigm
2. Can integrate with internal
authentication
3. Integrates with existing
CFLogin/Authentication
50. Realtime Web Apps (Apress)
The Definitive Guide to HTML5 WebSocket (Apress)
Getting Started with HTML5 WebSocket Programming (PacktPub)
*Echo test service
How can I get started?