SlideShare a Scribd company logo
NetMF@Work
NetMF@Work
IoT with SignalR & .NET Gadgeteer
Mirco Vanini
http://mircovanini.blogspot.com
info@proxsoft.it
@MircoVanini
Microsoft MVP Windows Embedded
NetMF@WorkGrazie agli sponsor
NetMF@Work
Perché real-time e come ?
SignalR
Connections and Hubs
Clients
Demo
Q&A
Links
Agenda
NetMF@Work
Gli utenti vogliono le ultime informazioni, ORA !
Twitter – live searches/updates
Stock streamers
Auctions
Live scores
Real-time notifications
Interactive games
Collaborative apps
Live user analytics
.
Perché real-time e come ?
NetMF@Work
HTTP is an old beast…
Never designed for real-time communications
Web is request-response
Web is stateless
HTML5 WebSockets to the rescue, right?
Perché real-time e come ?
Extension to HTTP
Provide raw sockets
over HTTP
Full-duplex
Traverses proxies
It’s still a draft…
Not every proxy server supports it
Not every webserver supports it
Not every browser supports it
They are raw sockets!
 
NetMF@Work
Come implementare il real-time con HTTP:
• Polling.
• Long Polling.
• Forever Frame.
• Server Sent Events
Perché real-time e come ?
NetMF@WorkPerché real-time e come ?
Polling: the stubborn approach
Server
Client
Time: requests event ‘n’ seconds (fixed time)
Request
Response
delay
Twitter clients
NetMF@Work
Polling
• High overhead on requests: headers and
such…
• High overhead on response: same as before…
• High latency.
• Waste of bandwith.
• Waste of resources.
Perché real-time e come ?
NetMF@WorkPerché real-time e come ?
Long Polling: the kind gentleman approach
Server
Client
Time: requests event ‘n’ seconds (variable)
Request
Response
Variable delay
Facebook chat
NetMF@Work
Long Polling (Hanging GET)
• High overhead on requests: headers and
such…
• High overhead on response: same as before…
• Medium latency.
• Waste less of bandwith.
• Waste of resources.
• Better than the previous one: less requests
Perché real-time e come ?
NetMF@WorkPerché real-time e come ?
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
• Server tells client that response is chuncked
• Client keeps connection open untill server closes it
• Server pushes data to the client followed by 0
• Consumes server threads
<script>eval("... ")</script>0
<script>eval("... ")</script>0
Forever Frame
NetMF@Work
Server-Sent Events
• Server-Sent Events (SSE) are a standard describing
how servers can initiate data transmission towards
clients once an initial client connection has been
established. They are commonly used to send message
updates or continuous data streams to a browser client
and designed to enhance native, cross-browser
streaming through a JavaScript API called EventSource,
through which a client requests a particular URL in order
to receive an event stream.
Stream Updates with Server-Sent Events
Perché real-time e come ?
NetMF@Work
So many options and a big Headache !
Real-time: How to survive ?
NetMF@Work
• Persistent Connection Abstraction communication
library.
• Abstracts protocol and transfer (choses the best one).
• A single programming model (a unified development
experience).
• Extremely simple to use.
• Server-side it can be hosted in different «environments»
(ASP.NET, console apps, windows services, etc…).
• Client-side there’s support for: Javascript clients, .NET
clients, WP; provide by the community: iOS, Android.
SignalR
NetMF@Work
• Works everywhere !!!
• Try WebSocket then fallback to:
• Server Sent Events
• Forever Frame
• Long Polling
• Bet to keep the logic connection up include retry
logic
• Scale out to web-farms
SignalR
NetMF@Work
• Complete rewrite of the internals for 1.0.0
• Very hight performance on a single box
100.000’s of messages per seconds
• Very low memory overhead
• Full async
• 1000’s of connection per server
• Cross-platform: run it on OSX or Linux with
Mono
• Supported part of ASP.NET family
SignalR
NetMF@Work
Persistent Connections: «Low level» API,
manages the connection and the «raw» stream of
data.
Hubs: «High level» API, provide advanced support
for internal routing (calling functions on server &
clients), connection and disconnection tracking,
grouping etc… Automatic client proxy generation
(JavaScript)
SignalR
NetMF@WorkSignalR
Install-Package Microsoft.AspNet.SignalR –pre
Install-Package Microsoft.AspNet.SignalR.Sample -
pre
NetMF@Work
Core
• Microsoft.AspNet.SignalR.Core: Server side components needed to
build SignalR endpoints
Meta package
• Microsoft.AspNet.SignalR: - A meta package that brings in everything
you need to run it on IIS and ASP.NET
Hosts
• Microsoft.AspNet.SignalR.SystemWeb - Pulls in the required
packages to host SignalR in ASP.NET (via OWIN ASP.NET host)
• Microsoft.AspNet.SignalR.Owin - OWIN* host for SignalR
* OWIN stands for “Open Web Interface for .NET” and it is a specification for
the communication between .NET Web Server and Web applications.
SignalR packages
NetMF@Work
Clients
• Microsoft.AspNet.SignalR.Js - Javascript client for SignalR
• Microsoft.AspNet.SignalR.Client - .NET client for SignalR (includes
WinRT, Windows Phone 8 and Silverlight5 clients)
Scaleout Buses
• Microsoft.AspNet.SignalR.Redis - Redis scaleout for SignalR
• Microsoft.AspNet.SignalR.ServiceBus - Service bus scaleout for
SignalR
Sample
• Microsoft.AspNet.SignalR.Sample - A sample stock ticker you can
quickly and easily bring into your app to get a working sample up and
running.
SignalR packages
NetMF@Work
Web Plant Monitor
PlantHub
PlantMonitor
PlantManager
Plant Device
PlantCommand
PlantData
TcpCommandListener
Demo
NetMF@Work
Page
Page
Schema
HUB Device
Page
SendCommand
data
command
22000
21000
data
updatePlaintData
command
NetMF@WorkQ&A
NetMF@Work
ASP.NET SignalR
Building Real-time Web Apps with ASP.NET SignalR
Engaging the Realtime Web with SignalR
SignalR. Code, not toothpaste.
Links
NetMF@WorkGrazie agli sponsor
NetMF@WorkFeedback Form
Per voi sono solo 10 minuti persi, per
noi è utilissimo per poter crescere!!!!
http://tinyurl.com/netmfwork

