SlideShare a Scribd company logo
1 of 20
MICROSERVICES ARCHITECTURE
PRESENTED BY: K P VERMA
INTRODUCTION
• Microservices is a architecture in which a large application is split up into a set of
smaller services.
• Each service runs in its own process and communicates with other processes by
using protocols like HTTP/HTTPS, WebSocket, or Advanced Message Queuing
Protocol (AMQP).
• Each microservice implements a specific, end-to-end domain or business
capability within a certain context boundary.
• Each microservice must be developed autonomously and must be independently
deployable. Finally, each microservice should own its related domain data model
and domain logic.
• Microservices can be based on different data storage technologies (SQL, NoSQL)
and different programming languages.
CHARACTERISTICS OF MICROSERVICES
• They're small, independent, scalable independently and loosely coupled.
• Each microservice has a separate code base that a small development team can
manage.
• They're deployed independently. A team can update an existing microservice without
rebuilding and redeploying the entire application.
• They persist their data or the external state in their respective databases. Unlike in a
monolithic architecture, microservices don't share databases.
• They communicate with each other by using well-defined APIs. Internal implementation
details of each service are hidden from other services.
• They support polyglot programming. For example, the microservices that make up a
web application don't need to share the same technology stack, libraries, or
frameworks.
MONOLITHIC ARCHITECTURE
• A monolithic architecture is a traditional model of a software program, which is built as a
unified unit that is self-contained and independent from other applications.
• Monolithic Architectures serve as a Large-Scale system, this can make things difficult. They
can be cumbersome to work on when it comes to adding new features, implementing
changes to existing functionality, or even removing some unnecessary functionality.
• This architecture is good option for the given below:
• Small scale applications
• There's no need to upgrade technology
• They take less time to hit the market
• Teams are familiar with Monolithic approaches
MONOLITHIC ARCHITECTURE
MICROSERVICES ARCHITECTURE
• Microservices architecture is not a good fit for Small-Scale applications that require
a single technology stack, deployment platform, domain area, etc.
• For a large-scale application, there's almost nothing better than this architecture thus far.
• Microservices architectures is good for:
• Large-scale applications
• Required updates of technology
• Different teams with different technical skills (programming languages, frameworks, etc.)
• If you have various domains to tackle
• Individual database connectivity
MICROSERVICES ARCHITECTURE
MICROSERVICES WORKING PROCESS
MICROSERVICES WORKING PROCESS
• Identity Provider : Manages the identity information and provides authentication services
within a distributed network.
• CDN : A content delivery network to serve static resources for e.g. pages and web content in
a distributed network.
• Static Content : The static resources like pages and web content.
• API Gateway : Serves as client’s entry point. Single point of contact from the client which in
turn returns responses from underlying microservices and sometimes an aggregated
response from multiple underlying microservices.
• Management : This component is responsible for placing services on nodes, identifying
failures, rebalancing services across nodes, and so forth. Typically this component is an off-
the-shelf technology such as Kubernetes, rather than something custom built.
• Service Discovery : Keeps track of services and service addresses and endpoints.
MICROSERVICES VS MONOLITHIC
Aspect Monolithic Architecture Microservices Architecture
Architecture Single-tier architecture Multi-tier architecture
Size Large, all components tightly coupled Small, loosely coupled components
Deployment Deployed as a single unit Individual services can be deployed
independently
DB Connection Single Database connection for all
services
Individual DB for each services
Flexibility Less flexible as all components are
tightly coupled
More flexible as components can be
developed, deployed, and scaled
independently
Communication Communication between
components is faster
Communication may be slower due
to network calls
MICROSERVICES VS MONOLITHIC
Aspect Monolithic Architecture Microservices Architecture
Scalability Horizontal scaling can be
challenging
Easier to scale horizontally
Technology Limited technology choices Freedom to choose the best
technology for each service
Fault Tolerance Entire application may fail if a
part fails
Individual services can fail
without affecting others
Real Example Shopify Netflix
DOCKER
DOCKER
• Docker is an open-source-platform that can use to automate the deployment of applications
as portable, self-sufficient containers that can run in the cloud or on-premises.
• Docker is also the company that promotes and evolves this technology. Docker as an
organization works in collaboration with cloud, Linux, and Windows vendors, including
Microsoft.
• Docker generally provides a container environment, in which any application can be hosted.
Docker Image
• An image is a static representation of the app or service and its configuration and
dependencies.
• The image, when it runs, becomes the container. The container is the in-memory instance of
an image.
• A container image is immutable. After you build an image, the image can't be changed.
DOCKER
• Because you can't change an image, if you need to make changes to the app or service and
its dependencies, create a new image.
• This feature guarantees that the image you use in production is the same image that's used
in development and testing.
Dockerfile
• A Dockerfile is a text file that contains instructions for how to build a Docker image.
• Dockerfiles are written in a minimal scripting language that's designed for building and
configuring images.
• Dockerfiles also document the operations that are required to build an image, starting with
a base image.
ORCHESTRATOR
• An orchestrator is an application management tool that helps you manage, scale, and
maintain a containerized application.
• Orchestrator tracks and logs everything every robot does, along with everything people do
with robots, so you can keep compliant and secure.
• Since, each microservice owns its model and data. The microservice is autonomous from a
development and deployment point of view. These kinds of systems are complex to scale
out and manage. Therefore, to have a production-ready and scalable multi-container
application, you absolutely need an orchestrator.
INTERVIEW QUESTIONS
MONOLITHIC, SOA & MICROSERVICES
• Monolithic Architecture: It is "like a big container" where all the software components of an
application are bundled together tightly. It is usually built as one large system and is one
code-base.
• SOA (Service-Oriented Architecture): It is a group of services interacting or communicating
with each other. Depending on the nature of the communication, it can be simple data
exchange or it could involve several services coordinating some activity.
• Microservice Architecture: It involves structuring an application in the form of a cluster of
small, autonomous services modeled around a business domain. The functional modules can
be deployed independently, are scalable, are aimed at achieving specific business goals, and
communicate with each other over standard protocols.
COUPLING & COHESION
• Coupling refers to the degree of interdependence between software modules. High coupling
means that modules are closely connected and changes in one module may affect other
modules. Low coupling means that modules are independent, and changes in one module
have little impact on other modules.
• Cohesion refers to the degree to which elements within a module work together to fulfill a
single, well-defined purpose. High cohesion means that elements are closely related and
focused on a single purpose, while low cohesion means that elements are loosely related
and serve multiple purposes.
• Both coupling and cohesion are important factors in determining the maintainability,
scalability, and reliability of a software system. High coupling and low cohesion can make a
system difficult to change and test, while low coupling and high cohesion make a system
easier to maintain and improve.
VM VS DOCKER
• VMs
• Virtual machines (VMs) provide virtualization of an entire machine (server).
• A virtual machine emulates the hardware components of a physical machine, such as the
CPU, memory, network interface card, USB controllers, and sound cards.
• You can run a guest operating system and multiple applications in the virtual environment.
• Docker
• Docker lets you run an application on any operating system. It uses isolated user-space
instances known as containers.
• Docker containers have their own file system, dependency structure, processes, and
network capabilities.
• The application has everything it requires inside the container and can run anywhere.
Docker container technology uses the underlying host operating system kernel resources
directly.
THANK YOU FOR THE ATTENTION 😊
HAPPY CODING !!!
Sample Source Code for Microservices

