SlideShare a Scribd company logo
Microservices Architecture
Haim Michael
January 3rd
, 2023
All logos, trade marks and brand names used in this presentation belong
to the respective owners.
life
michae
l
www.lifemichael.com
Design Patterns
Introduction
01/03/23 © Abelski eLearning 3
Design Pattern?
“Each pattern describes a problem which occurs over and
over again in our environment, and then describes the core
of the solution to that problem, in such a way that you can
use this solution a million times over, without ever doing it
the same way twice”
Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King and
Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977.
01/03/23 © Abelski eLearning 4
Software Design Pattern?
“Software patterns are reusable solutions to recurring
problems that we encounter during software development.”
Mark Grand, Patterns in Java. John Wiley & Sons, 2002.
01/03/23 © Abelski eLearning 5
History
 The idea of using patterns evolves from the architecture field.
Christopher Alexander. A Pattern Language: Towns, Buildings, Construction
(Oxford University Press, 1977)
 The first GUI software patterns were set in 1987.
Ward Cunningham and Kent Beck. Using Pattern Languages for Object-Oriented
Programs. OOPSLA-87.
 The Gang of Four (AKA GOF) publish their “Design Patterns”
book in 1994.
Erich Gamma, Richard Helm, John Vlissides, and Ralph Johnson. Design
Patterns. Addison Wesley, 1994.
01/03/23 © Abelski eLearning 6
The Pattern Elements
 Each Pattern has the following elements:
Pattern Name
The official well known name we use to refer each one of the patterns.
Problem Description
A description of the problem the pattern comes to solve.
Solution Description
A description of the design solution. This element can include UML diagram and a
code sample.
Consequences
The benefits & costs of using a specific design pattern. This element is required in
order to evaluate one pattern comparing with others.
01/03/23 © Abelski eLearning 7
Continuous Evolvement
 Apart of the classic design patterns described by the Gang of
Four book, during the last 20 years we can identify many
more design patterns that evolved in specific domains (e.g.
Server Side), specific programming languages paradigms
(e.g. Functional Programming), specific architectures (e.g.
Microservices Architecture), and specific programming
languages (e.g. JavaScript).
Microservices
© 2008 Haim Michael 20150805
The Microservices Architecture
 The microservices architecture is a modern variation of the
Service-Oriented Architecture (SOA). Instead of developing
one monolithic application we develop multiple separated
small fine grained applications that provide their service using
a lightweight protocol.
© 2008 Haim Michael 20150805
Loosely Coupling Services
 Each and every micro-service is independent of the others.
This loosely coupling architecture reduced the dependencies
between the services.
© 2008 Haim Michael 20150805
REStful Web Services
 Representational state transfer (REST) is a software
architectural style that dominates the World Wide Web.
 REST emphasizes the scalability of interactions between
components, uniform interfaces, independent deployment of
components, and the creation of a layered architecture to
facilitate caching components to reduce user-perceived
latency, enforce security, and encapsulate legacy systems.
© 2008 Haim Michael 20150805
REStful Web Services
 REST has been employed throughout the software industry
and is a widely accepted set of guidelines for creating
stateless, reliable web APIs.
 Web APIs that obey the REST constraints is informally
described as RESTful.
© 2008 Haim Michael 20150805
REStful Web Services
 RESTful web APIs are typically loosely based on HTTP
methods to access resources via URL-encoded parameters
and the use of JSON or XML to transmit data.
© 2008 Haim Michael 20150805
REStful Web Services
This image was taken from https://en.wikipedia.org/wiki/Representational_state_transfer
© 2008 Haim Michael 20150805
The postman Platform
 Postman is an API platform for building and using APIs.
Postman simplifies each step of the API lifecycle and
streamlines collaboration.
 We can download the Postman application and use it for
checking web APIs we want to use.
https://postman.com
© 2008 Haim Michael 20150805
The postman Platform
© 2008 Haim Michael 20150805
The curl Utility
 The curl utility is a command line tool and library for
transferring data with URLs.
https://curl.se
© 2008 Haim Michael 20150805
The curl Utility
© 2008 Haim Michael 20150805
The grpc Framework
 gRPC is a modern open source high performance Remote
