SlideShare uma empresa Scribd logo
1 de 34
Server-side
support
Scenario
requirements
Foreground vs
background
Portability
requirements
Performance
considerations
Ease of coding
HTTPS with user authentication
Device-Cloud bi-directional communication
Network communication between devices over sockets
Download/Upload content to cloud in the background
Feature Windows.Web.Http System.Net.Http
Programming Language support All UWP languages C#/VB
Private CA/Self-signed certificate √ √
Custom validation of server certificate √ (new!) X (on roadmap)
Integration with native UI for Auth √ X
Client Certificate Support √ Partial
Cross-platform support (Xamarin) X √
var filter = new
HttpBaseProtocolFilter();
filter.ClientCertificate =
myCertificate;
var client = new HttpClient(); OR
var client = new HttpClient(filter);
HttpResponseMessage response =
await client.GetAsync(uri);
Demo: Online Auction App
Requirements:
1. Custom server certificate validation
2. Client Certificate
API Choice:
Windows.Web.Http.HttpClient
http://aka.ms/httpclientblogpost
Feature HttpClient WebSockets
Messaging pattern Request-response Bidirectional
Duplex communication? Half Full
Latency/overhead Higher Lower
Proxy/Firewall traversal √ √
Server certificate custom validation √(new!) √ (new!)
REST support, CRUD semantics Built-in Needs additional code
Caching and data compression Built-in Needs additional code
Feature MessageWebSocket StreamWebSocket
Message Format Discrete WebSocket
messages
Continuous data
stream
UTF-8 Strings/JSON data √ X
Binary data √ √
Recommended data size Small (bytes/KB) Large (MB)
Recommended content types Strings, JSON content Audio, Video, Photos
var socket= new MessageWebSocket();
socket.MessageReceived =
myReceivingHandler;
socket.Closed = myClosedHandler;
await socket.ConnectAsync(serverUri);
// Send data.
socket.Close(code, reason);
Demo: Online Auction App
Requirements:
1. Client-Server bidirectional communication
2. Server relays others’ bids independent of client’s bids
3. Minimum latency and overhead
API Choice:
Windows.Networking.Sockets.MessageWebSocket
Wireshark trace for WebSocket run
Wireshark trace for HttpClient run
Bytes on the wire
Feature Windows.Networking.Sockets System.Net.Sockets WinSock
Language
Support
C++/CX √ X √
JavaScript √ X X
C#/VB √ √ X
Activity Support
in Background
√ X X
SocketActivityTrigger
socketTaskBuilder.TaskEntryPoint =
"SocketActivityBackgroundTask.SocketActivity
Task";
var trigger = new SocketActivityTrigger();
socketTaskBuilder.SetTrigger(trigger);
var task = socketTaskBuilder.Register();
socket.EnableTransferOwnership(task.TaskId,
SocketActivityConnectedStandbyAction.Wake);
await socket.ConnectAsync(target, port);
Things to note:
• At any point ownership of the socket can be only in one component
• Find the list of sockets owned by the service using:
SocketActivityInformation.AllSockets
• Socket not in the list means socket is already closed or retrieved
socket.TransferOwnership(socketId);
Demo: Multi-player Game
Requirements:
1. App communication between devices over sockets
2. Listening on the socket activity even when the app is not
running
API Choice:
Windows.Networking.Sockets
Feature HttpClient in BG Task Windows.Networking.
BackgroundTransfer
Protocol HTTP HTTP/FTP
Destination Location In memory & File File only
Recommended file size Small (KBs) Large (MBs)
Resiliency (network connection
drop/reboot)
Needs additional code Can be resumed
where left off
Network Cost Awareness Needs additional code Built-in
Battery Saver Awareness Needs additional code Built-in
BackgroundDownloader downloader = new
BackgroundDownloader();
DownloadOperation download =
downloader.CreateDownload(new
Uri(downloadlocation), file);
Task<DownloadOperation> startTask =
download.StartAsync().AsTask();
downloads = await
BackgroundDownloader.GetCurrentDownloadsAsync
();
await
download.AttachAsync().AsTask(cts.Token,
progressCallback);
Task<DownloadOperation> startTask =
download.StartAsync().AsTask();
Task continueTask =
startTask.ContinueWith(OnDownloadCompleted);
BackgroundTransferCompletionGroup completionGroup
= new BackgroundTransferCompletionGroup();
//Create background task builder
builder.SetTrigger(completionGroup.Trigger);
BackgroundDownloader downloader = new
BackgroundDownloader(completionGroup);
Demo: Multi-player Game
Requirements:
1. Download a new game level in the Background
2. Show a toast notification on completion of the download
API Choice:
Windows.Networking.BackgroundTransfer
http://aka.ms/NetworkApiChoice
https://github.com/Microsoft/Windows-universal-samples/
• HttpClient
• WebSockets
• SocketActivityStreamSocket
• BackgroundTransfer
http://aka.ms/WinDevUserVoice
Build 2016 - P426 - Using the Right Networking API for your UWP App

