SlideShare a Scribd company logo
1 of 11
Download to read offline
Developer Conference 2012
    MICROSOFT USER GROUP KOLKATA
Web Sockets – Building Real Time App for Web

Sankarsan Bose
26th May , 2012
The Real Time “Web”

 Real Time Web
 -   Real time information delivery
 -   Instant updates, searches
 -   Facebook, Twitter.. Etc.

 Technologies
 -   HTTP essentially is still stateless
 -   Technologies/Techniques we have to support the same are
      -   AJAX (XMLHttpRequest)
      -   Long Polling
      -   Comet


 Challenges
 -   Clients polling for data, ideally where server should broadcast
 -   Overhead of
      Multiple TCP connections
      Same/similar header data being transferred each time over the wire
      Customized ways to tracking or correlating requests and responses.
WebSockets - Introduction

 WebSockets

 -   WebSockets is a protocol for two-way communication between client and server
 -   Uses a single TCP connection.
 -   Takes away overhead of
      -    Multiple TCP connections
      -    Same/similar header data being transferred each time over the wire
      -    Customized ways to tracking or correlating requests and responses.

 -   Part of HTML5       initiative
 -   WebSocket Specs has
      -    Protocol Specification
      -    API Specification

 -   Supported by Google Chrome, Firefox,IE   10
 -   Server side support by Jetty,Node.js (Socket.io), IIS   8.0 (on Windows 8)
WebSockets with IIS 8.0 and IE10




Let’s go to the code…
WebSocket - API

            Client                                                        Server
          (Browser)
                      Establish Connection
                      var ws= new WebSocket("ws://www.websockets.org");

                      Connection Established

OnOpen event
fired                 Data Sent to Server

Send method           Data Sent from Server
called

OnMessage
event is fired        Close Connection


 Close method
 is called            Connection Closed



OnClose
Event is fired
WebSockets Protocol




      Client                                              Server
    (Browser)

          Send HTTP Request for protocol switch/upgrade




         - If server understands WebSocket protocol
                - It issues HTTP 101
                - There is a protocol switch
                - HTTP connection is no longer used
                - WebSocket connection takes over the
                   underlying TCP connection
References

- http://www.websocket.org/
- http://datatracker.ietf.org/doc/rfc6455/?include_text=1
- http://dev.w3.org/html5/websockets/
- http://www.paulbatum.com/2011/10/getting-to-know-
  systemnetwebsockets.html
- http://codingndesign.com/blog/?p=267
Thanks Everybody, For Your Time.
Happy Coding…..Enjoy Learning..
Speaker Details/Contact




- http://twitter.com/sankarsan
- http://sankarsan.wordpress.com
- http://codingndesign.com
- http://sankarsanbose.com
Dev con kolkata 2012   websockets

More Related Content

What's hot

WEB SOCKET 應用
WEB SOCKET 應用WEB SOCKET 應用
WEB SOCKET 應用Jerromy Lee
 
Missouri District Presenation
Missouri District PresenationMissouri District Presenation
Missouri District PresenationRob Jacklin
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketbrent bucci
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSocketsRoland M
 
Introduction to WebSockets Presentation
Introduction to WebSockets PresentationIntroduction to WebSockets Presentation
Introduction to WebSockets PresentationJulien LaPointe
 
Seting Database Dreamveaver
Seting Database DreamveaverSeting Database Dreamveaver
Seting Database DreamveaverDon Komo Studio
 
How HTTP/2 will change the web as we know it
How HTTP/2 will change the web as we know itHow HTTP/2 will change the web as we know it
How HTTP/2 will change the web as we know itNils De Moor
 
Apidaze WebRTC Workshop barcelona 21st april 2013
Apidaze WebRTC Workshop barcelona 21st april 2013Apidaze WebRTC Workshop barcelona 21st april 2013
Apidaze WebRTC Workshop barcelona 21st april 2013Alan Quayle
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSocketsGunnar Hillert
 
大众点评网 Web开发之路
大众点评网 Web开发之路大众点评网 Web开发之路
大众点评网 Web开发之路alcoholwang
 
Azure Bastion Cloud swipes 01
Azure Bastion Cloud swipes   01 Azure Bastion Cloud swipes   01
Azure Bastion Cloud swipes 01 Dileepa Rajapaksa
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 

What's hot (20)

Html5 websockets
Html5 websocketsHtml5 websockets
Html5 websockets
 
