Advantage microservices architecture
The power of cloud: Services at the edge and in the central location (cloud) should work together to deliver complete business functionality.
Services requiring large computing resources – big data, analytics, machine learning etc. – should be delegated to the cloud, not only because of the computing load but also to leverage cloud services. Services requiring scalability should be delegated to the cloud where possible.
Services with high (local) criticality and quick response time are better deployed at the edge because critical services should not depend on connectivity to the central location being available at all times.
Following microservices architecture will make it easier to migrate services from the edge to the cloud, and vice versa. As more computing power becomes available at the edge, it may make sense to move some services to the edge. Conversely, improved connectivity may allow some services to migrate to the cloud to take advantage of cloud features.
Interoperability: Microservices architecture fully enables heterogeneous technologies to co-exist. Services communicate via standard interfaces only and assume no knowledge of inner working of other services, therefore they can work with one another even if they are implemented using different technology stacks.
IoT solutions are evolving fast; devices, protocols, data formats and other technical details are still evolving. Therefore, IoT services that communicate via standard interfaces will accelerate interoperability and help gain customer acceptance.
Fast releases: Microservices architecture allows faster releases because of small service size and independence of deployment, supported by appropriate release philosophy, methods and tooling (Agile/DevOps, CI/DC etc.). This is another aspect that should appeal to IoT solution providers: quick releases can be done to adapt to customer behavior and the application environment.
Resilience: An IoT system will have many physical parts deployed in possibly tough environment; any single component failing should not bring down a whole system. Decomposition of responsibility into small size, and independent deployment - characteristics of microservices architecture - can create overall system resilience.
Composability/re-use: Microservices architecture uses fine grained, single-responsibility services to build more complex business functionality. New system capability can be built combining existing services in new ways - HTTP and REST based interfaces commonly used in microservices architecture facilitates this. The IoT ecosystem can create faster value for customer if basic services can be leveraged by multiple stakeholders to deliver higher value services.
Integration: The integration challenge of IoT is varied and complex. Applying microservices architecture – encapsulating data and logic in a “black-box” (i.e. service) which is only accessible through a state-less interface - can simplify the integration challenge. A state-less interface is easier to integrate with because a service consumer will not need to track state transitions while communicating with the service provider.
Architecture components: Microservices architecture has become closely associated with certain architecture component/patterns. NoSQL databases, event bus, API management platform, event correlation, service choreography etc. have become popular components/patterns. These can be deployed successfully in IoT systems by leveraging the expertise already gained in microservices architecture. Many of the components are easily deployed in the cloud or available as cloud services, and solution providers will start tailoring such components for IoT use cases, especially for the edge.
Widely available tool-set: A large ecosystem of tools/methods have come up to support the development, deployment and operation of microservices – CI/CD tools, container management tools, and log aggregation and monitoring etc. These can be easily leveraged to build and operate IoT services.
Towards a connected future
Microservices architecture encapsulates best practices for designing innovative, scalable, and resilient applications. It focuses on tangible results while remaining responsive to changing requirements. It is also an approach more suited to experimentation as it encourages a method of incremental learning-by-doing, and limits the impact of failure – at design time and at run time.
Not all challenges of IoT can be addressed with microservices architecture: scalability at the edge, higher risk of failure of IoT devices due to exposure to physical environment, integration at the physical layer are examples of such challenges. However, there is a lot to be gained in other areas.
Applying microservices architecture to IoT will build momentum towards a service-based future for IoT. There is immense potential waiting to be exploited.