A Microservice: what, how, where.... a Point of View¶
Original blog publish date: Aug 3, 2015
I was doing some brainstorming and I “mind mapped” out the following Point of View regarding what a Microservice is, what it does, and how it works. Feel free to lob your tomatoes.
My Mindmap......
OK... for those of you who are squinting......
- Each Microservice is an executable thing.
- A fundamental but important callout. A Microservice can be something that someone does for you, not something that is automated as an executable code modual.
- Each Microservice can be defined via an definition that is based on standard metadata.
- This allows it to show up in a catalog that supports, browse, search, order.
- There are a core set of Patterns or approaches for which services can be created
- Stateless processing that takes input in, does something ( e.g. update a database), and optionally returns a response. Do it and be be done with it.
- Unique instance of a Microservice created that is associated to a specific resource. The service could live as long as the resource.
- Plug into something and support
- Microservice that supports multiple resources.
- In other words, it is multi-tenant.
- Microservice that supports one instance of a resource
- Single tenant and potentially long lived.
- Microservice that does one thing.
- Microservice that represents a domain of functionality. In other words, it does multiple things.
- Microservice that is only interacted with via programmable API
- Microservice that has a UI in which the end user utilizes to interact with the service.
- All Microservices should be loosely coupled. i.e. they are not dependent on each other.
- Enables services from multiple providers to be utilized.
- While a service can be stateless, there are also specific states that can be associated to a service. For example: Not Running; Starting; Running; Stopping; Stopped.
- Thus, as a service comes online it can execute various processes that help to change the state of the service.
- In a single solution, services can be implemented via different languages.
- e.g. one Microservice could be implemented via Java, another via Python, and still another via Ruby.
- Micro services can be deployed to different types of runtimes. ( e.g. Virtual Machines, PaaS environments ( e.g. Bluemix ), Containers, etc...)
- Micro services can be deployed on-premise, and/or on various cloud service providers such as AWS, Azure, Google Cloud, etc...
- In practice multiple services in a single solution would more than likely be deployed to a single provider, but in reality, especially with container support, multiple providers could be leveraged based on needs and requirements.
- Microservices that work with/“plug into” specific resources could be deployed with those resources, or remotely. It depends on the details.
- A Microservice can be deployed in a single executable environment ( e.g. Container, VM) or in a set of related/linked executable environments.
- A Microservice will know what is dependencies are and will need to have a definition of this structure.
- e.g. dockerfile/compose.yaml
- A Microservice can be configurable:
- Configurations that apply to all requestors/users
- Configurations ( aka Policies) that apply to a specific set of consumer
- All Microservices need to have a some sort of API.
- There can be operational APIs: APIs that implement the core functionality.
- There can be management and config APIs that provide a management interface to running APIs.
- Microservices can be event enabled to respond to specific events. The actual event bus can be support by a service provider ( e.g. AWS Lambda, or open source software such as Kafka) . The service itself does not need to provide this.
- A service can have a web enabled UI ( e.g. browser enabled)
- There needs to be an API gateway in place in which all operational services are registered with. Registration can be automatic or manual.
- Microservices can be created/modifed using a DevOps approach
- Microservices can be deployed via scaling/clustering ecosystems such as Meso’s or Kubernettes. Services themselves don’t need to implement this capability.
Last update: November 3, 2024