SlideShare uma empresa Scribd logo
1 de 20
What are
WebShockets
WebSockets represent a long awaited evolution in
client/server web technology.
They allow a long-held single TCP socket
connection to be established between the client
and server which allows for bi-directional, full
duplex, messages to be instantly distributed with
little overhead resulting in a very low latency
connection.
Both the WebSocket API and the
WebSocket protocol are
standardised which means the web
now has an agreed standard for
realtime communication between
Internet clients and servers.
Originally considered a browser
technology, WebSockets are reaching
far beyond just web browsers and are
becoming a cross platform standard for
realtime communication between client
and server
As well as native WebSocket support in
browsers such as Google Chrome,
Firefox, Opera and a prototype Silverlight
to JavaScript bridge implementation for
Internet Explorer, there are now
WebSocket library implementations in
Objective-C, .NET, Ruby, Java, node.js,
ActionScript and many other languages.
(from a developer’s perspective)
The Internet wasn’t built to be all that
dynamic. It was conceived to be a collection of
HyperText Markup Language (HTML) pages
linking to one another to form a conceptual
web of information.
Over time the static resources
increased in number and richer
items, such as images, began to
be part of the web fabric.
Server technologies advanced allowing for
dynamic server pages - pages whose content was
generated based on a query.
Soon the requirement to have more dynamic web
pages lead to the availability of Dynamic
HyperText Markup Language (DHTML) all thanks
to JavaScript (let’s pretend VBScript never
existed). Over the following years we saw cross
frame communication in an attempt to avoid page
reloads followed by HTTP Polling within frames.
Things started to get interesting with the introduction
of LiveConnect, then the forever frame technique, and
finally, thanks to Microsoft, we ended up with the
XMLHttpRequest object and therefore Asynchronous
JavaScript and XML (AJAX).
In turn, AJAX madeXHR Long-Polling and XHR
Streaming possible. But none of these solutions offered a
truly standardised cross browser solution to realtime bi-
directional communication between a server and a client.
Why WebSockets are a game-changer?
Finally,
WebSockets represent a standard for bi-
directional realtime communication
between servers and clients.
Firstly in web browsers, but ultimately
between any server and any client.
Why WebSockets are a game-changer?
The standards first approach means that
as developers we can finally create
functionality that works consistently
across multiple platforms.
Connection limitations are no longer a
problem since WebSockets represent a
single TCP socket connection.
Why WebSockets are a game-changer?
Cross domain communication has been
considered from day one and is dealt with
within the connection handshake.
This means that services such as Pusher can
easily use them when offering a massively
scalable realtime platform that can be used by
any website, web, desktop or mobile
application.
WebSockets vs AJAX
WebSockets don’t make AJAX obsolete
but they do supersede Comet (HTTP
Long-polling/HTTP Streaming) as the
solution of choice for true realtime
functionality.
AJAX should still be used for
making short-lived web service
calls, and if we eventually see a
good uptake in CORS supporting
web services, it will get even more
useful.
WebSockets vs AJAX
WebSockets should now be the go
to standard for realtime
functionality since they offer low
latency bi-directional
communication over a single
connection.
WebSockets vs AJAX
Even if a web browser doesn’t natively
support the WebSocket object there are
polyfill fallback options which all but
guarantee any web browser can actually
establish a WebSocket connection.
WebSockets vs AJAX
Created By: Ashish Kumar
Source: http://pusher.com/websockets

Mais conteúdo relacionado

Mais procurados

Windows communication foundation ii
Windows communication foundation iiWindows communication foundation ii
Windows communication foundation iiSwamy Gowtham
 
Server interaction with web socket protocol
Server interaction with web socket protocolServer interaction with web socket protocol
Server interaction with web socket protocolRahul Rai
 
Multi-Process JavaScript Architectures
Multi-Process JavaScript ArchitecturesMulti-Process JavaScript Architectures
Multi-Process JavaScript ArchitecturesMark Trostler
 
Osdc - Meteor Intorduction
Osdc - Meteor IntorductionOsdc - Meteor Intorduction
Osdc - Meteor IntorductionAyush Narula
 
Presentation for a Media Company
Presentation for a Media CompanyPresentation for a Media Company
Presentation for a Media CompanyMark Goetsch
 
Server-Sent Events in Action
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in ActionAndrei Rusu
 
dotCloud presents Stack.io
dotCloud presents Stack.io dotCloud presents Stack.io
dotCloud presents Stack.io dotCloud
 
Node Session - 3
Node Session - 3Node Session - 3
Node Session - 3Bhavin Shah
 
Being mean at hackathons
Being mean at hackathonsBeing mean at hackathons
Being mean at hackathonsDevang Paliwal
 