Procedure Call (RPC) framework.
 This framework allows us to connect services in and across
data centers with pluggable support for load balancing,
tracing, health checking and authentication.
© 2008 Haim Michael 20150805
The grpc Framework
 This framework is also relevant in last mile of distributed
computing. We can use gRPC for connecting devices, mobile
applications and browsers to backend services.
https://grpc.io
© 2008 Haim Michael 20150805
The grpc Framework
Data Management
01/03/23 © Abelski eLearning 23
Database Per Service
 Most services need to persist data, and they usually use a
database for doing so (e.g. invoices service stores
information about invoices we issue, customers service
stores information about customers, etc.).
 The Services must be loosely coupled in order to allow us to
develop, deploy and scale them independently.
The Problem
01/03/23 © Abelski eLearning 24
Database Per Service
 There are many cases in which there is a need to query data
managed by multiple micro services.
 Different micro services might have different requirements,
which might lead to the use of relational databases in some
of the cases, and the use of no-sql databases in others.
The Problem
01/03/23 © Abelski eLearning 25
Database Per Service
 The solution for these problems might be having a separated
persistent data for each and every micro service, and have a
separated API (for each and every micro service), that uses
that persist data only.
 We can allocate private tables per service, we can allocate
schema per service, and we can allocate a separated
database.
The Solution
01/03/23 © Abelski eLearning 26
Database Per Service
 Implementing this pattern ensures that the services are
loosely coupled. Changes to one service’s database won't
cause impact any other services.
 Each and every service can use the type of database that is
best suited to its needs.
Consequences
01/03/23 © Abelski eLearning 27
Shared Database
 Microservices might need to implement ACID (Atomicity,
Consistency, Isolation, and Durability) transactions.
The Problem
01/03/23 © Abelski eLearning 28
Shared Database
 We can share a single database between different micro
services in order to allow those micro services to implement
ACID transactions.
The Solution
01/03/23 © Abelski eLearning 29
Shared Database
 The developers can easily implement ACID transactions
when working with a single database. The single database is
simpler to handle.
 The development of the entire server side might be slower
due to the need to coordinate between different developers
that work on different micro services every schema change.
The coupling between the micro services increases.
Consequences
01/03/23 © Abelski eLearning 30
Shared Database
 When the server side is up and running the increased
coupling between the micro services might damage the
performance of our server side.
 Single database for multiple microservices might be not the
optimal one for some of the microservices.
Consequences
Communication
01/03/23 © Abelski eLearning 32
Message Queue Pattern
 When implementing the micro services architecture, we might
have micro services that need to communicate with each
other. This communication needs to be asynchronous in
order to keep the micro services loosely coupled.
The Problem
01/03/23 © Abelski eLearning 33
Message Queue Pattern
 The solution would be to implement a message queue
component that allows communication between processes or
between threads in the same process.
The Solution Image Credit to AWS
01/03/23 © Abelski eLearning 34
Message Queue Pattern
 The message queues provide an asynchronous
communication protocol in which the sender and receiver
don't need to interact at the same time. The messages are
held in a queue until the recipient retrieves them.
The Solution
01/03/23 © Abelski eLearning 35
Message Queue Pattern
 When implementing the micro services architecture, this
pattern allows multiple micro services to communicate with
each other asynchronously.
The Consequences

More Related Content

PPTX
Introduction to microservices
PDF
Azure Arc Overview from Microsoft
PPTX
Introduction to Microservices
PDF
Design patterns for microservice architecture
PPTX
Introduction to Microservices
PDF
Microservices with Java, Spring Boot and Spring Cloud
PPTX
Introduction to microservices
PPTX
Introduction To Microservices
Introduction to microservices
Azure Arc Overview from Microsoft
Introduction to Microservices
Design patterns for microservice architecture
Introduction to Microservices
Microservices with Java, Spring Boot and Spring Cloud
Introduction to microservices
Introduction To Microservices

What's hot (20)