Mais conteúdo relacionado

Mais procurados

Libvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDLibvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDCraig Rodrigues
 
Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain Conor Svensson
 
Improving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetricsImproving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetricsChan Shik Lim
 
Introduction to service stack
Introduction to service stackIntroduction to service stack
Introduction to service stackFabio Cozzolino
 
Introduction to ServiceStack
Introduction to ServiceStackIntroduction to ServiceStack
Introduction to ServiceStackmobiweave
 

Mais procurados (7)

Griffon @ Svwjug
Griffon @ SvwjugGriffon @ Svwjug
Griffon @ Svwjug
 
Libvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDLibvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSD
 
Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain
 
Web3j 2.0 Update
Web3j 2.0 UpdateWeb3j 2.0 Update
Web3j 2.0 Update
 
Improving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetricsImproving monitoring systems Interoperability with OpenMetrics
Improving monitoring systems Interoperability with OpenMetrics
 
Introduction to service stack
Introduction to service stackIntroduction to service stack
Introduction to service stack
 
Introduction to ServiceStack
Introduction to ServiceStackIntroduction to ServiceStack
Introduction to ServiceStack
 

Destaque

RAD Studio 10 시애틀: 출시 세미나 발표자료
RAD Studio 10 시애틀: 출시 세미나 발표자료RAD Studio 10 시애틀: 출시 세미나 발표자료
RAD Studio 10 시애틀: 출시 세미나 발표자료Devgear
 
20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio
20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio
20170623 최신OS와 멀티플랫폼 개발 전략 with RAD StudioDevgear
 
