Building real-time web apps with HTML5 WebSockets

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Building Web APIs in Windows Azure Name Title Microsoft Corporation.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Internet Explorer 8 For Developers Gal Kogman BNL
Multitenant Model Request/Response General Model.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Announcing Demo Announcing.
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
Windows Azure Connect Name Title Microsoft Corporation.
demo Receive Inventory Export Parse and Normalize.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Building Social Games for Windows 8 with Windows Azure Name Title Microsoft Corporation.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
announcing Dev Manager Do I understand what we’ve built? Developer Can I bet on using this shared component? Testers What’s changed since I last.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
> “Forms over data” E2E business app WCF RIA Services.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

demo User Signs Up Temporary Account is Created with Verification Link Sent User Clicks Link Account is Activated Login.Register(userName,
DataModel VisualizationExternal Assets Workbook Excel Services API BrowserRich Apps EWA JSOMBrowser REST BrowserRich Apps.
Build data-driven collection and list apps using XAML
Возможности Excel 2010, о которых следует знать
Building real-time web apps with WebSockets using IIS, ASP.NET and WCF
Citrix Virtual Desktops version 7
Title of Presentation 11/22/2018 3:34 PM
Deep dive on app data roaming
What’s new in Visual Studio for web developers
Baseline: How Are We Doing Now?
Title of Presentation 12/2/2018 3:48 PM
Building responsive apps and sites with HTML5 web workers
ASP.NET 4.5 loves HTML5, CSS3 & JavaScript
Create rich, data-driven Web apps with ASP.NET 4.5 Web Forms
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows 8 Security Internals
Accessing Web Services in Silverlight 4
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Leveraging existing code in Metro style apps
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
The complete developer's guide to the SkyDrive API
ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
John Hazen Principal Program Manager Lead Microsoft Corporation
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

Building real-time web apps with HTML5 WebSockets 11/16/2018 10:41 AM PLAT-373C Building real-time web apps with HTML5 WebSockets Ravi Rao Principal Program Manager Lead Microsoft Corporation © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda Users want the latest information in real-time, NOW! WebSocket – Richness of sockets and reach of the web Works everywhere – Standards, interoperability & partners You’ll leave with an understanding that WebSockets enable the real-time web WebSockets are standards based, interoperable and easy WebSockets are everywhere - in the browser and beyond

Users want the latest information NOW!

The real-time web – it’s what users want! Stock streamers – “Sell sell sell buy buy sell buy” Live scores – “winning winning tie losing won” Airline location – “I am here now, I am here now” Twitter search results – “search results, more search results” New email – “You have mail” Interactive games – “it’s your turn now” Facebook wall updates – “new comment on my wall” Is the web ready?

The web is 20 years old HTTP underlying protocol for web Client Server HTTP underlying protocol for web Designed for requesting pages and getting responses Open a web page Download a document Upload my video Play a movie Request – Response paradigm GET <page> 200 OK <page> GET <score> 200 OK <3-0> GET <score> 304 Not modified GET <score> 304 Not modified GET <score> 304 Not modified

The problem Real-time web requires the server to communicate asynchronously with a client HTTP is a request response protocol – server can only communicate with a client once per request received

Bing HTTP traffic drilldown demo Bing HTTP traffic drilldown

Workarounds exist and are in use today Long polling Multiple channels between client and server Infinite POSTs/Chunked encoding In the end, these are all hacks on HTTP which complicate the programming model, and suffer from scale-out and latency related issues. In addition, interactions with load balancers can be problematic

HTTP is not adequate for the real-time web

WebSocket - an enabler for the real-time web

WebSockets - inception Sockets are a full-duplex bi-directional protocol It has the richness required for real-time web applications Sockets however are not directly available to web developers In addition, custom socket protocols are blocked by proxies HTTP is a request response protocol layered on sockets It has reach, since it traverses through HTTP proxies But it’s not rich enough for real-time web scenarios Real-time web needs richness of Sockets + reach of Web WebSockets

WebSockets – Sockets for the Web Full duplex bidirectional communication Supports unsecured (TCP) and secured (SSL) modes Traverses proxies and firewalls (especially when using SSL) Ping/Pong messages to keep connection alive Origin based security

Establishing a WebSocket Connection HTTP Client HTTP Server 1

Establishing a WebSocket Connection HTTP Client HTTP Server 1 HTTP Switching Protocols HTTP Client HTTP Server 2

Establishing a WebSocket Connection HTTP Client HTTP Server 1 HTTP “Switching Protocols” HTTP Client HTTP Server 2 Binary or UTF8 Messages Web Socket Web Socket 3

WebSocket protocol drilldown with netmon demo WebSocket protocol drilldown with netmon

W3C WebSocket API Really simple Javascript W3C WebSocket API Primary methods + events WebSocket(URL, [protocols]) – Create a connection onOpen() – WebSocket opened Send(data) – Send data (string, Blob or Arraybuffer) onMessage() – Message received onClose() – Close message received onError() - Error

WebSocket API drilldown with “echo” demo WebSocket API drilldown with “echo”

Stock ticker with WebSocket demo Stock ticker with WebSocket

WebSocket enables the real-time web Full-duplex, bi-directional model allows server to communicate with the client anytime Lightweight framing in the protocol makes it suitable for high performance applications Simple API makes it easy to use!

Interoperability

Standards and Interoperability Experiment HTML5 Labs Create app IE test drives Validate Test suite Ship! IE support

Partners

demo Ericom AccessNow

demo Citrix HTML5 receiver

WebSockets are everywhere Client IE 10 (of course!) and other browsers Windows Runtime Server System.Net IIS ASP WCF

Recap WebSockets is a full-duplex, bi-directional protocol for real-time web scenarios with a simple to use W3C API IE 10 has a great implementation of the standard, and there are interop tests and partners leveraging this today! We’ve built WebSocket support everywhere – allowing you to build your application in the language and platform of your choice

For more information Sessions Sites 807: Building real-time web appslications with WebSockets using IIS, ASP.NET and WCF 580: Building Windows Runtime Sockets Applications 807: Making apps social and connected with HTTP services 382: What’s new with HTML5, Javascript and CSS3 Sites IE test drive: http://ie.microsoft.com/testdrive/ HTML5 labs: http://html5labs.interoperabilitybridges.com/prototypes/websockets/websockets/info WebSocket protocol: https://datatracker.ietf.org/doc/draft-ietf-hybi-thewebsocketprotocol/ WebSocket API: http://dev.w3.org/html5/websockets/ Ericom: http://demo.EricomAccessNow.com Citrix: http://www.citrix.com

11/16/2018 10:41 AM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.