WINDOWS AND THEINTERNET OF THINGSPABLO C GARCÍA (@PC_GARCIA)
PRINCIPAL PLATFORM SPECIALIST
MICROSOFT
“ ”
¿QUE ES LA INTERNET DE LASCOSAS?
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 datos
Valor 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 Logistics
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 porverticales
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
NUESTRAS SOLUCIONES IMPLICARAN
Muchos
dispoitivos Escala Seguridad Muchos datos IntegraciónSeguridad
PATRONES DE INTEGRACION DE LA IOT
Telemetry
La información fluyede un dispositivohacia otro Sistema notificando estado del dispoitivo y del entorno
Inquiries
Requerimientos desdelos disposiitivosbuscando obtenerinformación o solicitando se inicienacciones
Commands
Comandos enviadosdesde otros sistemasa un dispositivo o a un grupo de dispoitivos para queejecuten determinadaactividad
Notifications
Información fluyendode otros sistemashacia un dispositivoacarreandoinformació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)
Event HubLegacy IoT
„IP“ devices
EVENT HUB INGESTIÓN: ESCALABLE CON PUB-SUS
Variedad: > millones de dispositivos conectadosHTTP/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 Bus
Queues
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/windowsAz
ure/
AMQP 1.0
AMQP
1.0
Embedded
Proton-C AMQP 1.0
AZURE INTELLIGENT SYSTEMS SERVICE
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
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 analysis
Fraud 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
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
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 HUB
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();
}
}