Rails 4 & server sent events
Rails 4 & server sent eventsRails 4 & server sent events
Rails 4 & server sent eventsPiotr Karbownik
 
Wcf and its features
Wcf and its featuresWcf and its features
Wcf and its featuresGulshan Sam
 
Windows communication foundation (part1) jaliya udagedara
Windows communication foundation (part1)    jaliya udagedaraWindows communication foundation (part1)    jaliya udagedara
Windows communication foundation (part1) jaliya udagedaraJaliya Udagedara
 
Large scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLarge scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLe Kien Truc
 

Mais procurados (19)

Windows communication foundation ii
Windows communication foundation iiWindows communication foundation ii
Windows communication foundation ii
 
Server interaction with web socket protocol
Server interaction with web socket protocolServer interaction with web socket protocol
Server interaction with web socket protocol
 
Multi-Process JavaScript Architectures
Multi-Process JavaScript ArchitecturesMulti-Process JavaScript Architectures
Multi-Process JavaScript Architectures
 
Osdc - Meteor Intorduction
Osdc - Meteor IntorductionOsdc - Meteor Intorduction
Osdc - Meteor Intorduction
 
Presentation for a Media Company
Presentation for a Media CompanyPresentation for a Media Company
Presentation for a Media Company
 
zigbee
zigbeezigbee
zigbee
 
Server-Sent Events in Action
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in Action
 
dotCloud presents Stack.io
dotCloud presents Stack.io dotCloud presents Stack.io
dotCloud presents Stack.io
 
Websocket
WebsocketWebsocket
Websocket
 
Node Session - 3
Node Session - 3Node Session - 3
Node Session - 3
 
WCF 35
WCF 35WCF 35
WCF 35
 
Being mean at hackathons
Being mean at hackathonsBeing mean at hackathons
Being mean at hackathons
 
Web Sockets
Web SocketsWeb Sockets
Web Sockets
 
Rails 4 & server sent events
Rails 4 & server sent eventsRails 4 & server sent events
Rails 4 & server sent events
 
Wcf and its features
Wcf and its featuresWcf and its features
Wcf and its features
 
Windows communication foundation (part1) jaliya udagedara
Windows communication foundation (part1)    jaliya udagedaraWindows communication foundation (part1)    jaliya udagedara
Windows communication foundation (part1) jaliya udagedara
 
Large scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLarge scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socket
 
WEBBOX
WEBBOXWEBBOX
WEBBOX
 
Why do you need REST
Why do you need RESTWhy do you need REST
Why do you need REST
 

Semelhante a What are WebSockets and why are they a game-changer

An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use CasesAn In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use CasesTien Nguyen
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeaturesvsnmurthy
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeaturesguest9b7f4753
 
WWW and Mosaic.pptx
WWW and Mosaic.pptxWWW and Mosaic.pptx
WWW and Mosaic.pptxKabirMalik23
 
Sencha Web Applications Come of Age
Sencha Web Applications Come of AgeSencha Web Applications Come of Age
Sencha Web Applications Come of Agebastila
 
The State of WebRTC
The State of WebRTCThe State of WebRTC
The State of WebRTCRobin Hawkes
 
Node.js & Express.js Unleashed
Node.js & Express.js UnleashedNode.js & Express.js Unleashed
Node.js & Express.js UnleashedElewayte
 
A new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr codeA new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr codeMatthew Chang
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebPeter Lubbers
 
Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)PCG Solution
 
Neoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito
 
Decoding real time web communication
Decoding real time web communicationDecoding real time web communication
Decoding real time web communicationAMiT JAiN
 
Web Service Architecture for e-Learning
Web Service Architecture for e-LearningWeb Service Architecture for e-Learning
Web Service Architecture for e-LearningVideoguy
 
05 20254 financial stock application
05 20254 financial stock application05 20254 financial stock application
05 20254 financial stock applicationIAESIJEECS
 
Distributed, Real-time Web Apps
Distributed, Real-time Web AppsDistributed, Real-time Web Apps
Distributed, Real-time Web AppsDocker, Inc.
 

Semelhante a What are WebSockets and why are they a game-changer (20)

Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeatures
 
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use CasesAn In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeatures
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeatures
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
WWW and Mosaic.pptx
WWW and Mosaic.pptxWWW and Mosaic.pptx
WWW and Mosaic.pptx
 
Sencha Web Applications Come of Age
Sencha Web Applications Come of AgeSencha Web Applications Come of Age
Sencha Web Applications Come of Age
 
The State of WebRTC
The State of WebRTCThe State of WebRTC
The State of WebRTC
 
