You are on page 1of 9

Using Microservice Architecture: A

Generic Framework

Janaka Balasooriya, Ph.D.


Lecturer, Barrett Honors Faculty
Arizona State University
Objectives

Microservice Architecture
Design Patterns

Differentiate between external


and internal architecture design
patterns of microservice
architecture

M. Wenzel, D. Lee, C. De la Torre, L. Latham, B. Wagner, A. Jenks, N. Schonning, M. Veloso, and M. Jones, “Designing a microservice-oriented application,” Microsoft Docs, 01-Oct-2018. [Online].
Available: https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/microservice-application-design. [Accessed: 19-Mar-2019].
A General Framework for Microservice Architecture

A generic
microservice
architecture has
several key
components:
| Microservices
| API Gateway
| Event Bus
| Deployment
Platform
(infrastructure)
API Gateway

| API gateway represents a collection of API


endpoints provided by microservices.
| It helps microservices expose different
implementations of the same API for different types
of applications (such as mobile clients vs. web
clients).
| More intelligent API gateway implementations can
have cache memory for responses from API calls so
that frequent access to microservices can be
minimized.
API Gateway

| API gateway can be deployed on the cloud so that


application developers do not need to access and
be aware of API locations of each microservice.
| It can also implement load balancing, traffic
monitoring, security requirements, and other service
level agreements (SLAs).
| However, the API gateway is optional; applications
can directly communicate with microservices if
needed.
Event Bus

| The event bus is usually implemented as


asynchronous event-based communication
infrastructure that helps microservices propagate
updates and other relevant messages among
microservices.
| For example, the order processing service of a web-
based system may send quantity available after
purchases to the shopping cart service so that the
shopping cart data center will update its data storage
accordingly.
| The event bus is implemented as a publish/subscribe-
based event driven system.
Microservice Internal Architecture
| Microservices are
developed and
deployed as
autonomous
services.
| Autonomous
services are
essentially self-
sufficient.

M. Wenzel, D. Lee, C. De la Torre, L. Latham, B. Wagner, A. Jenks, N. Schonning, M. Veloso, and M. Jones, “Designing a microservice-oriented application,” Microsoft Docs, 01-Oct-2018. [Online].
Available: https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/microservice-application-design. [Accessed: 19-Mar-2019].
Microservice Internal Architecture
| If microservices
need to perform
transactions with
specially
distributed commit
protocols, suitable
algorithms, data
structures and
design techniques
need to be
adopted while
implementing
microservices.

M. Wenzel, D. Lee, C. De la Torre, L. Latham, B. Wagner, A. Jenks, N. Schonning, M. Veloso, and M. Jones, “Designing a microservice-oriented application,” Microsoft Docs, 01-Oct-2018. [Online].
Available: https://docs.microsoft.com/en-us/dotnet/standard/microservices-architecture/multi-container-microservice-net-applications/microservice-application-design. [Accessed: 19-Mar-2019].
Summary

| Microservices architecture is a generic architectural


pattern with a lot of flexibility in its actual realization.
| In general, it consists of four components:
- Microservices
- API Gateway
- Event Bus
- Deployment platform (infrastructure)
| Internal implementation of microservices adopts
various design and implementation techniques that
we have discussed.
- For example, the internal implementation of a microservices
can be fully object-oriented design and implementation.

You might also like