More Related Content

What's hot

Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
University of Hawai‘i at Mānoa
 
SignalR with asp.net
SignalR with asp.netSignalR with asp.net
SignalR with asp.net
Martin Bodocky
 
Intro to signalR
Intro to signalRIntro to signalR
Intro to signalR
Mindfire Solutions
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
Adam Mokan
 
SignalR Overview
SignalR OverviewSignalR Overview
SignalR Overview
Michael Sukachev
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
Alessandro Melchiori
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Deepak Gupta
 
Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
Mihai Coscodan
 
Signalr with ASP.Net part2
Signalr with ASP.Net part2Signalr with ASP.Net part2
Signalr with ASP.Net part2
Esraa Ammar
 
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Tin Linn Soe
 
Evolution / History of ASP.NET
Evolution / History of ASP.NETEvolution / History of ASP.NET
Evolution / History of ASP.NET
Anoop Kumar Sharma
 
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
apidays
 
Scale your signalR realtime web application
Scale your signalR realtime web applicationScale your signalR realtime web application
Scale your signalR realtime web application
Ran Wahle
 
SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012Maarten Balliauw
 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
Frank van der Linden
 
SignalR
SignalRSignalR
SignalR
Eyal Vardi
 
Developing Resilient Cloud Native Apps with Spring Cloud
Developing Resilient Cloud Native Apps with Spring CloudDeveloping Resilient Cloud Native Apps with Spring Cloud
Developing Resilient Cloud Native Apps with Spring Cloud
Dustin Ruehle
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Lucas Jellema
 

What's hot (20)

Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
SignalR
SignalRSignalR
SignalR
 
SignalR with asp.net
SignalR with asp.netSignalR with asp.net
SignalR with asp.net
 
