Update Microservices Principles authored by Dania Kodeih (Microsoft)'s avatar Dania Kodeih (Microsoft)
![Available.png](uploads/.attachments/Available-2d6c8b00-a4be-474b-b00c-0667361f41b5.png )
The Architectural style of the data ecosystem is microservices.
## Microservices
Microservices architecture is a convergence of concepts such as SOA, continuous delivery, virtualization and domain driven design. It creates technical and organizational scalability in performance through the distribution of tasks and in development by enabling teams to work autonomously from concept through to deployment.
The positive characteristics of microservices include:
- They are defined by the principles of Domain Driven Design and represent business concepts
- They are focused on doing one thing well
- They are preferably only large enough to do this one thing
- They are developed, evolved and executed autonomously
- They provide language neutral interfaces
- They do not rely on intelligence with the communication system (smart endpoints, dumb pipes)
- They do rely on infrastructure support for composition and orchestration; however, the services themselves are agnostic of the infrastructure in which they are hosted and orchestrated.
However, like any architectural choice, there are tradeoffs which include:
- The architecture and corresponding integration of components becomes increasingly complex to preserve the simplicity of individual services
- A distributed architecture is sensitive to latency and faults
- Testing is complicated as a result of distributed development and deployment
- Microservices as units of isolation result in information silos
- Partitioning workflows into microservices that can later be composed into new workflows in difficult
## Principles of a Microservices Architecture
Sourced from Building Microservices (Newman, 2015)
### Microservices embrace a Culture of automation
A microservices architecture is comprised of many moving parts deployed and operated in a distributed environment. Scalable systems development and evolution requires removing the human element whenever possible in development, assurance, deployment, and operations.
### Microservices hide internal implementation details
A microservice hides implementation detail to avoid coupling to allow it to evolve autonomously.
### Microservices decentralize all the things
A microservices approach requires decentralizing system (avoid reliance on shared systems), organization (supporting autonomy) and flexible composition (choreography).
### Microservices are deployed independently
Microservices have to be designed and validated for independent and safe deployment. This drives new concepts in quality assurance such as consumer driven contract testing.
### Microservices are designed for failure
Microservices operate in a distributed environment and need to be designed for failure. When successfully accomplished, microservices bring resiliency to a system through the isolation of fault.
### Microservices are highly observable
Microservices operate and scale in a distributed environment. To understand how they are operating, microservices must push information/events that we can monitor.
### Microservices are modeled around business concepts
Microservices should follow the domain of our business. This facilitates autonomy in development and composability into useful business workflows.
### Microservices are secure
Microservices must be built with security in mind, never exposing internals or operated with elevated privileges. The ability to build and deploy services independently allows quick response to security issues.
## Effect on Architectural Vocabulary
The adoption of Domain Driven Design influences the vocabulary of the architecture.
- Our services are actions (verbs) operate on value object, but do not relate to a specific object. They are things like ingest, enrich, & discover.
- These services are logically stateless in that they accept data/objects for the purpose of emitting new data/objects
- Our value objects (nouns) represent the domain of Up-stream Oil & Gas that are acted on by our services.