Microservices 101
Impress anyone with these buzzwords: …
--
What is a Microservice?
Before answering that, I want to answer what is NOT:
Monolith Server: The most traditional approach to create an application, e.g. an application contains a client-side, a server-side and a database, and relies on a single server.
Service Oriented Architecture (SOA): The application consists of cohesive business processes, communicating through Enterprise Service Bus (ESB).
According to Martin Fowler [1], microservices are “small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.”
These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.
And, there are also many common features shared across microservices, such as:
Componentization via Services: Services are as decoupled and as cohesive as possible.
2 types of components:
- Libraries: components that are linked into a program and called using in-memory function calls.
- Services: out-of-process components who communicate with a mechanism such as a web service request, or remote procedure call (RPC).
A RPC creates the illusion of calling a library function when in fact a service function is called (more on RPC in the next sections).
Smart Endpoints, Dumb Pipes: An endpoint contains the whole core functionality, whereas a pipe acts only as a message router.
Infrastructure Automation: The whole infrastructure details of a program can be configured e.g. by using YAML…