Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Let web sockets hit that f5 for you
1. Let WebSockets hit that
for you
Slides:
http://goo.gl/YH6lDp
(YH6…lowercase “L”…Dp)
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
7. Real-time Web
“Realtime refers to the timely nature between an event’s occurrence and our
being made aware of it.”
-Jason Lengstdorf and Phil Leggeter
12. Use cases
● System-wide alerts
● CRUD forms
● Live grids
● Real-time graphs
● Real-time maps
● Business collaboration
● Idle time sign off
● CMS updates
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. Can’t 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
44. Security
● Denial of service
● Cross-site scripting (XSS)
● Man in the Middle
● Authentication
Client Server
Always use
wss://
on production
systems!!!
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?