Intro to signalR
Intro to signalRIntro to signalR
Intro to signalR
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
SignalR Overview
SignalR OverviewSignalR Overview
SignalR Overview
 
Real-time ASP.NET with SignalR
Real-time ASP.NET with SignalRReal-time ASP.NET with SignalR
Real-time ASP.NET with SignalR
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
 
Signalr with ASP.Net part2
Signalr with ASP.Net part2Signalr with ASP.Net part2
Signalr with ASP.Net part2
 
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
 
Evolution / History of ASP.NET
Evolution / History of ASP.NETEvolution / History of ASP.NET
Evolution / History of ASP.NET
 
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
APIdays Paris 2018 - Secure & Manage APIs with GraphQL, Ozair Sheikh, Directo...
 
Scale your signalR realtime web application
Scale your signalR realtime web applicationScale your signalR realtime web application
Scale your signalR realtime web application
 
SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012
 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
 
SignalR
SignalRSignalR
SignalR
 
Developing Resilient Cloud Native Apps with Spring Cloud
Developing Resilient Cloud Native Apps with Spring CloudDeveloping Resilient Cloud Native Apps with Spring Cloud
Developing Resilient Cloud Native Apps with Spring Cloud
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
 

Similar to IoT with SignalR & .NET Gadgeteer - NetMF@Work

SignalR 101
SignalR 101SignalR 101
SignalR
SignalR SignalR
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Christian Heindel
 
Web e device in real time con asp.net Signal R
Web e device in real time con asp.net Signal RWeb e device in real time con asp.net Signal R
Web e device in real time con asp.net Signal R
Luca Zulian
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
Sepehr Rasouli
 
Overview of SignalR
Overview of SignalROverview of SignalR
Overview of SignalR
Amit Naik
 
Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services: Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services: Dr. Fahad Aijaz
 
Building Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR ServiceBuilding Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR Service
Jalpesh Vadgama
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NETYaniv Uriel
 
Javauserguide
JavauserguideJavauserguide
Javauserguidemuniinb4u
 
Internetandjava
InternetandjavaInternetandjava
Internetandjavamuniinb4u
 
Internetandjava
InternetandjavaInternetandjava
Internetandjavamuniinb4u
 
JavaInternetlearning
JavaInternetlearningJavaInternetlearning
JavaInternetlearningmuniinb4u
 

Similar to IoT with SignalR & .NET Gadgeteer - NetMF@Work (20)

SignalR 101
SignalR 101SignalR 101
SignalR 101
 
SignalR
SignalR SignalR
SignalR
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
 
Web e device in real time con asp.net Signal R
Web e device in real time con asp.net Signal RWeb e device in real time con asp.net Signal R
Web e device in real time con asp.net Signal R
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Overview of SignalR
Overview of SignalROverview of SignalR
Overview of SignalR
 
Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services: Asynchronous Mobile Web Services:
Asynchronous Mobile Web Services:
 
Building Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR ServiceBuilding Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR Service
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
 
Javauserguide
JavauserguideJavauserguide
Javauserguide
 
Internetandjava
InternetandjavaInternetandjava
Internetandjava
 
ppttips
ppttipsppttips
ppttips
 
ppttips
ppttipsppttips
ppttips
 
Internetandjava
InternetandjavaInternetandjava
Internetandjava
 
ppttips
ppttipsppttips
ppttips
 
Java
JavaJava
Java
 
ppttips
ppttipsppttips
ppttips
 
JavaInternetlearning
JavaInternetlearningJavaInternetlearning
JavaInternetlearning
 
ppt tips
ppt tipsppt tips
ppt tips
 
Cs2305 nol
Cs2305 nolCs2305 nol
Cs2305 nol
 

More from Mirco Vanini

.NET 7 Performance Improvements_10_03_2023.pdf
.NET 7 Performance Improvements_10_03_2023.pdf.NET 7 Performance Improvements_10_03_2023.pdf
.NET 7 Performance Improvements_10_03_2023.pdf
Mirco Vanini
 