Node.js & Express.js Unleashed
Node.js & Express.js UnleashedNode.js & Express.js Unleashed
Node.js & Express.js Unleashed
 
A new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr codeA new interface between smart device and web using html5 web socket and qr code
A new interface between smart device and web using html5 web socket and qr code
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
 
Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)Report file on Web technology(html5 and css3)
Report file on Web technology(html5 and css3)
 
ClientServer Websocket.pptx
ClientServer Websocket.pptxClientServer Websocket.pptx
ClientServer Websocket.pptx
 
Neoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito — Intro to WebSockets
Neoito — Intro to WebSockets
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
Decoding real time web communication
Decoding real time web communicationDecoding real time web communication
Decoding real time web communication
 
Web Service Architecture for e-Learning
Web Service Architecture for e-LearningWeb Service Architecture for e-Learning
Web Service Architecture for e-Learning
 
05 20254 financial stock application
05 20254 financial stock application05 20254 financial stock application
05 20254 financial stock application
 
Distributed, Real-time Web Apps
Distributed, Real-time Web AppsDistributed, Real-time Web Apps
Distributed, Real-time Web Apps
 
Web 2 0 Tools
Web 2 0 ToolsWeb 2 0 Tools
Web 2 0 Tools
 

Último

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

What are WebSockets and why are they a game-changer

  • 2. WebShockets WebSockets represent a long awaited evolution in client/server web technology. They allow a long-held single TCP socket connection to be established between the client and server which allows for bi-directional, full duplex, messages to be instantly distributed with little overhead resulting in a very low latency connection.
  • 3. Both the WebSocket API and the WebSocket protocol are standardised which means the web now has an agreed standard for realtime communication between Internet clients and servers.
  • 4. Originally considered a browser technology, WebSockets are reaching far beyond just web browsers and are becoming a cross platform standard for realtime communication between client and server
  • 5. As well as native WebSocket support in browsers such as Google Chrome, Firefox, Opera and a prototype Silverlight to JavaScript bridge implementation for Internet Explorer, there are now WebSocket library implementations in Objective-C, .NET, Ruby, Java, node.js, ActionScript and many other languages.
  • 6. (from a developer’s perspective)
  • 7. The Internet wasn’t built to be all that dynamic. It was conceived to be a collection of HyperText Markup Language (HTML) pages linking to one another to form a conceptual web of information.
  • 8. Over time the static resources increased in number and richer items, such as images, began to be part of the web fabric. Server technologies advanced allowing for dynamic server pages - pages whose content was generated based on a query.
  • 9. Soon the requirement to have more dynamic web pages lead to the availability of Dynamic HyperText Markup Language (DHTML) all thanks to JavaScript (let’s pretend VBScript never existed). Over the following years we saw cross frame communication in an attempt to avoid page reloads followed by HTTP Polling within frames.
  • 10. Things started to get interesting with the introduction of LiveConnect, then the forever frame technique, and finally, thanks to Microsoft, we ended up with the XMLHttpRequest object and therefore Asynchronous JavaScript and XML (AJAX). In turn, AJAX madeXHR Long-Polling and XHR Streaming possible. But none of these solutions offered a truly standardised cross browser solution to realtime bi- directional communication between a server and a client.
  • 11.
  • 12. Why WebSockets are a game-changer? Finally, WebSockets represent a standard for bi- directional realtime communication between servers and clients. Firstly in web browsers, but ultimately between any server and any client.
  • 13. Why WebSockets are a game-changer? The standards first approach means that as developers we can finally create functionality that works consistently across multiple platforms. Connection limitations are no longer a problem since WebSockets represent a single TCP socket connection.
  • 14. Why WebSockets are a game-changer? Cross domain communication has been considered from day one and is dealt with within the connection handshake. This means that services such as Pusher can easily use them when offering a massively scalable realtime platform that can be used by any website, web, desktop or mobile application.
  • 15.
  • 16. WebSockets vs AJAX WebSockets don’t make AJAX obsolete but they do supersede Comet (HTTP Long-polling/HTTP Streaming) as the solution of choice for true realtime functionality.
  • 17. AJAX should still be used for making short-lived web service calls, and if we eventually see a good uptake in CORS supporting web services, it will get even more useful. WebSockets vs AJAX
  • 18. WebSockets should now be the go to standard for realtime functionality since they offer low latency bi-directional communication over a single connection. WebSockets vs AJAX
  • 19. Even if a web browser doesn’t natively support the WebSocket object there are polyfill fallback options which all but guarantee any web browser can actually establish a WebSocket connection. WebSockets vs AJAX
  • 20. Created By: Ashish Kumar Source: http://pusher.com/websockets