Microservices and Component Lifecycle Management
In this article, I wanted to share the excitement around the aspect of component-level lifecycle management using Microservices. First, let me set the stage.
Pure Enterprise applications, catering to Businesses of scale have been around since the 90s. The growth and categorization schemes paved way for new staples of IT applications such as ERP, SCM, DW, BI, EAI, B2B and so on. Though there are new entrants in the past decade, the rate of growth has slowed down or dwindled. Most of their current efforts are focused around adapting to new age SMAC, IoT, AR, VR and the likes.
At the same time, the popular culture applications, should I say apps; have been on the rise. These are typically B2C or C2C models, but the complexities and expectation have increased so much that they also have to handle some of the enterprise-level nuances. These can be ranging from traditional requirements like scale, availability, performance to new-age requirements like agnostic integration, polyglot nature, AI, Data Science, NLP and so on.
Key requirements of new age applications are manageability and communication. Both have a far-reaching impact on the choices of architecture, design, data and process models, and finally the interfaces. Let us look closely at the interaction and manageability aspects.
In general, application and component interactions are facilitated by techniques like RPC, SOAP, REST, JMS and others. These techniques offered a robust model for communication enabling data exchange and workflows. Eventually, we saw the rise of service-orientation with notions like endpoints, interfaces, and proxies to enable internal and external interactions. Still, most of the focus is on data exchange and flow control. What more can be done, I think integrated component life-cycle management.
Certainly, component lifecycle management has become a critical requirement in the modern applications. With this, an entity which used to be treated as a plain data block (record or document) in a data store and manipulated to represent a state can now be attached to life-cycle operations such as START, STOP, PAUSE etc.
A component can be viewed as a living entity with
- State
- Service interfaces
- Lifecycle management interfaces
The last part can be extended in any existing solution utilizing the facilities in the framework or containers. However, a fresh look at the whole issue gives an opportunity utilize an emerging technique for component design referred to as Microservices. Ability to model an entity to maintain state, extend services for interaction and lifecycle management with ease are the foremost benefits of Microservices.
In a typical model, an entity and its state would be represented as a record in a database. Any representation of lifecycle state would be captured as an attribute on the record. In effect, the lifecycle management is just about changes to this attribute on the record. This will do good for simple requirements, but the complex nature of scalability and availability requirements demanded by modern problems are hard to meet.
Microservices makes it easy to build entities as service components, rather than a record in a database, managed by generic service interfaces that take the component identity as an argument. Components built as Microservices can be viewed as living entities either in a container of their own or in a framework container. They can be managed individually or as a similarity-based group, giving rise to varieties of modes in control over their availability.
Above all, event-based interaction has become the norm to build asynchronous, scalable and high-performance applications. Almost all the frameworks have inbuilt capabilities to support an event or message-based interactions between components as well as the external world. This empowers the components built as Microservices for expanded capabilities without compromising functionality or performance.
Let us consider an example of an application that exposes vendors and their services in a multi-mode (Mobile, Web, Social, Appliance, Cloud etc.), multi-service, hosted platform. The goal is to manage exposure to services with fine-grain control based on the choice of services and interaction modes in real-time. Microservices makes it easy to accomplish the following:
- Lifecycle management of components (stop, start, pause etc.) without impacting the entire application (no restart required)
- Lifecycle management components as a group
- Automatically controlled exposure of services and their endpoints corresponding to the lifecycle changes
- A control center perspective on the component infrastructure (dashboard) for administration and monitoring
- Z-axis scaling (from the ScaleCube scalability model) for improving performance and scale
In essence, Microservices has opened doors for new design principle and numerous frameworks built on various programming languages (some are polyglot) making it easy for solution designers to bootstrap quickly. Vert.x, Node.js, SpringBoot, ScaleCube.io are some of the front runners in this aspect.
Microservices has a lot more to offer and discuss, this is just a high-level perspective on a specific aspect.
Excellent article. Good One...