Debugging a .NET program after crash (Post-mortem debugging)
Debugging a .NET program after crash (Post-mortem debugging)Debugging a .NET program after crash (Post-mortem debugging)
Debugging a .NET program after crash (Post-mortem debugging)
Mirco Vanini
 
Connect a chips to Azure
Connect a chips to AzureConnect a chips to Azure
Connect a chips to Azure
Mirco Vanini
 
Connect a chips to Azure
Connect a chips to AzureConnect a chips to Azure
Connect a chips to Azure
Mirco Vanini
 
How to modernise WPF and Windows Forms applications with Windows Apps SDK
How to modernise WPF and Windows Forms applications with Windows Apps SDKHow to modernise WPF and Windows Forms applications with Windows Apps SDK
How to modernise WPF and Windows Forms applications with Windows Apps SDK
Mirco Vanini
 
C# on a CHIPs
C# on a CHIPsC# on a CHIPs
C# on a CHIPs
Mirco Vanini
 
.NET Conf 2021 - Hot Topics Desktop Development
.NET Conf 2021 - Hot Topics Desktop Development.NET Conf 2021 - Hot Topics Desktop Development
.NET Conf 2021 - Hot Topics Desktop Development
Mirco Vanini
 
Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !
Mirco Vanini
 
IoT support for .NET (Core/5/6)
IoT support for .NET (Core/5/6)IoT support for .NET (Core/5/6)
IoT support for .NET (Core/5/6)
Mirco Vanini
 
Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !
Mirco Vanini
 
IoT support for .NET Core
IoT support for .NET CoreIoT support for .NET Core
IoT support for .NET Core
Mirco Vanini
 
IoT support for .NET Core - IoT Saturday 2020
IoT support for .NET Core - IoT Saturday 2020IoT support for .NET Core - IoT Saturday 2020
IoT support for .NET Core - IoT Saturday 2020
Mirco Vanini
 
.NET Conf 2020 - Hot Topics Desktop Development
.NET Conf 2020 - Hot Topics Desktop Development.NET Conf 2020 - Hot Topics Desktop Development
.NET Conf 2020 - Hot Topics Desktop Development
Mirco Vanini
 
Are you ready for Microsoft Azure Sphere?
Are you ready for Microsoft Azure Sphere?Are you ready for Microsoft Azure Sphere?
Are you ready for Microsoft Azure Sphere?
Mirco Vanini
 
IoT Day 2019 Naples - Microsoft Azure Shpere
IoT Day 2019 Naples - Microsoft Azure ShpereIoT Day 2019 Naples - Microsoft Azure Shpere
IoT Day 2019 Naples - Microsoft Azure Shpere
Mirco Vanini
 
Debugging with VS2019
Debugging with VS2019Debugging with VS2019
Debugging with VS2019
Mirco Vanini
 
Azure Sphere
Azure SphereAzure Sphere
Azure Sphere
Mirco Vanini
 
Optimising code using Span<T>
Optimising code using Span<T>Optimising code using Span<T>
Optimising code using Span<T>
Mirco Vanini
 
Azure Sphere
Azure SphereAzure Sphere
Azure Sphere
Mirco Vanini
 
Xe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise AppsXe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise Apps
Mirco Vanini
 

More from Mirco Vanini (20)

.NET 7 Performance Improvements_10_03_2023.pdf
.NET 7 Performance Improvements_10_03_2023.pdf.NET 7 Performance Improvements_10_03_2023.pdf
.NET 7 Performance Improvements_10_03_2023.pdf
 
Debugging a .NET program after crash (Post-mortem debugging)
Debugging a .NET program after crash (Post-mortem debugging)Debugging a .NET program after crash (Post-mortem debugging)
Debugging a .NET program after crash (Post-mortem debugging)
 
Connect a chips to Azure
Connect a chips to AzureConnect a chips to Azure
Connect a chips to Azure
 
Connect a chips to Azure
Connect a chips to AzureConnect a chips to Azure
Connect a chips to Azure
 
How to modernise WPF and Windows Forms applications with Windows Apps SDK
How to modernise WPF and Windows Forms applications with Windows Apps SDKHow to modernise WPF and Windows Forms applications with Windows Apps SDK
How to modernise WPF and Windows Forms applications with Windows Apps SDK
 