WEB SOCKET 應用
WEB SOCKET 應用WEB SOCKET 應用
WEB SOCKET 應用
 
Missouri District Presenation
Missouri District PresenationMissouri District Presenation
Missouri District Presenation
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
 
Introduction to WebSockets Presentation
Introduction to WebSockets PresentationIntroduction to WebSockets Presentation
Introduction to WebSockets Presentation
 
Seting Database Dreamveaver
Seting Database DreamveaverSeting Database Dreamveaver
Seting Database Dreamveaver
 
WebSockets and Java
WebSockets and JavaWebSockets and Java
WebSockets and Java
 
How HTTP/2 will change the web as we know it
How HTTP/2 will change the web as we know itHow HTTP/2 will change the web as we know it
How HTTP/2 will change the web as we know it
 
Apidaze WebRTC Workshop barcelona 21st april 2013
Apidaze WebRTC Workshop barcelona 21st april 2013Apidaze WebRTC Workshop barcelona 21st april 2013
Apidaze WebRTC Workshop barcelona 21st april 2013
 
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerryjWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
 
Web fundamentals - part 1
Web fundamentals - part 1Web fundamentals - part 1
Web fundamentals - part 1
 
Presentation (PPT)
Presentation (PPT)Presentation (PPT)
Presentation (PPT)
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
Websocket shanon
Websocket shanonWebsocket shanon
Websocket shanon
 
大众点评网 Web开发之路
大众点评网 Web开发之路大众点评网 Web开发之路
大众点评网 Web开发之路
 
Cors michael
Cors michaelCors michael
Cors michael
 
Webim152
Webim152Webim152
Webim152
 
Azure Bastion Cloud swipes 01
Azure Bastion Cloud swipes   01 Azure Bastion Cloud swipes   01
Azure Bastion Cloud swipes 01
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 

Viewers also liked

Journey Through The Cloud Webinar Program - What is AWS?
Journey Through  The Cloud Webinar Program - What is AWS?Journey Through  The Cloud Webinar Program - What is AWS?
Journey Through The Cloud Webinar Program - What is AWS?Amazon Web Services
 
Session 1 IaaS, PaaS, SaaS Overview
Session 1   IaaS, PaaS, SaaS OverviewSession 1   IaaS, PaaS, SaaS Overview
Session 1 IaaS, PaaS, SaaS OverviewCode Mastery
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFCode Mastery
 
Using SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesUsing SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesCode Mastery
 
Parallel Programming in .NET
Parallel Programming in .NETParallel Programming in .NET
Parallel Programming in .NETSANKARSAN BOSE
 
Session 3b The SF SaaS Framework
Session 3b   The SF SaaS FrameworkSession 3b   The SF SaaS Framework
Session 3b The SF SaaS FrameworkCode Mastery
 

Viewers also liked (6)

Journey Through The Cloud Webinar Program - What is AWS?
Journey Through  The Cloud Webinar Program - What is AWS?Journey Through  The Cloud Webinar Program - What is AWS?
Journey Through The Cloud Webinar Program - What is AWS?
 
Session 1 IaaS, PaaS, SaaS Overview
Session 1   IaaS, PaaS, SaaS OverviewSession 1   IaaS, PaaS, SaaS Overview
Session 1 IaaS, PaaS, SaaS Overview
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCF
 
Using SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesUsing SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS Cubes
 
Parallel Programming in .NET
Parallel Programming in .NETParallel Programming in .NET
Parallel Programming in .NET
 
Session 3b The SF SaaS Framework
Session 3b   The SF SaaS FrameworkSession 3b   The SF SaaS Framework
Session 3b The SF SaaS Framework
 

Similar to Dev con kolkata 2012 websockets

Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01purans
 
Codecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web socketsCodecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web socketsCodecamp Romania
 
Codecamp Iasi-26 nov 2011 - Html 5 WebSockets
Codecamp Iasi-26 nov 2011 - Html 5 WebSocketsCodecamp Iasi-26 nov 2011 - Html 5 WebSockets
Codecamp Iasi-26 nov 2011 - Html 5 WebSocketsFlorin Cardasim
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15streamdata.io
 
Decoding real time web communication
Decoding real time web communicationDecoding real time web communication
Decoding real time web communicationAMiT JAiN
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCharles Moulliard
 
Websocket technology for XPages
Websocket technology for XPagesWebsocket technology for XPages
Websocket technology for XPagesCsaba Kiss
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets PresentationVolodymyr Lavrynovych
 
