L'Internet of Things 竪 una realt e primo o dopo avr il suo impatto significativo nelle nostre aziende.
E a quel punto, i device saranno un asset di cui gestire il lifetime, alla pari dei nostri server, reti e cloud.
Azure IoT 竪 la piattaforma su cui possiamo sviluppare la nostra soluzione IoT e cerchiamo di comprendere cosa significa amministrare un parco device.
Alcuni temi: protocolli di comunicazione e sicurezza del device e della comunicazione. Provisioning dei device. Gestione e monitoraggio dei dispositivi. Strumenti ed API a disposizione per l'IT Pro.
Costruire un PoC IoT completo: gestione allarmi, device heartbeat, real-time e batch analysis e integrazione con Dynamics 365. L'intera soluzione sar costruita utilizzando la piattaforma Cloud Microsoft (Stream Analytics, Logic Apps, SQL Database, Power BI, Dynamics 365).
Il tutto in 1 ora e come sempre scrivendo meno codice possibile!
Tesi magistrale in ingegneria informatica
Progettazione e sviluppo di un gateway per la gestione efficiente a servizi e risorse per l'accesso locale e remoto in scenari di Internet of Things attraverso tecniche di Cloud Computing
Power BI Streaming Data Flow e Azure IoT Central Marco Parenzan
油
Dal 2015 gli utilizzatori di Power BI hanno potuto analizzare dati in real-time grazie all'integrazione con altri prodotti e servizi Microsoft. Con streaming dataflow, si porter l'analisi in tempo reale completamente all'interno di Power BI, rimuovendo la maggior parte delle restrizioni che avevamo, integrando al contempo funzionalit di analisi chiave come la preparazione dei dati in streaming e nessuna creazione di codice. Per vederlo in funzione, studieremo un caso specifico di streaming come l'IoT con Azure IoT Central.
Power BI Streaming Data Flow e Azure IoT CentralMarco Parenzan
油
Dal 2015 gli utilizzatori di Power BI hanno potuto analizzare dati in real-time grazie all'integrazione con altri prodotti e servizi Microsoft. Con streaming dataflow, si porter l'analisi in tempo reale completamente all'interno di Power BI, rimuovendo la maggior parte delle restrizioni che avevamo, integrando al contempo funzionalit di analisi chiave come la preparazione dei dati in streaming e nessuna creazione di codice. Per vederlo in funzione, studieremo un caso specifico di streaming come l'IoT con Azure IoT Central.
竪 possible rinoscere e contare oggetti inquadrati con una telecamera connessa ad Rasperry PI e visualizzare i risultati in una dashbaord realtime di Power BI? Certo che s狸 anche se non siete dei data scientist!
Predictive Maintenance per le aziende del nord-est con Azure e IoTMarco Parenzan
油
Due grandi fenomeni stanno caratterizzando l'IT degli ultimi anni.
Il cloud di Azure permette ad una qualunque azienda, compresa la piccola e media impresa italiana tipica del nostro tessuto imprenditoriale triveneto, di erogare servizi IT, worldwide e con qualit.
Internet of Things (IoT), assieme al movimento dei "makers", permette di aggiungere "intelligenza" a qualunque manufatto o prodotto, affinch竪 questo si relazioni con i servizi cloud che abbiamo sviluppato.
Infiniti sono gli scenari possibili e noi ne analizzeremo uno. Sotto il nome di Predictive Maintenance si identificano tutta quella serie di servizi che possiamo erogare con il Cloud e l'IoT per acquisire dati dai prodotti che gi si vendono a clienti worldwide; in caso di degrado delle prestazioni, i dati acquisiti potranno essere analizzati al fine di pianificare una manutenzione preventiva, prima che avvenga una pi湛 onerosa rottura. Questo apre non solo nuovi mercati, ma anche nuovi prodotti, servizi o canali di vendita.
Il tutto realizzabile con le risorse disponibili sul territorio e con la tecnologia Microsoft.
OVERVIEW: Java secondo Microsoft
STRUMENTI:Java nel cloud
MODALITA: Il Development life cycle secondo Microsoft
APPROCCIO: Stack cloud native basato su JAVA ed Azure
CAMBIAMENTO: Know how necessario per lo sviluppo su AZURE con Java
OPPORTUNITA: Use case di implementazione 束first approach損
Proposta per un MSP (Managed Service Provider).
Zabbix, OcsInventory e GLPI: 3 pacchetti open source per offrire servizi di monitoring, hardware software inventory e IT asset management.
Normalmente parliamo e presentiamo Azure IoT (Central) con un taglio un po' da "maker". In questa sessione, invece, vediamo di parlare allo SCADA engineer. Come si configura Azure IoT Central per il mondo industriale? Dov'竪 OPC/UA? Cosa c'entra IoT Plug & Play in tutto questo? E Azure IoT Central...quali vantaggi ci da? Cerchiamo di rispondere a queste e ad altre domande in questa sessione...
Allo sviluppatore Azure piacciono i servizi PaaS perch竪 sono "pronti all'uso". Ma quando proponiamo le nostre soluzioni alle aziende, ci scontriamo con l'IT che apprezza gli elementi infrastrutturali, IaaS. Perch竪 non (ri)scoprirli aggiungendo anche un pizzico di Hybrid che con il recente Azure Kubernetes Services Edge Essentials si pu嘆 anche usare in un hardware che si pu嘆 tenere anche in casa? Quindi scopriremo in questa sessione, tra gli altri, le VNET, le VPN S2S, Azure Arc, i Private Endpoints, e AKS EE.
Power BI Streaming Data Flow e Azure IoT CentralMarco Parenzan
油
Dal 2015 gli utilizzatori di Power BI hanno potuto analizzare dati in real-time grazie all'integrazione con altri prodotti e servizi Microsoft. Con streaming dataflow, si porter l'analisi in tempo reale completamente all'interno di Power BI, rimuovendo la maggior parte delle restrizioni che avevamo, integrando al contempo funzionalit di analisi chiave come la preparazione dei dati in streaming e nessuna creazione di codice. Per vederlo in funzione, studieremo un caso specifico di streaming come l'IoT con Azure IoT Central.
竪 possible rinoscere e contare oggetti inquadrati con una telecamera connessa ad Rasperry PI e visualizzare i risultati in una dashbaord realtime di Power BI? Certo che s狸 anche se non siete dei data scientist!
Predictive Maintenance per le aziende del nord-est con Azure e IoTMarco Parenzan
油
Due grandi fenomeni stanno caratterizzando l'IT degli ultimi anni.
Il cloud di Azure permette ad una qualunque azienda, compresa la piccola e media impresa italiana tipica del nostro tessuto imprenditoriale triveneto, di erogare servizi IT, worldwide e con qualit.
Internet of Things (IoT), assieme al movimento dei "makers", permette di aggiungere "intelligenza" a qualunque manufatto o prodotto, affinch竪 questo si relazioni con i servizi cloud che abbiamo sviluppato.
Infiniti sono gli scenari possibili e noi ne analizzeremo uno. Sotto il nome di Predictive Maintenance si identificano tutta quella serie di servizi che possiamo erogare con il Cloud e l'IoT per acquisire dati dai prodotti che gi si vendono a clienti worldwide; in caso di degrado delle prestazioni, i dati acquisiti potranno essere analizzati al fine di pianificare una manutenzione preventiva, prima che avvenga una pi湛 onerosa rottura. Questo apre non solo nuovi mercati, ma anche nuovi prodotti, servizi o canali di vendita.
Il tutto realizzabile con le risorse disponibili sul territorio e con la tecnologia Microsoft.
OVERVIEW: Java secondo Microsoft
STRUMENTI:Java nel cloud
MODALITA: Il Development life cycle secondo Microsoft
APPROCCIO: Stack cloud native basato su JAVA ed Azure
CAMBIAMENTO: Know how necessario per lo sviluppo su AZURE con Java
OPPORTUNITA: Use case di implementazione 束first approach損
Proposta per un MSP (Managed Service Provider).
Zabbix, OcsInventory e GLPI: 3 pacchetti open source per offrire servizi di monitoring, hardware software inventory e IT asset management.
Normalmente parliamo e presentiamo Azure IoT (Central) con un taglio un po' da "maker". In questa sessione, invece, vediamo di parlare allo SCADA engineer. Come si configura Azure IoT Central per il mondo industriale? Dov'竪 OPC/UA? Cosa c'entra IoT Plug & Play in tutto questo? E Azure IoT Central...quali vantaggi ci da? Cerchiamo di rispondere a queste e ad altre domande in questa sessione...
Allo sviluppatore Azure piacciono i servizi PaaS perch竪 sono "pronti all'uso". Ma quando proponiamo le nostre soluzioni alle aziende, ci scontriamo con l'IT che apprezza gli elementi infrastrutturali, IaaS. Perch竪 non (ri)scoprirli aggiungendo anche un pizzico di Hybrid che con il recente Azure Kubernetes Services Edge Essentials si pu嘆 anche usare in un hardware che si pu嘆 tenere anche in casa? Quindi scopriremo in questa sessione, tra gli altri, le VNET, le VPN S2S, Azure Arc, i Private Endpoints, e AKS EE.
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxMarco Parenzan
油
Did interfaces in C# need evolution? Maybe yes. Are they violating some fundamental principles? We see. Are we asking for some hoops? Let's see all this by telling a story (of code, of course)
Azure Synapse Analytics for your IoT SolutionsMarco Parenzan
油
Let's find out in this session how Azure Synapse Analytics, with its SQL Serverless Pool, ADX, Data Factory, Notebooks, Spark can be useful for managing data analysis in an IoT solution.
Power BI Streaming Data Flow e Azure IoT CentralMarco Parenzan
油
Since 2015, Power BI users have been able to analyze data in real-time thanks to the integration with other Microsoft products and services. With streaming dataflow, you'll bring real-time analytics completely within Power BI, removing most of the restrictions we had, while integrating key analytics features like streaming data preparation and no coding. To see it in action, we will study a specific case of streaming such as IoT with Azure IoT Central.
What are the actors? What are they used for? And how can we develop them? And how are they published and used on Azure? Let's see how it's done in this session
Generic Math, funzionalit ora schedulata per .NET 7, e Azure IoT PnP mi hanno risvegliato un argomento che nel mio passato mi hanno portato a fare due/tre viaggi, grazie all'Universit di Trieste, a Cambridge (2006/2007 circa) e a Seattle (2010, quando ho parlato pubblicamente per la prima volta di Azure :) e che mi ha fatto conoscere il mito Don Box!), a parlare di codice in .NET che aveva a che fare con la matematica e con la fisica: le unit di misura e le matrici. L'avvento dei Notebook nel mondo .NET e un vecchio sogno legato alla libreria ANTLR (e tutti i miei esercizi di Code Generation) mi portano a mettere in ordine 'sto minestrone di idee...o almeno ci provo (non so se sta tutto in piedi).
322 / 5,000
Translation results
.NET is better every year for a developer who still dreams of developing a video game. Without pretensions and without talking about Unity or any other framework, just "barebones" .NET code, we will try to write a game (or parts of it) in the 80's style (because I was a kid in those years). In Christmas style.
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...Marco Parenzan
油
The document discusses building an IoT infrastructure on the edge with .NET that connects devices like Raspberry Pis and ESP32s to Azure. It describes setting up a network of Raspberry Pi devices running .NET Core and connecting sensors to collect data and send events to an Apache Kafka cluster. The events are then aggregated using Apache Spark on another Raspberry Pi and the results routed to the cloud. Issues encountered include Kafka's Java dependencies, Spark's complex processing model, and lack of documentation around integrating Pi, Kafka and Spark. While the technologies work individually, configuring and integrating them presented challenges at the edge.
How can you handle defects? If you are in a factory, production can produce objects with defects. Or values from sensors can tell you over time that some values are not "normal". What can you do as a developer (not a Data Scientist) with .NET o Azure to detect these anomalies? Let's see how in this session.
Quali vantaggi ci da Azure? Dal punto di vista dello sviluppo software, uno di questi 竪 certamente la variet dei servizi di gestione dei dati. Questo ci permette di cominciare a non essere SQL centrici ma utilizzare il servizio giusto per il problema giusto fino ad applicare una strategia di Polyglot Persistence (e vedremo cosa significa) nel rispetto di una corretta gestione delle risorse IT e delle pratiche di DevOps.
- Azure IoT Central provides a fully managed platform for building IoT solutions that is compliant with the Azure IoT platform.
- It offers predictable pricing per device, forces useful modeling practices like device twins and plug and play, and provides industry templates to accelerate solution building.
- While it handles much of the complexity, it also maintains compatibility with customizing solutions using the full Azure IoT platform and other Azure services.
Come puoi gestire i difetti? Se sei in una fabbrica, la produzione pu嘆 produrre oggetti con difetti. Oppure i valori dei sensori possono dirti nel tempo che alcuni valori non sono "normali". Cosa puoi fare come sviluppatore (non come Data Scientist) con .NET o Azure per rilevare queste anomalie? Vediamo come in questa sessione.
It happens that we have to develop several services and deploy them in Azure. They are small, repetitive but different, often not very different. Why not use code generation techniques to simplify the development and implementation of these services? Let's see with .NET comes to meet us and helps us to deploy in Azure.
Running Kafka and Spark on Raspberry PI with Azure and some .net magicMarco Parenzan
油
IoT scenarios necessarily pass through the Edge component and the Raspberry PI is a great way to explore this world. If we need to receive IoT events from sensors, how do I implement an MQTT endpoint? Kafka is a clever way to do this. And how do I process the data in Kafka? Spark is another clever way of doing this. How do we write custom code for these environments? .NET, now in version 6 is another clever way to do it! And maybe, we also communicate with Azure. We'll see in this session if we can make it all work!
Time Series Anomaly Detection with Azure and .NETTMarco Parenzan
油
f you have any device or source that generates values over time (also a log from a service), you want to determine if in a time frame, the time serie is correct or you can detect some anomalies. What can you do as a developer (not a Data Scientist) with .NET o Azure? Let's see how in this session.
It happens that we have to develop several services and deploy them in Azure. They are small, repetitive but different, often not very different. Why not use code generation techniques to simplify the development and implementation of these services? Let's see with .NET comes to meet us and helps us to deploy in Azure.
.net interactive for notebooks and for your data jobMarco Parenzan
油
This document discusses notebooks and the evolution of Jupyter notebooks. It covers how Jupyter notebooks are now used on the web and in various platforms. It also discusses .NET Interactive, which gives C# and F# kernels to Jupyter notebooks and allows running notebooks in Visual Studio Code. The document also briefly touches on writing kernels and using notebooks for data science with .NET libraries and Apache Spark.
4. NET, IoT and Azure Developer, Trainer and
Consultant
Microsoft MVP 2017 for Azure
Book Author @ Packt, LSWR
Community Lead 1nn0va
(facebook.com/1nn0va)
marco [dot] parenzan [at] 1nn0va [dot] it
5. Realizzare uninfrastruttura IoT
Sicurezza in una soluzione IoT
Gestire dispositivi con IoT Hub
Deployment di dispositivi con Azure IoT Hub
Processare eventi con Azure Serverless
Conclusioni
7. Affermazioni
IoT 竪 reale
IoT 竪 diventato un asset
IoT contempla due scenari
Dispositivi aziendali (di cui abbiamo il controllo)
Dispositivi dei clienti (di cui non abbiamo il controllo)
IoT 竪 un nuovo 束problema損 da gestire
9. Pattern per lIoT explained [1]
Insights
Esplicitare cosa 竪 successo
Actions
Prendere delle decisioni su quanto 竪 successo
...e questo 竪 quanto facciamo gi
10. Azure e il set di servizi per lIoT
Azure Time Series
Insights
Azure Machine
Learning
Azure Stream
Analytics
Cosmos DB Azure Data Lake
Azure Data Lake
Analytics
Azure HD Insight
Spark, Storm,
Kafka
Azure Event Hubs
Microsoft Flow
Azure Logic Apps
Notification Hubs
Azure Websites
Microsoft Power
BI
Azure Active
Directory
Azure IoT Hub
Azure IoT Hub
Device Provisioning
Service
Azure IoT Edge
Azure Monitor
PaaSServices&
DeviceSupport
Edge Support
Device Support
Azure IoT Device
SDK
Certified Devices
Azure Certified for
IoT
Security Program
for Azure IoT
IoT Services Data & Analytics Services Visualization & Integration Services
IoTSolutions
(PaaS)
IoTSolutions
(SaaS)
Microsoft IoT Central
IoT SaaS
Microsoft Connected Field Service
Field Service SaaS
Remote Monitoring Predictive Maintenance Connected factory
Windows 10 IoT
Core
Azure IoT Suite
11. Pattern per lIoT explained [2]: Things (束Edge損)
Non 竪 un PC o mobile
Non c竪 un utente/Non c竪 un browser/Non c竪 una app
Fa il suo lavoro e notifica il suo lavoro (eventi e
telemetria)
Tanto pi湛 intelligente, tanto pi湛 竪 autonomo (e molto
束trendy損 ora Edge processing)
Si aspetta dei comandi
Ragiona a messaggi
asset aziendale (BE AWARE!)
12. Pattern per lIoT explained [3]: Cloud Gateway
E l 束API損 dei servizi esposti
Non 竪 Json/WebApi
Non usa i protocolli canonici (Http(s))
il valore dellofferta Cloud
Farlo custom 竪 impegnativo
14. Funziona a messaggi
uno stream di messaggi
Compatibile EventHub
uno store temporaneo di messaggi
48 ore
un router di messaggi
Propriet nella 束busta損
Contenuto opaco
15. Costi e scalabilit
Unitsunit di scaling
Messaggi
limite 256Kb
fatturati in chunks di 4Kb
(0,5Kb per il Free tier)
Messaggi Twin
Limite 8Kb
fatturati in chunks di 0,5Kb
16. Usare IoT (ed Azure) dalla command line
(everything is) Rest API
.NET (JS, Python) SDKs
PowerShell
IoTHub Explorer
Azure CLI 2.0+extension
19. Protocolli
AMQP
nativo
MQTT
con protocol handler
Completo per tutte le funzioni
Nuova versione del protocollo appena uscita (V5)
Http(s) solo se strettamente necessario
Firewall?
Tutti su IP/TLS
AMQP (5671/5672)
MQTT (1883/8883)
23. Cos竪 una Shared Access Policy?
una autorizzazione ad accedere a qualche endpoint
Usa una chiave simmetrica (revocabile) per autorizzare
Buona pratica:
1 policy, 1 servizio
Non usare le policy di default
Per i deviceGateway
24. Registro dei devices
un database No SQL (束eventualmente consistente損)
Mantiene lidentit dei dispositivi che possono
comunicare
Create
identity
Update
identity
Retrieve
identity
Delete
identity
List
identities
Export
identities
Import
identities
25. Asymmetric Key encryption
Utilizzato per ricevere dati protetti dalle parti
Coppia di chiavi. Le chiavi private, tenute al
sicuro dal generatore delle chiavi, decifrano
ci嘆 che 竪 cifrato dalla chiave pubblica
Certificati autofirmati o certificati CA
(anteprima)
Pro
Single point of failure
Long keys (2 ^ 10 bit +) difficili da decifrare
Contro
pu嘆 crittografare piccoli blocchi di dati
Utilizzato per crittografare una chiave simmetrica
in ogni comunicazione
Encrypt( , , )=
Decrypt( , , )=
26. Symmetric Key encryption
Utilizzato per scambiare dati protetti dalle parti
Chiave singola condivisa dalle parti
professionista
Pu嘆 crittografare grandi blocchi di dati
Contro
Non sicuro se una delle parti perde la chiave, pi湛 punti di
errore
Encrypt( , , )=
Decrypt( , , )=
31. IoT Hub Device Management
Device
Twin
Queries Methods
Jobs
32. Device Twin
Twin 竪 la rappresentazione logica del dispositivo.
un documento JSON che memorizza le informazioni sullo
stato del dispositivo.
Le informazioni sono propriet che 竪 possibile distinguere in
tag, desired properties e reported properties
Il documento viene archiviato in IoT hub, in un db No SQl
simile a Cosmos Db eventually consistent
In generale, tutte le propriet sono solo propriet JSON,
quindi 竪 possibile scrivere qualsiasi cosa che rispetti le regole
JSON.
versionato e pu嘆 essere patchato (piccole dimensioni di
json trasmesse)
33. Device Twin Limitations
Le propriet possono avere una profondit massima di
5.
La dimensione dei valori della propriet non pu嘆 essere
maggiore di 8Kb
Tipi JSON supportati: boolean, number, string, object.
Gli array non sono ammessi
Il documento viene aggiornato e sincronizzato con la
gestione ottimistica della gestione dei dispositivi.
8 KB (dimensioni di fatturazione: 16 messaggi)
34. Desired properties
Dobbiamo configurare il dispositivo da remoto. Non 竪
economicamente conveniente eseguire localmente.
La desired property 竪 un tipo di propriet configurata
sul twin. L'hub IoT gestisce le modifiche che accodano
l'aggiornamento sull'endpoint del dispositivo.
Quindi quando si ricollega, aggiorner il suo stato.
La dimensione massima delle propriet desiderate 竪
8Kb.
35. Reported properties
Il dispositivo ha uno stato locale.
Questo stato cambia perch辿 il dispositivo esegue alcune
attivit e vuoi che venga aggiornato
Il dispositivo pu嘆 inviare aggiornamenti su questi
quando cambiano.
IoTHub riceve un messaggio dall'endpoint del
dispositivo sull'aggiornamento e questo viene
modificato sul gemello.
La dimensione massima delle propriet riportate 竪 8 KB.
36. Tags
Le propriet desiderate e le propriet segnalate sono
funzionali per il dispositivo.
Alcune propriet sono utili solo per il servizio e non per
i dispositivi.
un dizionario di dati chiave / valore.
38. Sample queries
Devices located in the US configured to send telemetry less
often that every minute
Devices which have wifi o wired connectivity
Devices where reported and desired properties do not match
Devices group by status
39. Device Management Lifetime Operations
Reboot Factory Reset
Firmware
Update
Configuration
Reporting
progress and
status
41. Creare un portale per lutente
Tutto questo 竪 accessibile da portale Azure o command
line
Difficile, pericoloso e poco produttivo per
lamministratore finale
Creare un portale per lutente
46. IoT Hub Device Provisioning Service
I dispositivi sono collegati automaticamente e in modo
sicuro al servizio Hub IoT e vengono forniti con la
configurazione iniziale
Un titolare di provisioning di dispositivo singolo pu嘆
fornire il servizio per pi湛 hub IoT (in pi湛 regioni)
I clienti forniscono regole e logica per assicurare che il
dispositivo giusto sia collegato alla giusta soluzione IoT
(e all'endpoint hub IoT associato)
L'abilit di provisioning dei dispositivi 竪 estensibile con
il supporto di diversi tipi di modelli di attestazione
dell'identit
47. Setup
I dispositivi dispongono gi dell'URI per il servizio di
provisioning dei dispositivi al primo avvio
Il servizio di provisioning dei dispositivi conosce gi gli
IoT Hub a cui connettere i dispositivi
Il servizio di provisioning dei dispositivi conosce gi il
tipo di attestato di identit che sta utilizzando,
comprese le informazioni di connessione per ciascuno
Il tutto viene fatto con una lista di enrollment
53. Comparazione delle diverse opportunit
Data
streaming
Event
correlation
High
scalability
Single event
Performance
not critical
Custom
coding
Flexible
coding
Special
hosting
requirements
Special
performance
requirements
55. Serverless manifesto
Una funzione 竪 l'unit di deployment e scaling
Scalabilit in base alle richieste. Gli utenti non possono
causare overprovisioning o underprovisioning
Non pagare mai per inattivit
Il codice di una funzione viene scatenato da un trigger,
cio竪 un evento che 竪 avvenuto e che deve essere
gestito
60. Cosa lIT pu嘆 dare all 束embedded損 world
Pieno contributo lato cloud
Un buon contributo lato embedded (metodologia,
modernit, strumenti, patterns)
61. IoT Hub come servizio
Pro
Soluzione moderna e allineata allo stile Azure
Piena integrazione Portal/CLI/Visual Studio
Completa/in completamento
Soluzioni
Sviluppo molto veloce
Edge
Cons
LTSLong Term Support
62. IoT Hub per lIT Pro
Millions of Devices
HTTPS/AMQPS/MQTTS
Receive Commands
Device Management
Device Twins
Queries & Jobs
Scale up and down
Declarative Message Routes
Azure Monitor
Configuration Management
Per Device Certificates
Per Device Enable/Disable
TLS Security
X.509 Support
IP Whitelisting/Blacklisting
Shared Access Polices
Firmware/Software Updates
Editor's Notes
#7: Device has also a 束non functional損 lifetime
束Nonfunctional損 means that a device needs to run some tasks to manage its lifetime, not really the core device functions.
For example, it needs to be configured because it is probably headless, so we have to configure it remotely after initial configuration and deployment.
We need also to query devices to perform some analysis, either on some classification information or its state.
And we need to perform some actions on devices because conditions change through their lifetime, so we need to run some tasks
#16: IoT Hub can scale to million of devices with IoT Hub. But when you scale, you don't think about resource allocation, CPU or memory. You just think about messages. How many messages and devices you need.
That's why with IoT Hub you talk about a "unit," that is the scaling element.
Each unit has a different capacity in different tier. Each differs in the number of messages a unit can handle per day.
But you have to be careful. During the course, you will often meet the notions of message and size. Well, that size is a variable size that depends on by the functionality, for example, 8Kb or 256Kb)
The "unit" message size is different. A "unit" message size is a billable message and is a fixed size 4Kb chunk of data in standard tier, 0.5Kb in the free tier or if the message is about device configuration with twins.
For instance, if a device sends 16 kilobytes message, in S1, S2, and S3 tiers, it will be billed as four messages.
So when you need to configure service to run or scaling, you have to measure you messaging performances. You need to count your devices, your messages, calculate the average size and estimage the number of billable messages.
Then you count the number of units you need, and you can change that number during configuration.
Or you can deploy other instances of IoT Hub, which is a good practice regarding scalability but also resilience in case of failure. For this last uses, IoT Hub supports you importing and exporting device registry if you need to backup and restore for recovery.
#19: Device has also a 束non functional損 lifetime
束Nonfunctional損 means that a device needs to run some tasks to manage its lifetime, not really the core device functions.
For example, it needs to be configured because it is probably headless, so we have to configure it remotely after initial configuration and deployment.
We need also to query devices to perform some analysis, either on some classification information or its state.
And we need to perform some actions on devices because conditions change through their lifetime, so we need to run some tasks
#25: IoTHub contains an identity registry to stores all the information about devices. On this registry, you can perform some operations.
Create device identity
Update device identity
Retrieve device identity
Delete device identity
List all the stored identities
Export all identities to Azure blob storage
Import identities from Azure blob storage
All the operations are available by a REST API so you can build your device registration tool inside your required device management workflow. You can also use one of the SDKs available for the major programming languages and platforms.
#28: Tampering is the modification of a device to induce failure or altering its behavior.
Information disclosure threats involve the exposure of information to individuals who are not supposed to have access to itfor example, the ability of users to read a file that they were not granted access to, or the ability of an intruder to read data in transit between two computers.
Denial of service (DoS) attacks deny service to valid usersfor example, by making a Web server temporarily unavailable or unusable. You must protect against certain types of DoS threats simply to improve system availability and reliability.
In this type of threat, an unprivileged user gains privileged access and thereby has sufficient access to compromise or destroy the entire system. Elevation of privilege threats include those situations in which an attacker has effectively penetrated all system defenses and become part of the trusted system itself, a dangerous situation indeed.
An example of identity spoofing is illegally accessing and then using another user's authentication information, such as username and password
Data tampering involves the malicious modification of data. Examples include unauthorized changes made to persistent data, such as that held in a database, and the alteration of data as it flows between two computers over an open network, such as the Internet.
Repudiation threats are associated with users who deny performing an action without other parties having any way to prove otherwisefor example, a user performs an illegal operation in a system that lacks the ability to trace the prohibited operations. Nonrepudiation refers to the ability of a system to counter repudiation threats. For example, a user who purchases an item might have to sign for the item upon receipt. The vendor can then use the signed receipt as evidence that the user did receive the package.
#32: So when you have an identity, you can interact with the device and perform some non functional tasks, for maintenance.
There are some operations that you can perform with devices.
Device Twin
Synchronize the device condition and configuration between cloud and device
Queries
Dynamic reporting across device twin and jobs to attest device status and health
Methods
Perform interactive actions on devices
Then there are Jobs, but we dont cover that in this lecture.
#38: All the device twins are persisted in the registry, in a sort of NoSQL database.
All data in the twins can be queried with an SQL-like language to perform any listing or summary query for statistics or deep dive evaluations.
It contains extensions for the IoTHub requirements.
FROM clause allow selecting documents allowed, at the moment the only allowed keywords are devices or jobs.
WHERE clause allows expressing filter predicated on the twin document structure. Root properties are tags, properties.Reported, properties.desired and you can. You can fully write predicates to include or exclude devices for the result of the query. You can also use functions to manipulate data such as math functions, type testing functions, string manipulation functions.
SELECT allow to project twin property values or tags, so to represent the correct data set minimizing data or to evaluate some summarizing values with aggregate functions
GROUP BY allow aggregating values by some values
#41: Direct methods represent a request-reply interaction with a device similar to an HTTP call in that they succeed or fail immediately (after a timeout).
You use Direct methods for operations that require immediate confirmation
A device receives direct methods through a device-specific MQTT topic. In fact, it is only supported MQTT. If you need to use AMQP, you cannot use Direct methods.
Its a two-way data flow. There is a limitation with data exchanged as you can exchange 8Kb in the request and 8Kb in the response.
When the device is disconnected, IoTHub cannot reach it. The backend receives a notification when the device is disconnected. You can set the timeout you require to understand that the device is offline, in a range from 30sec to 3600sec.