PPTX
Microservices Architecture
PDF
Why Microservice
PPTX
Microservices
PPTX
Microservice vs. Monolithic Architecture
PDF
Microservice Architecture
PPTX
Monolithic architecture
PPTX
Comprehensive Terraform Training
PPTX
Lets talk about: Azure Kubernetes Service (AKS)
PPTX
Azure key vault
PDF
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
PPTX
MuleSoft Architecture Presentation
PPTX
Dynatrace
PPTX
Azure Application Modernization
PDF
Microservice architecture
PPSX
SOLID Principles and The Clean Architecture
PDF
Azure Monitoring Overview
PPSX
Event Sourcing & CQRS, Kafka, Rabbit MQ
PPTX
Kubernetes for Beginners: An Introductory Guide
PPTX
Microservice architecture design principles
PPTX
Spring Cloud Config
Microservices Architecture
Why Microservice
Microservices
Microservice vs. Monolithic Architecture
Microservice Architecture
Monolithic architecture
Comprehensive Terraform Training
Lets talk about: Azure Kubernetes Service (AKS)
Azure key vault
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
MuleSoft Architecture Presentation
Dynatrace
Azure Application Modernization
Microservice architecture
SOLID Principles and The Clean Architecture
Azure Monitoring Overview
Event Sourcing & CQRS, Kafka, Rabbit MQ
Kubernetes for Beginners: An Introductory Guide
Microservice architecture design principles
Spring Cloud Config
Ad

Similar to Microservices Design Patterns (20)

PPTX
Architecting Microservices in .Net
PPTX
Microservices architecture
PDF
Patterns of Distributed Application Design
PPTX
Introduction to Microservices Patterns
PPTX
Introduction to Microservices Patterns
PPTX
Micro service session 1
PDF
Microservices for Java Architects (Chicago, April 21, 2015)
PDF
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
PPTX
Micro Services
PDF
Microservices for java architects schamburg-2015-05-19
PDF
Microservices for Architects - Atlanta 2018-03-28
PPTX
Over view of software artitecture
PPTX
Patterns of Distributed Application Design
PPTX
Microservice's in detailed
PDF
#ATAGTR2020 Presentation - Microservices – Explored
PDF
Design Microservice Architectures the Right Way
PDF
Redis and Kafka - Advanced Microservices Design Patterns Simplified
PDF
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
PDF
Microservice Architecture Patterns, by Richard Langlois P. Eng.
PDF
CloudDesignPatterns
Architecting Microservices in .Net
Microservices architecture
Patterns of Distributed Application Design
Introduction to Microservices Patterns
Introduction to Microservices Patterns
Micro service session 1
Microservices for Java Architects (Chicago, April 21, 2015)
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Micro Services
Microservices for java architects schamburg-2015-05-19
Microservices for Architects - Atlanta 2018-03-28
Over view of software artitecture
Patterns of Distributed Application Design
Microservice's in detailed
#ATAGTR2020 Presentation - Microservices – Explored
Design Microservice Architectures the Right Way
Redis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
Microservice Architecture Patterns, by Richard Langlois P. Eng.
CloudDesignPatterns
Ad

More from Haim Michael (20)

PDF
Prompt Engineering Jump Start [Free Meetup]
PDF
IntelliJ Debugging Essentials for Java Developers
PDF
The Visitor Classic Design Pattern [Free Meetup]
PDF
Typing in Python: Bringing Clarity, Safety and Speed to Your Code [Free Meetup]
PDF
Introduction to Pattern Matching in Java [Free Meetup]
PDF
Mastering The Collections in JavaScript [Free Meetup]
PDF
Beyond Java - Evolving to Scala and Kotlin
PDF
JavaScript Promises Simplified [Free Meetup]
PDF
Scala Jump Start [Free Online Meetup in English]
PDF
The MVVM Architecture in Java [Free Meetup]
PDF
Kotlin Jump Start Online Free Meetup (June 4th, 2024)
PDF
Anti Patterns
PDF
Virtual Threads in Java
PDF
MongoDB Design Patterns
PDF
Introduction to SQL Injections
PDF
Record Classes in Java
PDF
Structural Pattern Matching in Python
PDF
Unit Testing in Python
PDF
OOP Best Practices in JavaScript
PDF
Java Jump Start
Prompt Engineering Jump Start [Free Meetup]
IntelliJ Debugging Essentials for Java Developers
The Visitor Classic Design Pattern [Free Meetup]
Typing in Python: Bringing Clarity, Safety and Speed to Your Code [Free Meetup]
Introduction to Pattern Matching in Java [Free Meetup]
Mastering The Collections in JavaScript [Free Meetup]
Beyond Java - Evolving to Scala and Kotlin
JavaScript Promises Simplified [Free Meetup]
Scala Jump Start [Free Online Meetup in English]
The MVVM Architecture in Java [Free Meetup]
Kotlin Jump Start Online Free Meetup (June 4th, 2024)
Anti Patterns
Virtual Threads in Java
MongoDB Design Patterns
Introduction to SQL Injections
Record Classes in Java
Structural Pattern Matching in Python
Unit Testing in Python
OOP Best Practices in JavaScript
Java Jump Start

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
KodekX | Application Modernization Development
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Modernizing your data center with Dell and AMD
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PPTX
Cloud computing and distributed systems.
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
A Presentation on Artificial Intelligence
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
KodekX | Application Modernization Development
Unlocking AI with Model Context Protocol (MCP)
Modernizing your data center with Dell and AMD
NewMind AI Monthly Chronicles - July 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.

