When designing a microservice architecture for a concrete application, many decisions have to be taken, e.g. concerning the service structure, the technology stack and the operating environment. With microzoo, a lightweight open-source framework, architects can easily and quickly test, compare and evaluate different microservice architectures and technology stacks.
The fear of failure
When it comes to the selection of a technology stack, many solution architects tend to use technologies, they have used before. Out of the fear to risk the success of a project, architects avoid using new approaches. Clearly, there are many factors that have to be taken into account, such as available programming skills, stability of components, their community support and available documentation. Sometimes, it’s simply the time that is missing to evaluate promising developments and there is no chance to take the risk using an unknown technology stack.
Reducing risk with an experimental kit
However, many promising developments have appeared in the last few years, comprising programming languages, application frameworks and operating environments. These projects claim to have distinct advantages over older technologies. microzoo uses the principles of an experimental kit to offer the opportunity to architects and developers to experiment with different technology stacks, to evaluate microservice structures and to play with operating environments. This approach greatly reduces the risk connected with switching to a new technology stack. microzoo helps to answer following questions:
- What properties and behavior does a certain technology stack have?
- How do different technology stacks behave in direct comparison?
- How do technologies interoperate and fit together?
- What are the properties of a certain service architecture?
- How does the bahavior of a component influence the overall system?
Configuration of the operating environment
- What is the necessary sizing for the system?
- How does a system behave in a given environment?
- What are the recurring costs for an appropriate environment?
microzoo is not only useful as a tool for system design, but also can be well used for training and teaching.
The structure of microzoo
microzoo consists of a collection of prefabricated, configurable components that are typically used in a microservice architecture. These components are divided into categories. Currently, microzoo supports the categories Services and Databases. Service components are the basic building blocks of a microservice system and implement defined interfaces. They may be built with different technologies. They can be individually combined to an architecture according to a specific application scenario. Components within a category can be used interchangeably, so that various combinations can be tested and compared. The component system of microzoo is extensible and it is planned to continuously extend the component catalog. The solution is container-based, i.e. all components are provided as containers and can be deployed in a container platform such as Docker or Kubernetes.
Accessibility by visualization
For modelling microzoo architectures, a graphically supported format was deliberatly chosen for the system specification with the aim to make the system easily accessible for everyone. Since architectures are typically visualized using UML or a UML-alike notation, the modelling tool PlantUML turned out to be a perfect fit, since it is also well supported by major IDEs. PlantUML diagrams are created in text form and transformed to a diagram by the PlantUML software with automatic layout.
The microzoo engine, which is controlled with a command line interface, creates a setup for a target environment from the PlantUML specification. The CLI is also used to deploy such a setup to a given target environment, be it local or remote. When a system has been deployed, it can be e.g. load-tested or observed and analyzed with a monitoring solution.
Starting a microzoo architecture requires just a single command:
bin/microzoo deploy my-architecture
This will parse, validate, translate the specification and deploy it to the target environment.
Currently, microzoo offers only few components — a spring boot service and four different database systems. The modular concept however makes it easily extensible. Basically, it is necessary to integrate a manifest file to make a new component available. It describes the properties and supported interfaces of a component. The component manifests are used by the microzoo engine for creating the configuration for target environements.
The completion of microzoo with more component categories is ongoing work. Such categories, typically used in microservice architectures, are e.g. service meshes and ingress controllers. Moreover, the extension with more communication protocols, such as gRPC and message based approaches, is planned.
microzoo is freely available on Github: https://github.com/iteratec/microzoo