SlideShare a Scribd company logo
1 of 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
Network API choices for server communication

More Related Content

What's hot

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
 

What's hot (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
 

Viewers also liked

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
 

Viewers also liked (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스튜디오를 활용한 헬스 케어 시스템 구축방안
 

Similar to Network API choices for server communication

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
 

Similar to Network API choices for server communication (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)
 

More from 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
 

More from 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
 

Recently uploaded

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Recently uploaded (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

Network API choices for server communication

  • 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