Upload
dangnhi
View
220
Download
0
Embed Size (px)
Citation preview
Microservicesas a design choice for IoT
Mayank Joneja
Agenda
Introduction to Microservices Advantages Characteristics of IoT Overview of Frameworks Common Design Features Examples from Research Domain Concluding Remarks
Traditional monolithic approach
• Single application
• All logic combined into single process
• Composed of classes, methods and packages
• Allows proper testing and use of deployment pipeline
• Every single change requires entire application to be re-deployed
Microservices
• A way of breaking down applications
• Instead of in-memory function calls, separate processes
• Small, highly decoupled and task specific
• Communicate with each other using lightweight mechanisms
• Model of software development popularized by Netflix, Amazon
Characteristics
• Componentization of service layer
• Well defined context boundaries
• Each service has separate “view” of the world and database
• Independently upgradable
• Inter-service communication using HTTP-REST APIs
Motivations
• Technology heterogeneity
• Organizational alignment
• Resilience
• Scaling
Characteristics of IoT
http://www.i-scoop.eu/internet-of-things/what-is-the-internet-of-things-iot-definitions/
IoT Cloud Platforms
Microsoft Azure IoT
AWS IoT
Lelylan
Mainflux
Microsoft Azure IoT
Components
Device connectivity
Azure IoT
For devices using CoAP or incapable of TLS/SSL
Devices requiring protocol translation
Device identity store
Device registry store
Device state store
Data flow and stream processing
Solution UX
App back end
Business systems integration
At-rest data analytics
AWS IoT
Components
• Device Gateway
• Message Broker
• Rules Engine
• Security and Identity service
• Thing registry
• Thing shadow
• Thing shadow service
Lelylan
Mainflux
Mainflux-core Mainflux-auth Mainflux-mqtt Mainflux-ui Mainflux-cli MongoDB Redis
Features of Mainflux
Responsive and scalable architecture based on a set of microservices
Set of clean APIs: HTTP RESTful, MQTT, WebSocket and CoAP
Device management and provisioning and OTA FW updates Highly secured connections via TLS and DTLS Easy deployment and high system scalability via Docker
images
Common Features
• Device Management and Provisioning
• Support for HTTP-REST, MQTT, Websockets
• Support for TLS/OAuth
• Direct support for UX integration or via Webhooks
• Support for stateless communication via proxy/shadow
Smart City Architecture
• Paper by A. Krylovskiy et al
• Distinction between core middleware and smart city services
Smart Metering
• Paper by T. Vresk, I. Čavrak
• 3 independent micro-services for:• Transfer
• Processing
• Transformation of data
Conclusion
• Clear common aspects have emerged in modern cloud platforms
• Microservices architecture in research domain tends to be application specific but still shows some common features
• Still an active research topic and even platforms still under development
References
• http://martinfowler.com/articles/microservices.html
• A. Krylovskiy et al., “Designing a Smart City Internet of Things Platform with Microservice Architecture”, International Conference on Future Internet of Things and Cloud 2015
• T. Vresk, I. Čavrak, “Architecture of an interoperable IoT platform based on microservices”, MIPRO 2016
• http://dev.lelylan.com/architecture
• https://azure.microsoft.com/en-us/updates/microsoft-azure-iot-reference-architecture-available/
• https://aws.amazon.com/iot-platform/faqs/