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
SignalRSignalR
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 ASP.NET with SignalR
Real-time ASP.NET with SignalRReal-time ASP.NET with SignalR
Real-time ASP.NET with SignalR
Alexander Konduforov
 
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 2012
Maarten 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 .NET
Yaniv Uriel
 
Javauserguide
JavauserguideJavauserguide
Javauserguide
muniinb4u
 
Internetandjava
InternetandjavaInternetandjava
Internetandjava
muniinb4u
 
ppttips
ppttipsppttips
ppttips
muniinb4u
 
ppttips
ppttipsppttips
ppttips
muniinb4u
 
Internetandjava
InternetandjavaInternetandjava
Internetandjava
muniinb4u
 
ppttips
ppttipsppttips
ppttips
muniinb4u
 
Java
JavaJava
ppttips
ppttipsppttips
ppttips
muniinb4u
 
JavaInternetlearning
JavaInternetlearningJavaInternetlearning
JavaInternetlearning
muniinb4u
 
ppt tips
ppt tipsppt tips
ppt tips
muniinb4u
 
Cs2305 nol
Cs2305 nolCs2305 nol
Cs2305 nol
jothikanaga
 

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

GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
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
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
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
 
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
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
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
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
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
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
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
 
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
 

Recently uploaded (20)

GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
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...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
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
 
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
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
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
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
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 !
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
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
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
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
 
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
 

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