More Related Content

Similar to Microservices, Docker deploy and Microservices source code in C#

MICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMohammedShahid562503
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Lightbend
 
Exploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscapeExploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscapeAlex Thissen
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBAMichael Sukachev
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...AFAS Software
 
Microservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design PatternMicroservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design Patternjeetendra mandal
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesRick Hightower
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices M A Hossain Tonu
 
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...jeetendra mandal
 
Understanding docker ecosystem and vulnerabilities points
Understanding docker ecosystem and vulnerabilities pointsUnderstanding docker ecosystem and vulnerabilities points
Understanding docker ecosystem and vulnerabilities pointsAbdul Khan
 
Cloud Computing Introduction
Cloud Computing IntroductionCloud Computing Introduction
Cloud Computing IntroductionVivek Shelke
 
Multi-Containers Orchestration with Live Migration and High-Availability for ...
Multi-Containers Orchestration with Live Migration and High-Availability for ...Multi-Containers Orchestration with Live Migration and High-Availability for ...
Multi-Containers Orchestration with Live Migration and High-Availability for ...Jelastic Multi-Cloud PaaS
 
Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Ken Owens
 
Kubernetes solutions
Kubernetes solutionsKubernetes solutions
Kubernetes solutionsEric Cattoir
 
Mahika cloud services
Mahika cloud servicesMahika cloud services
Mahika cloud servicesSomnath Sen
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing MicroservicesDavid Chou
 

