Internet of Things

Why IoT Development Needs Microservices and Containerization

With the advent of IoT and DevOps 2.0, the technology and architecture on which the IoT platforms and solutions are built will be one of the driving factors determining the long-term sustainability and success of any organization.  If we time travel from the times of mainframe, client/server, and web to now in the cloud era, the adoption of microservices and containerization becomes imperative in the IoT world.

Why Microservices

IoT has a huge deployment ecosystem containing multiple servers, applications, sensors, and protocols. It also has many end-points like firmware, web, mobile, and QA, which require heavy integration between device, data, and applications. This increases the development time and efforts even in an agile setup. Gartner predicts that through 2018, half the cost of implementing IoT solutions will be spent in integrating various IoT components with each other and back-end systems.  With microservices, the functionality is broken down to the lowest level components as small, modular, independently deployable and loosely-coupled services, which reduces the integration complexity faced with monolithic architecture. 

With microservices, users can easily build and maintain large and complex applications. For instance, IoT users want a seamless experience in terms of connectivity, UX design, accurate functionality, and performance. Maintaining these standards require frequent changes to the platform, devices, and applications. DevOps adoption for continuous deployment, integration, testing, and monitoring can help achieve these expectations around user experience. However, this can be taken one-step further with microservices since it provides greater agility. Tightly-coupled architecture, which has too many dependencies would require more time than microservices based architecture to deliver even a small change. For example, a small front-end web or mobile UI change requires coordinating with middleware, backend and database teams. This is why adopting microservices enables developers to iterate faster.

Why Containerization

Microservices are typically built around the business functionality, deployed automatically through a set process, and communicate through a lightweight mechanism like REST APIs. On the other hand, deployment using containers offers portability. Containerization reduces the time to deployment, as it only requires switching on the required container without affecting other containers running on the same host.  In a mature IoT environment, each microservice would be built using a different programming language like Python, Ruby, C/C++ or Java depending on the business function. Containers provide isolation while running on the same host, making the deployment of these varied services faster and easier and taking care of the library and framework dependencies. This collectively reduces the time to deploy the required changes to the device or applications.

Addressing Common Challenges

  1. Scalability is one of the challenges that organizations face with an explosive growth in the number of connected things.  As the hybrid cloud adoption increases for IoT deployment to achieve scale, adding more code would be the only option if traditional MVC architecture were used for IoT development. This would then increase the build time for each service trying to utilize the server resources like memory, CPU etc., efficiently adding to more costs.  In SOA architecture, more code and logic would need to be built for ESB or more code would be needed to guarantee communication and interface between different business services, making it cumbersome. In this scenario, Microservices brings scalability on demand both horizontally and vertically as each service can be scaled on a stand-alone basis.  For optimal cloud resource utilization, containers become the ideal choice. They can be added and removed as needed and orchestration frameworks can be used further for elastic scaling.
  2. Performance of an IoT system, right from sensor to cloud needs to be just right to delight the consumer.  For example, low powered, resource-starved devices or sensors would need host operating systems along with applications to deliver a good end-user experience when they send or receive events to switch on lights connected to thermostat or alarms. Containerization with microservices solves this challenge by allowing IoT devices to group the resources to be shared as and when needed. Also, high availability is ensured by inducing automatic creation and redundancy with multiple containers.

Developing an IoT platform is a costly endeavor requiring investment in hardware, infrastructure, and apps.  Microservices is an efficient implementation that reduces the infrastructure usage and cost.  It also reduces the maintenance cost of the code base. Furthermore, containerization effectively helps deploy microservices with best resource utilization and monitors this entire infrastructure through various frameworks, reducing operational overhead.

Hence, an overall architecture for IoT based on containerized microservices for device management, OTA updates, communication protocols, cloud services, web and mobile services with REST APIs would solve many of the above challenges posed today.

 

Urvashi Babaria is a Product Manager at eInfochips working in new age areas like IoT, DevOps and CloudOps. She is a techno-commercial marketer with nine years of experience in product and project management. Start a conversation with her at marketing@einfochips.com

Post Your Comment




Leave another comment.

In order to post a comment, you must complete the fields indicated above.

Post Your Comment Close

Thank you for your comment.

Thank you for submitting your comment, your opinion is an important part of SandHill.com

Your comment has been submitted for review and will be posted to this article as soon as it is approved.

Back to Article