[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder
[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder
[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++BuilderDevgear
 
온라인세미나: 처음 만나는 RAD Studio XE8
온라인세미나: 처음 만나는 RAD Studio XE8온라인세미나: 처음 만나는 RAD Studio XE8
온라인세미나: 처음 만나는 RAD Studio XE8Devgear
 
RAD스튜디오 개발환경(IDE) 사용법
RAD스튜디오 개발환경(IDE) 사용법RAD스튜디오 개발환경(IDE) 사용법
RAD스튜디오 개발환경(IDE) 사용법Devgear
 
RAD스튜디오 100% 활용하기
RAD스튜디오 100% 활용하기 RAD스튜디오 100% 활용하기
RAD스튜디오 100% 활용하기 Devgear
 
RAD스튜디오를 활용한 헬스 케어 시스템 구축방안
RAD스튜디오를 활용한 헬스 케어 시스템 구축방안 RAD스튜디오를 활용한 헬스 케어 시스템 구축방안
RAD스튜디오를 활용한 헬스 케어 시스템 구축방안 Devgear
 

Destaque (7)

RAD Studio 10 시애틀: 출시 세미나 발표자료
RAD Studio 10 시애틀: 출시 세미나 발표자료RAD Studio 10 시애틀: 출시 세미나 발표자료
RAD Studio 10 시애틀: 출시 세미나 발표자료
 
20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio
20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio
20170623 최신OS와 멀티플랫폼 개발 전략 with RAD Studio
 
[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder
[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder
[데브기어 온라인세미나] 20160504 새로 강화된 기능들 RAD Studio, Delphi, C++Builder
 
온라인세미나: 처음 만나는 RAD Studio XE8
온라인세미나: 처음 만나는 RAD Studio XE8온라인세미나: 처음 만나는 RAD Studio XE8
온라인세미나: 처음 만나는 RAD Studio XE8
 
RAD스튜디오 개발환경(IDE) 사용법
RAD스튜디오 개발환경(IDE) 사용법RAD스튜디오 개발환경(IDE) 사용법
RAD스튜디오 개발환경(IDE) 사용법
 
RAD스튜디오 100% 활용하기
RAD스튜디오 100% 활용하기 RAD스튜디오 100% 활용하기
RAD스튜디오 100% 활용하기
 
RAD스튜디오를 활용한 헬스 케어 시스템 구축방안
RAD스튜디오를 활용한 헬스 케어 시스템 구축방안 RAD스튜디오를 활용한 헬스 케어 시스템 구축방안
RAD스튜디오를 활용한 헬스 케어 시스템 구축방안
 

Semelhante a Build 2016 - P426 - Using the Right Networking API for your UWP App

Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitAriya Hidayat
 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitAriya Hidayat
 
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld
 
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixOSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixManish Pandit
 
11.Open Data Protocol(ODATA)
11.Open Data Protocol(ODATA) 11.Open Data Protocol(ODATA)
11.Open Data Protocol(ODATA) Nguyen Tuan
 
Real time websites and mobile apps with SignalR
Real time websites and mobile apps with SignalRReal time websites and mobile apps with SignalR
Real time websites and mobile apps with SignalRRoy Cornelissen
 
Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggStreamNative
 
Windows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network CommunicationWindows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network CommunicationOliver Scheer
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitAriya Hidayat
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeAcademy
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twistedsdsern
 
Building Websocket Applications with GlassFish and Grizzly
Building Websocket Applications with GlassFish and GrizzlyBuilding Websocket Applications with GlassFish and Grizzly
Building Websocket Applications with GlassFish and GrizzlyJustin Lee
 
Openstack Icehouse IaaS Presentation
Openstack Icehouse  IaaS PresentationOpenstack Icehouse  IaaS Presentation
Openstack Icehouse IaaS Presentationemad ahmed
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰KAI CHU CHUNG
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCLFastly
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008Joe Walker
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)Ericom Software
 

Semelhante a Build 2016 - P426 - Using the Right Networking API for your UWP App (20)

Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKit
 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKit
 
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
 
WebSocket
WebSocketWebSocket
WebSocket
 
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixOSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
 
11.Open Data Protocol(ODATA)
11.Open Data Protocol(ODATA) 11.Open Data Protocol(ODATA)
11.Open Data Protocol(ODATA)
 
Real time websites and mobile apps with SignalR
Real time websites and mobile apps with SignalRReal time websites and mobile apps with SignalR
Real time websites and mobile apps with SignalR
 
Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris Kellogg
 
Windows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network CommunicationWindows Phone 8 - 12 Network Communication
Windows Phone 8 - 12 Network Communication
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Real-time ASP.NET with SignalR
Real-time ASP.NET with SignalRReal-time ASP.NET with SignalR
Real-time ASP.NET with SignalR
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
 
Building Websocket Applications with GlassFish and Grizzly
Building Websocket Applications with GlassFish and GrizzlyBuilding Websocket Applications with GlassFish and Grizzly
Building Websocket Applications with GlassFish and Grizzly
 
Openstack Icehouse IaaS Presentation
Openstack Icehouse  IaaS PresentationOpenstack Icehouse  IaaS Presentation
Openstack Icehouse IaaS Presentation
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 

Mais de Windows Developer

Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3DOur Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3DWindows Developer
 
Fluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: OfficeFluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: OfficeWindows Developer
 
Building powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apisBuilding powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apisWindows Developer
 
Creating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual LayerCreating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual LayerWindows Developer
 
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017Windows Developer
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Windows Developer
 
How Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independentHow Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independentWindows Developer
 
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows InkHarnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows InkWindows Developer
 
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...Windows Developer
 
Developing for Sets on Windows 10
Developing for Sets on Windows 10Developing for Sets on Windows 10
Developing for Sets on Windows 10Windows Developer
 
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...Windows Developer
 
Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...Windows Developer
 
Fluent Design: Evolving our Design System
Fluent Design: Evolving our Design SystemFluent Design: Evolving our Design System
Fluent Design: Evolving our Design SystemWindows Developer
 
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Windows Developer
 
Windows 10 on ARM for developers
Windows 10 on ARM for developersWindows 10 on ARM for developers
Windows 10 on ARM for developersWindows Developer
 
Building Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in UnityBuilding Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in UnityWindows Developer
 
Set up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOMESet up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOMEWindows Developer
 
Modernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web AppModernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web AppWindows Developer
 
Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...Windows Developer
 
Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction Windows Developer
 

Mais de Windows Developer (20)

Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3DOur Fluent Path to Spatial Computing: Easy as 1-2D-3D
Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
 
Fluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: OfficeFluent Design System inside of Microsoft: Office
Fluent Design System inside of Microsoft: Office
 
Building powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apisBuilding powerful desktop and MR applications with new windowing apis
Building powerful desktop and MR applications with new windowing apis
 
Creating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual LayerCreating Innovative Experiences for Fluent Design using the Visual Layer
Creating Innovative Experiences for Fluent Design using the Visual Layer
 
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
 
Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10Modernizing Desktop Apps on Windows 10
Modernizing Desktop Apps on Windows 10
 
How Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independentHow Simplygon helped Remix become platform independent
How Simplygon helped Remix become platform independent
 
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows InkHarnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink
 
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
 
Developing for Sets on Windows 10
Developing for Sets on Windows 10Developing for Sets on Windows 10
Developing for Sets on Windows 10
 
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
 
Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...Drive user reengagement across all your Windows, Android, and iOS with Micros...
Drive user reengagement across all your Windows, Android, and iOS with Micros...
 
Fluent Design: Evolving our Design System
Fluent Design: Evolving our Design SystemFluent Design: Evolving our Design System
Fluent Design: Evolving our Design System
 
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
 
Windows 10 on ARM for developers
Windows 10 on ARM for developersWindows 10 on ARM for developers
Windows 10 on ARM for developers
 
Building Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in UnityBuilding Mixed reality with the new capabilities in Unity
Building Mixed reality with the new capabilities in Unity
 
Set up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOMESet up a windows dev environment that feels like $HOME
Set up a windows dev environment that feels like $HOME
 
Modernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web AppModernizing Twitter for Windows as a Progressive Web App
Modernizing Twitter for Windows as a Progressive Web App
 
Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...Holograms for trade education, built for students, by students with Immersive...
Holograms for trade education, built for students, by students with Immersive...
 
Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction Designing Inclusive Experiences to Maximize Reach and Satisfaction
Designing Inclusive Experiences to Maximize Reach and Satisfaction
 

Último

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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
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
 

Último (20)

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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+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...
 
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
 

Build 2016 - P426 - Using the Right Networking API for your UWP App

  • 1.
  • 3. HTTPS with user authentication Device-Cloud bi-directional communication Network communication between devices over sockets Download/Upload content to cloud in the background
  • 4.
  • 5.
  • 6. Feature Windows.Web.Http System.Net.Http Programming Language support All UWP languages C#/VB Private CA/Self-signed certificate √ √ Custom validation of server certificate √ (new!) X (on roadmap) Integration with native UI for Auth √ X Client Certificate Support √ Partial Cross-platform support (Xamarin) X √
  • 7. var filter = new HttpBaseProtocolFilter(); filter.ClientCertificate = myCertificate; var client = new HttpClient(); OR var client = new HttpClient(filter); HttpResponseMessage response = await client.GetAsync(uri);
  • 8. Demo: Online Auction App Requirements: 1. Custom server certificate validation 2. Client Certificate API Choice: Windows.Web.Http.HttpClient
  • 10.
  • 11.
  • 12. Feature HttpClient WebSockets Messaging pattern Request-response Bidirectional Duplex communication? Half Full Latency/overhead Higher Lower Proxy/Firewall traversal √ √ Server certificate custom validation √(new!) √ (new!) REST support, CRUD semantics Built-in Needs additional code Caching and data compression Built-in Needs additional code
  • 13. Feature MessageWebSocket StreamWebSocket Message Format Discrete WebSocket messages Continuous data stream UTF-8 Strings/JSON data √ X Binary data √ √ Recommended data size Small (bytes/KB) Large (MB) Recommended content types Strings, JSON content Audio, Video, Photos
  • 14. var socket= new MessageWebSocket(); socket.MessageReceived = myReceivingHandler; socket.Closed = myClosedHandler; await socket.ConnectAsync(serverUri); // Send data. socket.Close(code, reason);
  • 15. Demo: Online Auction App Requirements: 1. Client-Server bidirectional communication 2. Server relays others’ bids independent of client’s bids 3. Minimum latency and overhead API Choice: Windows.Networking.Sockets.MessageWebSocket
  • 16. Wireshark trace for WebSocket run Wireshark trace for HttpClient run Bytes on the wire
  • 17.
  • 18.
  • 19.
  • 20. Feature Windows.Networking.Sockets System.Net.Sockets WinSock Language Support C++/CX √ X √ JavaScript √ X X C#/VB √ √ X Activity Support in Background √ X X
  • 22. socketTaskBuilder.TaskEntryPoint = "SocketActivityBackgroundTask.SocketActivity Task"; var trigger = new SocketActivityTrigger(); socketTaskBuilder.SetTrigger(trigger); var task = socketTaskBuilder.Register(); socket.EnableTransferOwnership(task.TaskId, SocketActivityConnectedStandbyAction.Wake); await socket.ConnectAsync(target, port);
  • 23. Things to note: • At any point ownership of the socket can be only in one component • Find the list of sockets owned by the service using: SocketActivityInformation.AllSockets • Socket not in the list means socket is already closed or retrieved socket.TransferOwnership(socketId);
  • 24. Demo: Multi-player Game Requirements: 1. App communication between devices over sockets 2. Listening on the socket activity even when the app is not running API Choice: Windows.Networking.Sockets
  • 25.
  • 26.
  • 27.
  • 28. Feature HttpClient in BG Task Windows.Networking. BackgroundTransfer Protocol HTTP HTTP/FTP Destination Location In memory & File File only Recommended file size Small (KBs) Large (MBs) Resiliency (network connection drop/reboot) Needs additional code Can be resumed where left off Network Cost Awareness Needs additional code Built-in Battery Saver Awareness Needs additional code Built-in
  • 29. BackgroundDownloader downloader = new BackgroundDownloader(); DownloadOperation download = downloader.CreateDownload(new Uri(downloadlocation), file); Task<DownloadOperation> startTask = download.StartAsync().AsTask(); downloads = await BackgroundDownloader.GetCurrentDownloadsAsync (); await download.AttachAsync().AsTask(cts.Token, progressCallback);
  • 30. Task<DownloadOperation> startTask = download.StartAsync().AsTask(); Task continueTask = startTask.ContinueWith(OnDownloadCompleted); BackgroundTransferCompletionGroup completionGroup = new BackgroundTransferCompletionGroup(); //Create background task builder builder.SetTrigger(completionGroup.Trigger); BackgroundDownloader downloader = new BackgroundDownloader(completionGroup);
  • 31. Demo: Multi-player Game Requirements: 1. Download a new game level in the Background 2. Show a toast notification on completion of the download API Choice: Windows.Networking.BackgroundTransfer
  • 32.
  • 33. http://aka.ms/NetworkApiChoice https://github.com/Microsoft/Windows-universal-samples/ • HttpClient • WebSockets • SocketActivityStreamSocket • BackgroundTransfer http://aka.ms/WinDevUserVoice