serverless iot applications
play

serverless IoT-Applications BED-Con 2017 Niko Will, innoQ - PowerPoint PPT Presentation

serverless IoT-Applications BED-Con 2017 Niko Will, innoQ @n1ko_w1ll about me > Developer since 2005 > living in a Smarthome since 2012 > became an IoT Geek > before: worked on Bosch IoT Suite for 2 years > now: Consultant at


  1. serverless IoT-Applications BED-Con 2017 Niko Will, innoQ @n1ko_w1ll

  2. about me > Developer since 2005 > living in a Smarthome since 2012 > became an IoT Geek > before: worked on Bosch IoT Suite for 2 years > now: Consultant at innoQ > follow me on Twitter: @n1ko_w1ll @n1ko_w1ll

  3. agenda > microservices approach > AWS, Lambda & IoT > use-cases > JITR | on-boarding | pairing > list / search things | command & control | telemetry > connected / disconnected / LWT > encrypted fj le transfer | fj rmware update @n1ko_w1ll

  4. microservice approach @n1ko_w1ll

  5. microservices approach > fault tolerance > scalability > agility > visibility > security > cost-e ffj ciency @n1ko_w1ll

  6. microservices approach IoT-application mobile client thing Users Devices Policies MQTT Broker API Gateway Rules Analytics … browser database @n1ko_w1ll

  7. microservices approach microservices Service Message Service Message Service Message Discovery Broker Discovery Broker Discovery Broker Devices … Devices … Devices … MQTT Broker API Gateway MQTT Broker API Gateway MQTT Broker API Gateway docker / kubernetes IAM Keystore IAM Keystore IAM HSM database @n1ko_w1ll

  8. microservices approach monitoring microservices logging fluentd prometheus Devices elasticsearch docker / kubernetes Alert Grafana Kibana Manager operations (DevOps) alerting @n1ko_w1ll

  9. @n1ko_w1ll source: https://www.memecenter.com/fun/5802169/what-could-possibly-go-wrong

  10. AWS @n1ko_w1ll

  11. AWS State Fast Data AWS Lambda Amazon DynamoDB Amazon SQS Amazon Elasticsearch Amazon SNS AWS IoT Amazon Kinesis Amazon API Gateway Amazon S3 Amazon Cognito Amazon CloudWatch @n1ko_w1ll

  12. AWS Lambda @n1ko_w1ll

  13. AWS Lambda > Functions-as-a-Service (FaaS) > serverless > „small“ functions > stateless compute containers > event-driven @n1ko_w1ll

  14. AWS Lambda > advantages > scalable > pay-per-execution / pay-as-you-go > no upfront capacity planning > signi fj cantly reduce operational cost @n1ko_w1ll

  15. AWS Lambda > disadvantages > vendor lock-in > startup latency > testing > debugging > execution duration @n1ko_w1ll

  16. @n1ko_w1ll

  17. AWS IoT @n1ko_w1ll

  18. AWS IoT > managed service > message broker > rules engine > shadows > registry > security @n1ko_w1ll

  19. message broker > topic based $aws/events/presence/connected/clientId $aws/events/presence/disconnected/clientId > publish / subscribe $aws/things/thingName/shadow/update > topic wildcards $aws/things/thingName/shadow/update/delta > protocols > MQTT > MQTT + WebSockets > HTTP @n1ko_w1ll

  20. rules engine > SQL-like syntax SELECT *, > augument or fj lter data newuuid() AS requestId, clientId() AS clientId, > rule actions timestamp() AS timestamp, topic(2) AS deviceId, > state stores topic(4) AS sensorId FROM 'device/+/sensor/+/v1' > fast data pipelines WHERE temperature > 50 AND color <> 'red' > CloudWatch > Lambda > republish @n1ko_w1ll

  21. shadows > JSON document { "state" : { > current state of thing "desired" : { "color" : "RED" }, "reported" : { "color" : „GREEN" } }, > connection independent "metadata" : { "desired" : { "color" : { "timestamp" : 12345 } }, > supports client tokens "reported" : { "color" : { "timestamp" : 12345 } } }, > supports versioning "version" : 10, "clientToken" : "UniqueClientToken", "timestamp": 123456789 > MQTT topics } > RESTful API @n1ko_w1ll

  22. registry > manage your things { "version": 3, > physical device or sensor "thingName": "MyLightBulb", "defaultClientId": "MyLightBulb", > logical entity "thingTypeName": "LightBulb", "attributes": { "model": "123", > attributes "wattage": "75" } > thing types } @n1ko_w1ll

  23. security > mutual authentication with X509 certi fj cates + TLS 1.2 > or SigV4 for HTTPS and WebSockets > bring your own certi fj cate > JITR > Atmel ECC508 > policy based access with dynamic values > role based rules action execution @n1ko_w1ll

  24. use-cases @n1ko_w1ll

  25. just in time registration (JITR) IoT Policy AWS Lambda AWS IoT thing IoT Rule $aws/events/certi fj cates/ Device Registry registered/ caCerti fj cateID @n1ko_w1ll

  26. on-boarding IoT Policy Device Shadow AWS IoT thing Amazon DynamoDB AWS Lambda IoT Rule custom/ clientId /register @n1ko_w1ll

  27. thing pairing mobile client Amazon Cognito AWS IoT thing exchange OAuth token for AWS credentials Amazon API Gateway AWS Lambda IoT Policy Device Shadow @n1ko_w1ll

  28. list / search things mobile client Amazon Cognito AWS IoT things Amazon API Gateway AWS Lambda Amazon DynamoDB @n1ko_w1ll

  29. command & control mobile client Amazon Cognito AWS IoT thing Amazon API Gateway AWS Lambda Device Shadow @n1ko_w1ll

  30. command & control mobile client Amazon Cognito AWS IoT thing Device Shadow @n1ko_w1ll

  31. command & control Amazon Echo AWS Lambda AWS IoT thing Alexa Skill Amazon Cognito Device Shadow @n1ko_w1ll

  32. telemetry Amazon Kinesis telemetry rule telemetry topic AWS IoT Amazon EMR Amazon DynamoDB things @n1ko_w1ll

  33. connected / disconnected / LWT { "state": { AWS IoT thing "reported": { "connected": true } } } { "state": { "reported": { "connected": true } } shadow update topic Device Shadow } @n1ko_w1ll

  34. connected / disconnected / LWT { "state": { AWS IoT thing "reported": { "connected": false } } } { { "state": { "state": { "reported": { "reported": { "connected": false "connected": true } } } } shadow update topic Device Shadow } } @n1ko_w1ll

  35. connected / disconnected / LWT LWT LWT rule custom LWT topic AWS IoT thing republish { { "state": { "state": { { "reported": { "reported": { "state": { "connected": true "connected": false "reported": { } } "connected": false } } } shadow update topic Device Shadow } } } } @n1ko_w1ll

  36. encrypted fj le transfer AWS Lambda AWS IoT thing AWS KMS Amazon S3 @n1ko_w1ll

  37. fj rmware update Amazon S3 AWS Lambda AWS IoT thing Amazon DynamoDB Device Shadow @n1ko_w1ll

  38. summary > scalable plattform > common IoT use-cases > w/o own infrastructure > w/o upfront capacity planning > very secure > very extensible @n1ko_w1ll

  39. Thank you. @n1ko_w1ll Niko Will Questions? niko.will@innoq.com Comments innoQ Deutschland GmbH innoQ Schweiz GmbH Krischerstr. 100 Ohlauer Straße 43 Ludwigstr. 180E Kreuzstraße 16 
 Gewerbestr. 11 40789 Monheim am Rhein 10999 Berlin 63067 O fg enbach 80331 München CH-6330 Cham Germany Germany Germany Germany Switzerland www.innoq.com @n1ko_w1ll Phone: +49 2173 3366-0 Phone: +49 2173 3366-0 Phone: +49 2173 3366-0 Phone: +49 2173 3366-0 Phone: +41 41 743 0116

Recommend


More recommend