IoT Platforms What? When? Why?
AUSWEIS.IO Alex Patsalo, CTO
WHAT IS IOT?
~ 6 annual budgets of Ukraine Money Device Per Year $195 Billion ~ 6 annual budgets of Ukraine 80 Billion ~ 10 devices per person 17 Billion
IOT STRUCTURE
IOT SENSOR CASE Device sends data to server Device is a client Http protocol Nothing new
IOT DEVICE CASE Device receives data and commands Device is a server Http protocol? No way) Something new Заменить иконки на: ветряк, солнечные панели, замок, умный дом….
MQTT (Message Queuing Telemetry Transport) Publish-Subscribe-based messaging protocol Publish and Subscribe to a broker on a topic No direct connection Quality of Service TLS Keep Alive
MQTT BROKERS ActiveMQ Apollo JoramMQ Mosquitto RabbitMQ
MQTT BROKERS (COMPARISON) QoS 0 QoS 1
EMQ - The Massively Scalable Open Source MQTT Broker 1 million connections (according to official documentation) But: With TLS ~ 200K With QoS 1 ~ 100K All these tests on: QingCloud 8 core CPU,28GB Memory,Ubuntu-16.04.1
MQTT BROKER RISKS DevOps (Installation, Support, Handle fuck-ups) Scalability It’s just MQTT broker All auth, web analytics, encryption is out of box, or with additional settings
IOT PLATFORMS Scalability Customization Price Technology Stack (Protocols, SDK) Support Security
MICROSOFT IOT HUB
MICROSOFT IOT HUB (FEATURES) Device twins Per-device authentication and secure connectivity Route device-to-cloud messages to Azure services based on declarative rules Integrate IoT Hub events into your business applications Monitoring of device connectivity operations An extensive set of device libraries IoT protocols and extensibility (MQTT v3.1.1, HTTPS 1.1, or AMQP 1.0) Scale
Device twins "deviceId": "devA", "etag": "AAAAAAAAAAc=", "status": "enabled", "statusReason": "provisioned", "statusUpdateTime": "0001-01-01T00:00:00", "connectionState": "connected", "lastActivityTime": "2015-02-30T16:24:48.789Z", "cloudToDeviceMessageCount": 0, "authenticationType": "sas", "version": 2, "tags": {"$etag": "123", "deploymentLocation": {"building": "43","floor": "1"}}, "properties": { "desired": {"telemetryConfig": {"sendFrequency": "5m"}}, "reported": {"telemetryConfig": {"sendFrequency": "5m","status": "success"} "batteryLevel": 55,"$metadata" : {...},"$version": 4}}
Per-device authentication and secure connectivity Token or X509 authentication Username {iothubhostname}/{device_id}/api-version=2016-11-14 Token - SharedAccessSignature sig={signature-string}&se={expiry}&sr={URL-encoded-resourceURI} X509 thumbprint Permission levels IoT supports TLS 1.2, TLS 1.1, and TLS 1.0, in this order TLS connection, you may need to download and reference the DigiCert Baltimore Root Certificate.
Route device-to-cloud messages Publish - /devices/{deviceId}/messages/events Publish - /devices/{deviceId}/messages/events?level=info&type=telemetry Subscribe - devices/{device_id}/messages/devicebound/# To read all messages on server side, you should use Event Hubs AMQP or SDK
Monitoring of device connectivity operations Device identity operations Device telemetry Cloud-to-device messages Connections File uploads Message routing
MICROSOFT IOT HUB (PRICING) EDITION TYPE PRICE PER UNIT (PER MONTH) TOTAL NUMBER OF MESSAGES/DAY PER UNIT MESSAGE METER SIZE Free 8,000 0.5 KB S1 $30.40 400,000 4 KB S2 $303.98 6,000,000 S3 $3,039.75 300,000,000
AMAZON IOT CORE
AMAZON IOT CORE AWS IOT DEVICE SDK DEVICE GATEWAY MESSAGE BROKER AUTHENTICATION AND AUTHORIZATION REGISTRY DEVICE SHADOW RULES ENGINE
AMAZON IOT CORE (MESSAGE BROKER) Almost the same as MQTT stangart broker Publish Sensor/temperature/room1/ Subscribe with wildcards Sensor/+/room1 Sensor/#/room1 Sensor/# Reserved Topics $aws/events/presence/connected/clientId $aws/events/presence/disconnected/clientId $aws/things/thingName/shadow/get/accepted
AMAZON IOT CORE (Rules Engine) Augment or filter data received from a device. Write data received from a device to an Amazon DynamoDB database. Save a file to Amazon S3. Send a push notification to all users using Amazon SNS. Publish data to an Amazon SQS queue. Invoke a Lambda function to extract data. Process messages from a large number of devices using Amazon Kinesis. Send data to the Amazon Elasticsearch Service. Capture a CloudWatch metric. Change a CloudWatch alarm. Send the data from an MQTT message to Amazon Machine Learning to make predictions based on an Amazon ML model. Send a message to a Salesforce IoT Input Stream.
AMAZON IOT CORE (PRICING) TOTAL WORKLOAD CHARGES $346.60 + $975.00 + $375.00 + $180.00 = $1,876.60 CONNECTIVITY CHARGES Minutes of connection = 100,000 connections * 60 minutes/hour * 24 hours/day * 30 days = 4,320,000,000 minutes of connection Connectivity charges = 4,320,000,000 minutes of connection * $0.08/1,000,000 minutes of connection = $345.60 MESSAGING CHARGES Messages = 100,000 devices * 325 messages/device-day * 30 days = 975,000,000 messages Messaging charges = 975,000,000 messages * $1.00/1,000,000 messages = $975.00 DEVICE SHADOW & REGISTRY CHARGES Device Shadow Requests = 100,000 devices * 100 requests/device-day * 30 days = 300,000,000 requests Device Shadow Size is less than 1 KB, so it is rounded up to the nearest KB (1 KB) Device Shadow Charges = 300,000,000 requests * $1.25/1,000,000 operations = $375.00 RULES ENGINE CHARGES Rules Triggered = 100,000 devices * 200 rules triggered/device-day * 30 days = 600,000,000 rules triggered Actions Executed = 600,000,000 rules triggered * 1 action executed/rule triggered = 600,000,000 actions executed Rules Charges = 600,000,000 rules triggered * $0.15/1,000,000 rules triggered = $90.00 Actions Charges = 600,000,000 actions executed * $0.15/1,000,000 actions executed = $90.00 Total Rules Engine charges = $90.00 + $90.00 = $180.00
GOOGLE IOT CLOUD Data Analytics in Cloud Data Usage
GOOGLE IOT CLOUD (FEATURES) End-to-end security Single global system Integrated services Advanced data analytics Fully managed infrastructure Partner ecosystem
GOOGLE IOT CLOUD (PRICE) Requests: 100,000 devices * 48 messages/device per day * 30 days * 1024 bytes = 130.73 GB Responses: Total data volume: 13.73 GB (Requests) + 13.73 GB (Responses) = 27.46 GB Taking into account the free data volume up to 250 MB, and the fact that the price per MB is $0.0045 in the 250 MB to 260 GB range, the pricing per month would use the following formula: (260.46 GB - 250 MB) * $0.0045 = $1250.41
CONCLUSIONS Feature\Platform Microsoft IoT Hub Amazon IoT Core Google IoT platform Scalability + +/- Pricing 30-50% low high Security TLS v1.1 Only TLS v1.2 Customization 3 rank 1 rank 2 rank Device monitoring Additional Tech, but ok Build-in No, only custom
Ausweis.io https://www.fb.com/alex.patsalo Thank you Ausweis.io https://www.fb.com/alex.patsalo