C# on a CHIPs
C# on a CHIPsC# on a CHIPs
C# on a CHIPs
 
.NET Conf 2021 - Hot Topics Desktop Development
.NET Conf 2021 - Hot Topics Desktop Development.NET Conf 2021 - Hot Topics Desktop Development
.NET Conf 2021 - Hot Topics Desktop Development
 
Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !Async Debugging A Practical Guide to survive !
Async Debugging A Practical Guide to survive !
 
IoT support for .NET (Core/5/6)
IoT support for .NET (Core/5/6)IoT support for .NET (Core/5/6)
IoT support for .NET (Core/5/6)
 
Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !Async Debugging - A Practical Guide to survive !
Async Debugging - A Practical Guide to survive !
 
IoT support for .NET Core
IoT support for .NET CoreIoT support for .NET Core
IoT support for .NET Core
 
IoT support for .NET Core - IoT Saturday 2020
IoT support for .NET Core - IoT Saturday 2020IoT support for .NET Core - IoT Saturday 2020
IoT support for .NET Core - IoT Saturday 2020
 
.NET Conf 2020 - Hot Topics Desktop Development
.NET Conf 2020 - Hot Topics Desktop Development.NET Conf 2020 - Hot Topics Desktop Development
.NET Conf 2020 - Hot Topics Desktop Development
 
Are you ready for Microsoft Azure Sphere?
Are you ready for Microsoft Azure Sphere?Are you ready for Microsoft Azure Sphere?
Are you ready for Microsoft Azure Sphere?
 
IoT Day 2019 Naples - Microsoft Azure Shpere
IoT Day 2019 Naples - Microsoft Azure ShpereIoT Day 2019 Naples - Microsoft Azure Shpere
IoT Day 2019 Naples - Microsoft Azure Shpere
 
Debugging with VS2019
Debugging with VS2019Debugging with VS2019
Debugging with VS2019
 
Azure Sphere
Azure SphereAzure Sphere
Azure Sphere
 
Optimising code using Span<T>
Optimising code using Span<T>Optimising code using Span<T>
Optimising code using Span<T>
 
Azure Sphere
Azure SphereAzure Sphere
Azure Sphere
 
Xe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise AppsXe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise Apps
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 