WebSockets On Fire
WebSockets On FireWebSockets On Fire
WebSockets On FireJef Claes
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsNaresh Chintalcheru
 
HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014Christian Wenz
 
Building+restful+webservice
Building+restful+webserviceBuilding+restful+webservice
Building+restful+webservicelonegunman
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketMauricio "Maltron" Leal
 

Similar to Dev con kolkata 2012 websockets (20)

Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
 
Codecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web socketsCodecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web sockets
 
Codecamp Iasi-26 nov 2011 - Html 5 WebSockets
Codecamp Iasi-26 nov 2011 - Html 5 WebSocketsCodecamp Iasi-26 nov 2011 - Html 5 WebSockets
Codecamp Iasi-26 nov 2011 - Html 5 WebSockets
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15
 
J web socket
J web socketJ web socket
J web socket
 
WebSockets - Boosting Web Communication - SDC 2011
WebSockets - Boosting Web Communication - SDC 2011WebSockets - Boosting Web Communication - SDC 2011
WebSockets - Boosting Web Communication - SDC 2011
 
Decoding real time web communication
Decoding real time web communicationDecoding real time web communication
Decoding real time web communication
 
Websocket
WebsocketWebsocket
Websocket
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Websocket technology for XPages
Websocket technology for XPagesWebsocket technology for XPages
Websocket technology for XPages
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
WebSockets On Fire
WebSockets On FireWebSockets On Fire
WebSockets On Fire
 
ClientServer Websocket.pptx
ClientServer Websocket.pptxClientServer Websocket.pptx
ClientServer Websocket.pptx
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 
HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014HTML5/JavaScript Communication APIs - DPC 2014
HTML5/JavaScript Communication APIs - DPC 2014
 
Web-Socket
Web-SocketWeb-Socket
Web-Socket
 
Building+restful+webservice
Building+restful+webserviceBuilding+restful+webservice
Building+restful+webservice
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocket
 
Wcf remaining
Wcf remainingWcf remaining
Wcf remaining
 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
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...
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Dev con kolkata 2012 websockets

  • 1. Developer Conference 2012 MICROSOFT USER GROUP KOLKATA
  • 2. Web Sockets – Building Real Time App for Web Sankarsan Bose 26th May , 2012
  • 3. The Real Time “Web” Real Time Web - Real time information delivery - Instant updates, searches - Facebook, Twitter.. Etc. Technologies - HTTP essentially is still stateless - Technologies/Techniques we have to support the same are - AJAX (XMLHttpRequest) - Long Polling - Comet Challenges - Clients polling for data, ideally where server should broadcast - Overhead of Multiple TCP connections Same/similar header data being transferred each time over the wire Customized ways to tracking or correlating requests and responses.
  • 4. WebSockets - Introduction WebSockets - WebSockets is a protocol for two-way communication between client and server - Uses a single TCP connection. - Takes away overhead of - Multiple TCP connections - Same/similar header data being transferred each time over the wire - Customized ways to tracking or correlating requests and responses. - Part of HTML5 initiative - WebSocket Specs has - Protocol Specification - API Specification - Supported by Google Chrome, Firefox,IE 10 - Server side support by Jetty,Node.js (Socket.io), IIS 8.0 (on Windows 8)
  • 5. WebSockets with IIS 8.0 and IE10 Let’s go to the code…
  • 6. WebSocket - API Client Server (Browser) Establish Connection var ws= new WebSocket("ws://www.websockets.org"); Connection Established OnOpen event fired Data Sent to Server Send method Data Sent from Server called OnMessage event is fired Close Connection Close method is called Connection Closed OnClose Event is fired
  • 7. WebSockets Protocol Client Server (Browser) Send HTTP Request for protocol switch/upgrade - If server understands WebSocket protocol - It issues HTTP 101 - There is a protocol switch - HTTP connection is no longer used - WebSocket connection takes over the underlying TCP connection
  • 8. References - http://www.websocket.org/ - http://datatracker.ietf.org/doc/rfc6455/?include_text=1 - http://dev.w3.org/html5/websockets/ - http://www.paulbatum.com/2011/10/getting-to-know- systemnetwebsockets.html - http://codingndesign.com/blog/?p=267
  • 9. Thanks Everybody, For Your Time. Happy Coding…..Enjoy Learning..
  • 10. Speaker Details/Contact - http://twitter.com/sankarsan - http://sankarsan.wordpress.com - http://codingndesign.com - http://sankarsanbose.com