Microservices

Microservices is one of those architectural patterns which has emerged from the world of domain-driven design, continuous delivery, platform and infrastructure automation, scalable systems, polyglot programming and persistence.

How we help with Microservices

A microservices architecture takes this same approach and extends it to the loosely coupled services which can be developed, deployed, and maintained independently. Each of these services is responsible for discrete task and can communicate with other services through simple APIs to solve a larger complex business problem. As the constituent services are small, they can be built by one or more small teams from the beginning separated by service boundaries which make it easier to scale up the development effort if need be.

Decomposition

  • Decompose by business capability define services corresponding to business capabilities
  • Decompose by subdomain define services corresponding to DDD subdomains
  • Self-contained Service design services to handle synchronous requests without waiting for other services to respond
  • Service per team

Data management

  • Database per Service each service has its own private database
  • Shared database services share a database
  • Domain event publish an event whenever data changes

Testing

  • Consumer-driven contract test  a test suite for a service that is written by the developers of another service that consumes it
  • Consumer-side contract test a test suite for a service client (e.g. another service) that verifies that it can communicate with the service

Observability

  • Log aggregation aggregate application logs
  • Application metrics instrument a service’s code to gather statistics about operations
  • Audit logging record user activity in a database