IoT with SignalR & .NET Gadgeteer - NetMF@Work

  • 1. NetMF@Work NetMF@Work IoT with SignalR & .NET Gadgeteer Mirco Vanini http://mircovanini.blogspot.com info@proxsoft.it @MircoVanini Microsoft MVP Windows Embedded
  • 3. NetMF@Work Perché real-time e come ? SignalR Connections and Hubs Clients Demo Q&A Links Agenda
  • 4. NetMF@Work Gli utenti vogliono le ultime informazioni, ORA ! Twitter – live searches/updates Stock streamers Auctions Live scores Real-time notifications Interactive games Collaborative apps Live user analytics . Perché real-time e come ?
  • 5. NetMF@Work HTTP is an old beast… Never designed for real-time communications Web is request-response Web is stateless HTML5 WebSockets to the rescue, right? Perché real-time e come ? Extension to HTTP Provide raw sockets over HTTP Full-duplex Traverses proxies It’s still a draft… Not every proxy server supports it Not every webserver supports it Not every browser supports it They are raw sockets!  
  • 6. NetMF@Work Come implementare il real-time con HTTP: • Polling. • Long Polling. • Forever Frame. • Server Sent Events Perché real-time e come ?
  • 7. NetMF@WorkPerché real-time e come ? Polling: the stubborn approach Server Client Time: requests event ‘n’ seconds (fixed time) Request Response delay Twitter clients
  • 8. NetMF@Work Polling • High overhead on requests: headers and such… • High overhead on response: same as before… • High latency. • Waste of bandwith. • Waste of resources. Perché real-time e come ?
  • 9. NetMF@WorkPerché real-time e come ? Long Polling: the kind gentleman approach Server Client Time: requests event ‘n’ seconds (variable) Request Response Variable delay Facebook chat
  • 10. NetMF@Work Long Polling (Hanging GET) • High overhead on requests: headers and such… • High overhead on response: same as before… • Medium latency. • Waste less of bandwith. • Waste of resources. • Better than the previous one: less requests Perché real-time e come ?
  • 11. NetMF@WorkPerché real-time e come ? HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding: chunked • Server tells client that response is chuncked • Client keeps connection open untill server closes it • Server pushes data to the client followed by 0 • Consumes server threads <script>eval("... ")</script>0 <script>eval("... ")</script>0 Forever Frame
  • 12. NetMF@Work Server-Sent Events • Server-Sent Events (SSE) are a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established. They are commonly used to send message updates or continuous data streams to a browser client and designed to enhance native, cross-browser streaming through a JavaScript API called EventSource, through which a client requests a particular URL in order to receive an event stream. Stream Updates with Server-Sent Events Perché real-time e come ?
  • 13. NetMF@Work So many options and a big Headache ! Real-time: How to survive ?
  • 14. NetMF@Work • Persistent Connection Abstraction communication library. • Abstracts protocol and transfer (choses the best one). • A single programming model (a unified development experience). • Extremely simple to use. • Server-side it can be hosted in different «environments» (ASP.NET, console apps, windows services, etc…). • Client-side there’s support for: Javascript clients, .NET clients, WP; provide by the community: iOS, Android. SignalR
  • 15. NetMF@Work • Works everywhere !!! • Try WebSocket then fallback to: • Server Sent Events • Forever Frame • Long Polling • Bet to keep the logic connection up include retry logic • Scale out to web-farms SignalR
  • 16. NetMF@Work • Complete rewrite of the internals for 1.0.0 • Very hight performance on a single box 100.000’s of messages per seconds • Very low memory overhead • Full async • 1000’s of connection per server • Cross-platform: run it on OSX or Linux with Mono • Supported part of ASP.NET family SignalR
  • 17. NetMF@Work Persistent Connections: «Low level» API, manages the connection and the «raw» stream of data. Hubs: «High level» API, provide advanced support for internal routing (calling functions on server & clients), connection and disconnection tracking, grouping etc… Automatic client proxy generation (JavaScript) SignalR
  • 19. NetMF@Work Core • Microsoft.AspNet.SignalR.Core: Server side components needed to build SignalR endpoints Meta package • Microsoft.AspNet.SignalR: - A meta package that brings in everything you need to run it on IIS and ASP.NET Hosts • Microsoft.AspNet.SignalR.SystemWeb - Pulls in the required packages to host SignalR in ASP.NET (via OWIN ASP.NET host) • Microsoft.AspNet.SignalR.Owin - OWIN* host for SignalR * OWIN stands for “Open Web Interface for .NET” and it is a specification for the communication between .NET Web Server and Web applications. SignalR packages
  • 20. NetMF@Work Clients • Microsoft.AspNet.SignalR.Js - Javascript client for SignalR • Microsoft.AspNet.SignalR.Client - .NET client for SignalR (includes WinRT, Windows Phone 8 and Silverlight5 clients) Scaleout Buses • Microsoft.AspNet.SignalR.Redis - Redis scaleout for SignalR • Microsoft.AspNet.SignalR.ServiceBus - Service bus scaleout for SignalR Sample • Microsoft.AspNet.SignalR.Sample - A sample stock ticker you can quickly and easily bring into your app to get a working sample up and running. SignalR packages
  • 21. NetMF@Work Web Plant Monitor PlantHub PlantMonitor PlantManager Plant Device PlantCommand PlantData TcpCommandListener Demo
  • 24. NetMF@Work ASP.NET SignalR Building Real-time Web Apps with ASP.NET SignalR Engaging the Realtime Web with SignalR SignalR. Code, not toothpaste. Links
  • 26. NetMF@WorkFeedback Form Per voi sono solo 10 minuti persi, per noi è utilissimo per poter crescere!!!! http://tinyurl.com/netmfwork