Similar to Microservices, Docker deploy and Microservices source code in C# (20)

MICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptx
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
 
Exploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscapeExploring microservices in a Microsoft landscape
Exploring microservices in a Microsoft landscape
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBA
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
 
Microservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design PatternMicroservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design Pattern
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
 
Understanding docker ecosystem and vulnerabilities points
Understanding docker ecosystem and vulnerabilities pointsUnderstanding docker ecosystem and vulnerabilities points
Understanding docker ecosystem and vulnerabilities points
 
Cloud Computing Introduction
Cloud Computing IntroductionCloud Computing Introduction
Cloud Computing Introduction
 
Multi-Containers Orchestration with Live Migration and High-Availability for ...
Multi-Containers Orchestration with Live Migration and High-Availability for ...Multi-Containers Orchestration with Live Migration and High-Availability for ...
Multi-Containers Orchestration with Live Migration and High-Availability for ...
 
Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015
 
Architecting for Scale
Architecting for ScaleArchitecting for Scale
Architecting for Scale
 
Cloud Networking
Cloud NetworkingCloud Networking
Cloud Networking
 
Kubernetes solutions
Kubernetes solutionsKubernetes solutions
Kubernetes solutions
 
Mahika cloud services
Mahika cloud servicesMahika cloud services
Mahika cloud services
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
 
Ism
IsmIsm
Ism
 

Recently uploaded

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 

Recently uploaded (20)

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 

