Agile Software Systems

Microservices

May 23, 2020

Microservices is an architectural pattern that structures an application as a collection of services that are:

  • Highly maintainable and testable
  • Loosely coupled
  • Independently deployable
  • Organized around business capabilities
  • Owned by a small team

Microservice architectures enable the rapid, frequent and reliable delivery of large, complex applications. They also enable an organization to evolve its technology stack. In a microservices architecture, services are fine-grained and the protocols are lightweight.

Event-Driven Microservices

In an event-driven microservices architecture, systems communicate by issuing and consuming events. It must be noted that these events are not destroyed upon consumption as happens in message-passing systems, but instead remain readily available for other consumers to read as they require.

These services consume events from input event streams, apply their specific business logic, and may emit their own output events, provide data for request-response access, communicate with a 3rd-party API or perform other required actions. These can be stateful or stateless, complex or simple, implemented as long-running, standalone applications or executed as a function using Functions-as-a-Service.

The combination of event streams and microservices forms an interconnected graph of activity across a business organization with two major components: the nodes and the connections. First, we will take a look at the nodes by examining the concept of the bounded context. Following that, we will look at the connections between services, which are heavily influenced by an organization’s communication structures.

The events can be persisted indefinitely, at extremely large scale, and be consumed by any service as many times as necessary. Compute resources can be easily acquired and released on-demand, enabling the easy creation and management of microservices. Microservices can store and manage their data according to their own needs, and do so at scale that has previously been only in the domain of batch-based big-data solutions.