WINDOWS AND THE INTERNET OF THINGSPABLO C GARCÍA (@PC_GARCIA)
PRINCIPAL PLATFORM SPECIALIST
MICROSOFT
HTHTTP://DEV.WINDOWS.COM/EN-US/FEATURED/WINDOWS-DEVELOPER-PROGRAM-FOR-IOT
“ ”
¿QUE ES LA INTERNET DE LAS COSAS?
Es la red de los objetos físicos que contienen tecnología embebida para comunicarse e interactuar con sus estados internos o con el ambiente exterior.
Source: Gartner
PERO... ENTONCES... ¿QUE ES LA ”IOT”?
Dispositivos, no personas Billiones
Grandes y complejos
flujos de datosValor en la
información
SMART PRODUCTS
Grid
Renewables
Oil/Gas/Coal Recovery and
Distribution
Pointsof Sale
Restaurants
Hotels
FuelStations
Patients
Clinics
Hospitals
NursingHomes
MobileCare
SafetySecurity
ComfortLighting
Automation
Manufacturing Integration and
AutomationRemote
Servicing
Predictive and Reactive
Maintenance
Water
Waste
PollutionControl
Fire
Emergency
PublicSafety
Law Enforcement
Letters
Packages
Containers
Tanks Bulkware
Games
Events
Sports
TelevisionStreaming
Traffic Buses
Cars
Trucks
Trains
Vessels
Aircraft
Bikes
Smart Energy
Smart Pro
Services
Smart Retail
Smart Mobility
Smart Logistic
s
Smart Factory
Smart Cities
Smart Entertain
-ment
Smart Health-
care
Smart Building Home
FUENTES DE EVENTOS
1B
Connected/Smart TVs
2.5B
Personal computers
>5B
Smartphones and tablets
>10B
Connected internet
of things
Source: Gartner, IDC, Strategy Analytics, Machina Research, Company filings, BI Intelligence, Accenture analysisCopyright © 2013 Microsoft and Accenture Confidential
Fuentes de Ingreso
Contenido Aplicaciones Apps y servicios Servicios por verticales
THE INTERNET OF THINGS (IOT)
De acuerdo a IDC el Mercado de IoT fue de $1.9T en 2013
Y será un Mercado de $7.1T para el 2020
IoT es un ecosistema diverso, con muchos vendedores
Poca estandarización
Microsoft soporta esta diversidad
EN ESTA PRESENTACION
•Windows en los dispositivos
• Integración con Azure EventHub / Azure ISS
•Machine Learning
DEMO: WINDOWS ON INTEL GALILEO
NUESTRAS SOLUCIONES IMPLICARAN
Muchos dispoitivos Escala Seguridad Muchos datos IntegraciónSeguridad
PATRONES DE INTEGRACION DE LA IOT
Telemetry
La información fluye de un dispositivo hacia otro Sistema notificando estado del dispoitivo y del entorno
Inquiries
Requerimientos desde los disposiitivos buscando obtener información o solicitando se inicien acciones
Commands
Comandos enviados desde otros sistemas a un dispositivo o a un grupo de dispoitivos para que ejecuten determinada actividad
Notifications
Información fluyendo de otros sistemas hacia un dispositivo acarreando información
DESAFIOS
TelemetryIngest
Patrones de comunicación
Sencillo …
• Volumen de entrada
6
maquinas
20
sensores x
máquina
X 120
sensores X línea
de producci
ón
=
Hagamos las cuentas …
DESAFIOS
TelemetryIngest
Patrones de comunicación
Sencillo …
• Volumen de entrada
120
sensores x línea
de producci
ón
4
Líneas de
producción x planta
X 480
sensores X planta
=
Hagamos las cuentas …
DESAFIOS
TelemetryIngest
Patrones de comunicación
Sencillo …
• Volumen de entrada
480
sensores X planta
60
Telemetría.
Envíos x
minuto
X 1,728,000
Envíos x hora
=
Hagamos las cuentas …
DESAFIOS
TelemetryIngest
Patrones de comunicación
Sencillo …
• Volumen de entrada
1,728,000
Envíos x hora
50
Clientes
X 86,400,000
Envíos x hora
=
Hagamos las cuentas …
Y todo 7 x 24!!!!
AZURE SERVICESAzure ISS (Intelligent System Service)
Solución completa y pre-configurada
- Agente para dispositivos- Portal- Telemetria- Comando
AZURE SERVICES
Event Hub (Procesamiento de entradas y salidas escaable)Analytics
Event Hub
Custom Cloud Gateway
Ingest
Legacy IoT
„IP“ devices
CustomEgress
Service Bus
Azure SQL
Storage
HD-Insight
EVENT HUB INGESTIÓN: ESCALABLE CON PUB-SUS
Variedad: > millones de dispositivos conectados HTTP/AMQP/(MQTT)
Velocidad: > milliones de mensajes EventData por segundo
Volumen: > GB/s de ingreso
Egreso: Pub-sub: multiples consumidores concurrentes
Securidad: basada en SAS, token único x publicador
Buffer: Cada consumidor tiene su propio cursor/offset
Durable: Desde 1 a 30 días de retención
Latencia: 50ms end-to-end durable, <10ms para volátiles
Económ.: Servicio PaaS, pay-as-you-go
EVENT HUB PARA IOT, BIG DATA
Event Sources Cloud Services
Storage & Analytics
Custom Code & 3rd Party Services
Web/Mobile User Interfaces
Integration Services
Event Hub
- Hyper Scale -- Fully Managed
-- Interoperable -
- Secure -- Cost Effective -
PROTOCOLOS Y CONECTIVIDAD DE LA PLATAFORMA
Azure Service BusQueues
Topics
Event hubs
/azure-sdk-for-python/
/azure-sdk-for-php/
/azure-sdk-for-node/
/azure-sdk-for-java/
/azure-sdk-for-ruby/
HTTP(S)
https://github.com/
windowsAzure/
AMQP 1.0
AMQP 1.0
Embedded
Proton-C AMQP 1.0
AZURE INTELLIGENT SYSTEMS SERVICE
SKU Basic Standard
Throughput unit (1 MB/s Ingress, 2 MB/s Egress)
$10 / month $20 / month
Ingress events(Event consumption is free)
$0.028 per million incoming events (outgoing free)
Message retention 1 day 1 day
Additional Storage for message retention
No Up to 7 days
50% de descuento en el preview
DEMO
Azure EventHub y Windows for IoT
MICROSOFT AZURE MACHINE LEARNING
Recommenda-tion engines
Advertising analysis
Weather forecasting for business planning
Social network analysis
IT infrastructure and web app optimization
Legal discovery and document archiving
Pricing analysisFraud detection
Churn analysis
Equipment monitoring
Location-based tracking and services
Personalized Insurance
• La simplicidad de la nube
• Algoritmos potentes
• Habilidad de poner en producción
• Integración con R
• Ecosistema
DEMOAZURE ML Y LA IOT
APLICABILIDAD: MANTENIMIENTO
Reactive Preventive Predictive
CASOS DE USO TIPICOS
Degradación Desviaciones Step
Aumento en el consumo de energía Falta lubricación en el sistema
Número de mensajes de error es inesperadamente e irregularmente alto Sensor de luz con contacto flojo
Súbito incremento en el consume de energía Pérdida en el Sistema de aire comprimido
RECAP…
• Windows estará disponible para la IoT, hoy estamos en una etapa temprana
• Azure está listo para proveer todo el andamiaje necesario para una solución con la escalabilidad que requiere la IoT
• Azure ML democratiza el acceso a una poderosa plataforma de Machine Learning
FIN
AZURE SERVICES
Event Hub (Ingest / Egress at scale)
Create PublisherEventHubClient eventHubClient = EventHubClient.Create("event hub name");EventHubClient eventHubClient = EventHubClient.Create("/event hub name/Publishers/foo");
Publish MessageEventData ed = new EventData();ed.PartitionKey = "deviceID";eventHubClient.Send(m); messageSender.Send(m);
CREATE AN EVENT HUBAzure Portal
Code
NamespaceManager nm = NamespaceManager.Create();
EventHubDescription ed = new EventHubDescription(“My Event Hub")
{ PartitionCount = 32 };
ed = await nm.CreateEventHubAsync(ed);
EVENT HUB SEND// Create the client.
EventHubClient ec = EventHubClient.Create(“My Event Hub");
// Create an event to send.
EventData ed = new EventData();
ed.PartitionKey = "deviceID";
//.. Add other event properties.
// Send the event.
ec.Send(ed);
EVENT HUB RECEIVE (DIRECT)
// Create the client.
EventHubClient ec = EventHubClient.Create(“My Event Hub");
// Get the default Subscriber Group.
EventHubSubscriberGroup subscr = ec.GetDefaultSubscriberGroup();
for (partitionId = 0; partitionId < numPartitions; partitionId++)
{
// One receiver per partition.
// You can optionally pass a starting Offset (Id or Time) – go back in time!!
EventHubReceiver consumer = await subscr.CreateReceiverAsync(partitionId,
DateTime.New.AddDays(-1));
// Keep receiving in a loop..
var message = await consumer.ReceiveAsync();
}
EVENT HUB RECEIVE (SIMPLE – PUSH STYLE)EventProcessorHost host = new EventProcessorHost(WorkerName, EventHubName, …, blobConnectionString);
host.RegisterEventProcessorAsync<SimpleEventProcessor>();
public class SimpleEventProcessor : IEventProcessor
{
……
public async Task ProcessEventsAsync(PartitionContext context, IEnumerable<EventData> messages)
{
foreach (EventData message in messages)
{
var newData = new StreamReader(message.GetBody<Stream>()).ReadToEnd();
string key = message.PartitionKey;
// Process event.
}
await context.CheckpointAsync();
}
}