Microservices, Docker deploy and Microservices source code in C#

  • 2. INTRODUCTION • Microservices is a architecture in which a large application is split up into a set of smaller services. • Each service runs in its own process and communicates with other processes by using protocols like HTTP/HTTPS, WebSocket, or Advanced Message Queuing Protocol (AMQP). • Each microservice implements a specific, end-to-end domain or business capability within a certain context boundary. • Each microservice must be developed autonomously and must be independently deployable. Finally, each microservice should own its related domain data model and domain logic. • Microservices can be based on different data storage technologies (SQL, NoSQL) and different programming languages.
  • 3. CHARACTERISTICS OF MICROSERVICES • They're small, independent, scalable independently and loosely coupled. • Each microservice has a separate code base that a small development team can manage. • They're deployed independently. A team can update an existing microservice without rebuilding and redeploying the entire application. • They persist their data or the external state in their respective databases. Unlike in a monolithic architecture, microservices don't share databases. • They communicate with each other by using well-defined APIs. Internal implementation details of each service are hidden from other services. • They support polyglot programming. For example, the microservices that make up a web application don't need to share the same technology stack, libraries, or frameworks.
  • 4. MONOLITHIC ARCHITECTURE • A monolithic architecture is a traditional model of a software program, which is built as a unified unit that is self-contained and independent from other applications. • Monolithic Architectures serve as a Large-Scale system, this can make things difficult. They can be cumbersome to work on when it comes to adding new features, implementing changes to existing functionality, or even removing some unnecessary functionality. • This architecture is good option for the given below: • Small scale applications • There's no need to upgrade technology • They take less time to hit the market • Teams are familiar with Monolithic approaches
  • 6. MICROSERVICES ARCHITECTURE • Microservices architecture is not a good fit for Small-Scale applications that require a single technology stack, deployment platform, domain area, etc. • For a large-scale application, there's almost nothing better than this architecture thus far. • Microservices architectures is good for: • Large-scale applications • Required updates of technology • Different teams with different technical skills (programming languages, frameworks, etc.) • If you have various domains to tackle • Individual database connectivity
  • 9. MICROSERVICES WORKING PROCESS • Identity Provider : Manages the identity information and provides authentication services within a distributed network. • CDN : A content delivery network to serve static resources for e.g. pages and web content in a distributed network. • Static Content : The static resources like pages and web content. • API Gateway : Serves as client’s entry point. Single point of contact from the client which in turn returns responses from underlying microservices and sometimes an aggregated response from multiple underlying microservices. • Management : This component is responsible for placing services on nodes, identifying failures, rebalancing services across nodes, and so forth. Typically this component is an off- the-shelf technology such as Kubernetes, rather than something custom built. • Service Discovery : Keeps track of services and service addresses and endpoints.
  • 10. MICROSERVICES VS MONOLITHIC Aspect Monolithic Architecture Microservices Architecture Architecture Single-tier architecture Multi-tier architecture Size Large, all components tightly coupled Small, loosely coupled components Deployment Deployed as a single unit Individual services can be deployed independently DB Connection Single Database connection for all services Individual DB for each services Flexibility Less flexible as all components are tightly coupled More flexible as components can be developed, deployed, and scaled independently Communication Communication between components is faster Communication may be slower due to network calls
  • 11. MICROSERVICES VS MONOLITHIC Aspect Monolithic Architecture Microservices Architecture Scalability Horizontal scaling can be challenging Easier to scale horizontally Technology Limited technology choices Freedom to choose the best technology for each service Fault Tolerance Entire application may fail if a part fails Individual services can fail without affecting others Real Example Shopify Netflix
  • 13. DOCKER • Docker is an open-source-platform that can use to automate the deployment of applications as portable, self-sufficient containers that can run in the cloud or on-premises. • Docker is also the company that promotes and evolves this technology. Docker as an organization works in collaboration with cloud, Linux, and Windows vendors, including Microsoft. • Docker generally provides a container environment, in which any application can be hosted. Docker Image • An image is a static representation of the app or service and its configuration and dependencies. • The image, when it runs, becomes the container. The container is the in-memory instance of an image. • A container image is immutable. After you build an image, the image can't be changed.
  • 14. DOCKER • Because you can't change an image, if you need to make changes to the app or service and its dependencies, create a new image. • This feature guarantees that the image you use in production is the same image that's used in development and testing. Dockerfile • A Dockerfile is a text file that contains instructions for how to build a Docker image. • Dockerfiles are written in a minimal scripting language that's designed for building and configuring images. • Dockerfiles also document the operations that are required to build an image, starting with a base image.
  • 15. ORCHESTRATOR • An orchestrator is an application management tool that helps you manage, scale, and maintain a containerized application. • Orchestrator tracks and logs everything every robot does, along with everything people do with robots, so you can keep compliant and secure. • Since, each microservice owns its model and data. The microservice is autonomous from a development and deployment point of view. These kinds of systems are complex to scale out and manage. Therefore, to have a production-ready and scalable multi-container application, you absolutely need an orchestrator.
  • 17. MONOLITHIC, SOA & MICROSERVICES • Monolithic Architecture: It is "like a big container" where all the software components of an application are bundled together tightly. It is usually built as one large system and is one code-base. • SOA (Service-Oriented Architecture): It is a group of services interacting or communicating with each other. Depending on the nature of the communication, it can be simple data exchange or it could involve several services coordinating some activity. • Microservice Architecture: It involves structuring an application in the form of a cluster of small, autonomous services modeled around a business domain. The functional modules can be deployed independently, are scalable, are aimed at achieving specific business goals, and communicate with each other over standard protocols.
  • 18. COUPLING & COHESION • Coupling refers to the degree of interdependence between software modules. High coupling means that modules are closely connected and changes in one module may affect other modules. Low coupling means that modules are independent, and changes in one module have little impact on other modules. • Cohesion refers to the degree to which elements within a module work together to fulfill a single, well-defined purpose. High cohesion means that elements are closely related and focused on a single purpose, while low cohesion means that elements are loosely related and serve multiple purposes. • Both coupling and cohesion are important factors in determining the maintainability, scalability, and reliability of a software system. High coupling and low cohesion can make a system difficult to change and test, while low coupling and high cohesion make a system easier to maintain and improve.
  • 19. VM VS DOCKER • VMs • Virtual machines (VMs) provide virtualization of an entire machine (server). • A virtual machine emulates the hardware components of a physical machine, such as the CPU, memory, network interface card, USB controllers, and sound cards. • You can run a guest operating system and multiple applications in the virtual environment. • Docker • Docker lets you run an application on any operating system. It uses isolated user-space instances known as containers. • Docker containers have their own file system, dependency structure, processes, and network capabilities. • The application has everything it requires inside the container and can run anywhere. Docker container technology uses the underlying host operating system kernel resources directly.
  • 20. THANK YOU FOR THE ATTENTION 😊 HAPPY CODING !!! Sample Source Code for Microservices