Microservices Design Patterns

  • 1. Microservices Architecture Haim Michael January 3rd , 2023 All logos, trade marks and brand names used in this presentation belong to the respective owners. life michae l www.lifemichael.com Design Patterns
  • 3. 01/03/23 © Abelski eLearning 3 Design Pattern? “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice” Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King and Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977.
  • 4. 01/03/23 © Abelski eLearning 4 Software Design Pattern? “Software patterns are reusable solutions to recurring problems that we encounter during software development.” Mark Grand, Patterns in Java. John Wiley & Sons, 2002.
  • 5. 01/03/23 © Abelski eLearning 5 History  The idea of using patterns evolves from the architecture field. Christopher Alexander. A Pattern Language: Towns, Buildings, Construction (Oxford University Press, 1977)  The first GUI software patterns were set in 1987. Ward Cunningham and Kent Beck. Using Pattern Languages for Object-Oriented Programs. OOPSLA-87.  The Gang of Four (AKA GOF) publish their “Design Patterns” book in 1994. Erich Gamma, Richard Helm, John Vlissides, and Ralph Johnson. Design Patterns. Addison Wesley, 1994.
  • 6. 01/03/23 © Abelski eLearning 6 The Pattern Elements  Each Pattern has the following elements: Pattern Name The official well known name we use to refer each one of the patterns. Problem Description A description of the problem the pattern comes to solve. Solution Description A description of the design solution. This element can include UML diagram and a code sample. Consequences The benefits & costs of using a specific design pattern. This element is required in order to evaluate one pattern comparing with others.
  • 7. 01/03/23 © Abelski eLearning 7 Continuous Evolvement  Apart of the classic design patterns described by the Gang of Four book, during the last 20 years we can identify many more design patterns that evolved in specific domains (e.g. Server Side), specific programming languages paradigms (e.g. Functional Programming), specific architectures (e.g. Microservices Architecture), and specific programming languages (e.g. JavaScript).
  • 9. © 2008 Haim Michael 20150805 The Microservices Architecture  The microservices architecture is a modern variation of the Service-Oriented Architecture (SOA). Instead of developing one monolithic application we develop multiple separated small fine grained applications that provide their service using a lightweight protocol.
  • 10. © 2008 Haim Michael 20150805 Loosely Coupling Services  Each and every micro-service is independent of the others. This loosely coupling architecture reduced the dependencies between the services.
  • 11. © 2008 Haim Michael 20150805 REStful Web Services  Representational state transfer (REST) is a software architectural style that dominates the World Wide Web.  REST emphasizes the scalability of interactions between components, uniform interfaces, independent deployment of components, and the creation of a layered architecture to facilitate caching components to reduce user-perceived latency, enforce security, and encapsulate legacy systems.
  • 12. © 2008 Haim Michael 20150805 REStful Web Services  REST has been employed throughout the software industry and is a widely accepted set of guidelines for creating stateless, reliable web APIs.  Web APIs that obey the REST constraints is informally described as RESTful.
  • 13. © 2008 Haim Michael 20150805 REStful Web Services  RESTful web APIs are typically loosely based on HTTP methods to access resources via URL-encoded parameters and the use of JSON or XML to transmit data.
  • 14. © 2008 Haim Michael 20150805 REStful Web Services This image was taken from https://en.wikipedia.org/wiki/Representational_state_transfer
  • 15. © 2008 Haim Michael 20150805 The postman Platform  Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration.  We can download the Postman application and use it for checking web APIs we want to use. https://postman.com
  • 16. © 2008 Haim Michael 20150805 The postman Platform
  • 17. © 2008 Haim Michael 20150805 The curl Utility  The curl utility is a command line tool and library for transferring data with URLs. https://curl.se
  • 18. © 2008 Haim Michael 20150805 The curl Utility
  • 19. © 2008 Haim Michael 20150805 The grpc Framework  gRPC is a modern open source high performance Remote Procedure Call (RPC) framework.  This framework allows us to connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication.
  • 20. © 2008 Haim Michael 20150805 The grpc Framework  This framework is also relevant in last mile of distributed computing. We can use gRPC for connecting devices, mobile applications and browsers to backend services. https://grpc.io
  • 21. © 2008 Haim Michael 20150805 The grpc Framework
  • 23. 01/03/23 © Abelski eLearning 23 Database Per Service  Most services need to persist data, and they usually use a database for doing so (e.g. invoices service stores information about invoices we issue, customers service stores information about customers, etc.).  The Services must be loosely coupled in order to allow us to develop, deploy and scale them independently. The Problem
  • 24. 01/03/23 © Abelski eLearning 24 Database Per Service  There are many cases in which there is a need to query data managed by multiple micro services.  Different micro services might have different requirements, which might lead to the use of relational databases in some of the cases, and the use of no-sql databases in others. The Problem
  • 25. 01/03/23 © Abelski eLearning 25 Database Per Service  The solution for these problems might be having a separated persistent data for each and every micro service, and have a separated API (for each and every micro service), that uses that persist data only.  We can allocate private tables per service, we can allocate schema per service, and we can allocate a separated database. The Solution
  • 26. 01/03/23 © Abelski eLearning 26 Database Per Service  Implementing this pattern ensures that the services are loosely coupled. Changes to one service’s database won't cause impact any other services.  Each and every service can use the type of database that is best suited to its needs. Consequences
  • 27. 01/03/23 © Abelski eLearning 27 Shared Database  Microservices might need to implement ACID (Atomicity, Consistency, Isolation, and Durability) transactions. The Problem
  • 28. 01/03/23 © Abelski eLearning 28 Shared Database  We can share a single database between different micro services in order to allow those micro services to implement ACID transactions. The Solution
  • 29. 01/03/23 © Abelski eLearning 29 Shared Database  The developers can easily implement ACID transactions when working with a single database. The single database is simpler to handle.  The development of the entire server side might be slower due to the need to coordinate between different developers that work on different micro services every schema change. The coupling between the micro services increases. Consequences
  • 30. 01/03/23 © Abelski eLearning 30 Shared Database  When the server side is up and running the increased coupling between the micro services might damage the performance of our server side.  Single database for multiple microservices might be not the optimal one for some of the microservices. Consequences
  • 32. 01/03/23 © Abelski eLearning 32 Message Queue Pattern  When implementing the micro services architecture, we might have micro services that need to communicate with each other. This communication needs to be asynchronous in order to keep the micro services loosely coupled. The Problem
  • 33. 01/03/23 © Abelski eLearning 33 Message Queue Pattern  The solution would be to implement a message queue component that allows communication between processes or between threads in the same process. The Solution Image Credit to AWS
  • 34. 01/03/23 © Abelski eLearning 34 Message Queue Pattern  The message queues provide an asynchronous communication protocol in which the sender and receiver don't need to interact at the same time. The messages are held in a queue until the recipient retrieves them. The Solution
  • 35. 01/03/23 © Abelski eLearning 35 Message Queue Pattern  When implementing the micro services architecture, this pattern allows multiple micro services to communicate with each other asynchronously. The Consequences