SlideShare a Scribd company logo
1 of 42
SERVICES -
ARCHITECTURE
Governance Team
10 Mar 17
• Traditional Approach
• Issues in Traditional
• Define MS
• Characteristics of
MSA
• Service Discovery
• Communication /
Integration in MS
– MSA
• Data Management in
MS
• Deployment Strategy
• Migration to MSA
• PROS & Cons of MSA
• Best Practices of MSA
• Demo
• QA
– MSA
Monolith – Architecture
• Monolithic means
composed all in one
piece. Monolithic
software is designed to
be self-contained.
• Components of the
program are
interconnected and
interdependent (tightly
coupled)
Monolith Characteristics
• Extensibility is bit difficult since the code base
is very huge
• Slow down the development and takes more
time to shipping the new features
• CD – Impossible Task
• Difficult to scale
• Application Reliability
• Long Term commitment in Technology Stack
Micro Service Architecture-MSA
• Small, and Focused on Doing One Thing Well
• Software applications as a suite of Independently
deployable, small, modular services in which each
service runs a unique process and communicates
through a well-defined, lightweight mechanism to
serve a business goal
• Large functionality or business capability is
decomposed into set of small services
MSA – Characteristics
• Componentization via Services
• Organized around Business
Capabilities
• Decentralized Governance
• Products not Projects
• Decentralized Data Management
• Infrastructure Automation
• Design for failure
• Evolutionary Design
(From Martin Fowler’s Link)
MSA – Interaction Style
• Services are interacted using
Inter process communication (IPV)
Mechanism.
IPC :
One to one /One to Many
Sync/Async
MSA – Interaction Style
IPC Style One to One One to Many
Sync Request /Response
Async Notification Publish /Subscribe
Request/Async Response Publish/Async Response
MSA – Interaction Style Sample
MSA – Service Discovery
MSA – Service Discovery
• Client Side Discovery Pattern
• Server Side Discovery Pattern
MSA – Client Side Service Discovery
MSA – Server Side Service Discovery
MSA – Data Management
• Challenge in MSA Data Management
– Since MSA handling the different DB with different
services the following challenges we are facing in the
Data management Context
• Transaction Management-2PC/Distributed Transaction
• Retrieve the Data from Multiple DB
Event Driven Architecture
• You can use the events to implements Business
transaction that span of Multiple Services
• Its not ACID Transaction instead its BASE Model
• Its guarantees such as eventually consistency
Event Driven Architecture-
• Steps to Perform the Transaction in EDA
– Update the Business entity and publish the event from
Service1
– Publish the events into Message Broker
– Service 2 consume the event , update the business entity
based on the event
– Service 2 publish another event in the Message Broker
– Service 1 consume the event and update the status in
their DB
Event Driven Architecture-Flow
Event Driven Architecture-Flow
Materialized View :
Read the data from Multiple DB
Data is always eventually consistent.
Atomicity in MSA
Achieving Atomicity in following ways
 Publishing event using local transaction
 Mining a Database Transaction log
 Event Sourcing
 DB Link/Trigger
Deployment Strategy
MSA Deployment Patterns:
Multiple Service Instance /Host Pattern
Service Instance /Host Pattern
Service Instance /VM
Service Instance/Container
Serverless Deployment Pattern
Migration Strategy
Following strategy for Monolith  MSA Migration
• Stop Digging code –
• No further extension in the Monolith instead create the separate
service for those new requirement
• Using glue code for internal integration between service and
monolith
• Separate the Frontend and Backend layer
• Separate the Presentation layer with Business /Data Layer
• Communication between those layers through IPC
• Extract the Module from Monolith
• Extract the key module from monolith and convert into service
MSA Design Pattern
Aggregator DP
Proxy DP
Shared Data DP
ASync Message DP
Chain DP
Branch DP
API Gateway
PROS -MSA
• Independent Deployment and Development
• Code and Team size not grow rapidly
• Define the services based on Business capability
• Reliability
• Easy to Scale
• No long-term commitment to technology stack
Cons -MSA
• Complexity in terms of
Architect/Testing/Deployment
• Increasing number of services will cause the
Memory /Resource/ Maintenance issue
• Communication between the services bit complex
• Duplication effort
Demo – Technology
• Java 8
• Spring Boot
• Spring Cloud
• Postgresql
• Cloud Foundry
• Eureka
• Maven
Demo
• Restful Service
• Restful with DB
• IPC Demo
QUESTIONS?
APPENDIX
Handling Partial Failure
• Network Timeout
• Limiting number of outstanding request- Throttling
• Circuit Broker Pattern
• Provide the Fallback –
– Perform fall back logic when a request fails. For example,
return cached data or a default value, such as an empty
set of recommendations
Message Channels
• Point 2 Point
– delivers a message to exactly one of the consumers that
are reading from the channel
– IPC – One –to – One
• Publish – Subscribe
– delivers each message to all of the attached consumers.
– IPC – One –to-Many
HATEOAS
MSA-Chassis
• Its framework, which handles cross-cutting
concerns like logging/Security/Health
check/Externalize the configuration file,Service
registration/service discovery and etc
Service Registry
• Key Part of Service Discovery
• Its DB containing the network location of
services instance
• Tools /API used to register the services in
Registry
• Ex:
– Etcd
– Consul
– Apache ZooKeeper
Service Registration
• Service instances must be registered with and
unregistered from the service registry
• Two ways
– Self Registration
– Third Party Tool Registration
ACID
• Atomicity –
– Changes are made atomically
• Consistency –
– The state of the database is always consistent
• Isolation –
– Even though transactions are executed
concurrently, it appears they are executed serially
• Durable –
– Once a transaction has committed, it is not undone
BASE
Polyglot Persistence
• MSA uses the mix of Database like No
SQL/RBDMS and etc to store/query the
different kind of data
A|B Testing
Single Responsibility Principle
Demo GitHub
– https://github.com/parameshnon

More Related Content

What's hot

Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer
confluent
 
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Continuent
 
Building High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in KafkaBuilding High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in Kafka
confluent
 

What's hot (20)

Redgate Database Devops Demo webinar - Visual Studio Team Services - 21st Fe...
Redgate Database Devops Demo webinar  - Visual Studio Team Services - 21st Fe...Redgate Database Devops Demo webinar  - Visual Studio Team Services - 21st Fe...
Redgate Database Devops Demo webinar - Visual Studio Team Services - 21st Fe...
 
Running Kafka for Maximum Pain
Running Kafka for Maximum PainRunning Kafka for Maximum Pain
Running Kafka for Maximum Pain
 
A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlotte
 
Kafka at scale facebook israel
Kafka at scale   facebook israelKafka at scale   facebook israel
Kafka at scale facebook israel
 
URP? Excuse You! The Three Metrics You Have to Know
URP? Excuse You! The Three Metrics You Have to Know URP? Excuse You! The Three Metrics You Have to Know
URP? Excuse You! The Three Metrics You Have to Know
 
Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer
 
URP? Excuse You! The Three Kafka Metrics You Need to Know
URP? Excuse You! The Three Kafka Metrics You Need to KnowURP? Excuse You! The Three Kafka Metrics You Need to Know
URP? Excuse You! The Three Kafka Metrics You Need to Know
 
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache KafkaBuilding Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
 
Cloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessCloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful Serverless
 
Designing microservices
Designing microservicesDesigning microservices
Designing microservices
 
Kafka Summit SF 2017 - Worldwide Scalable and Resilient Messaging Services wi...
Kafka Summit SF 2017 - Worldwide Scalable and Resilient Messaging Services wi...Kafka Summit SF 2017 - Worldwide Scalable and Resilient Messaging Services wi...
Kafka Summit SF 2017 - Worldwide Scalable and Resilient Messaging Services wi...
 
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
 
Por trás da infraestrutura do Cloud - Campus Party 2014
Por trás da infraestrutura do Cloud - Campus Party 2014Por trás da infraestrutura do Cloud - Campus Party 2014
Por trás da infraestrutura do Cloud - Campus Party 2014
 
Building High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in KafkaBuilding High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in Kafka
 
Webinar | Better Together: Apache Cassandra and Apache Kafka
Webinar  |  Better Together: Apache Cassandra and Apache KafkaWebinar  |  Better Together: Apache Cassandra and Apache Kafka
Webinar | Better Together: Apache Cassandra and Apache Kafka
 
Salesforce enabling real time scenarios at scale using kafka
Salesforce enabling real time scenarios at scale using kafkaSalesforce enabling real time scenarios at scale using kafka
Salesforce enabling real time scenarios at scale using kafka
 
A closer look to locaweb IaaS
A closer look to locaweb IaaSA closer look to locaweb IaaS
A closer look to locaweb IaaS
 
Integrating Hybrid Cloud Database-as-a-Service with Cloud Foundry’s Service​ ...
Integrating Hybrid Cloud Database-as-a-Service with Cloud Foundry’s Service​ ...Integrating Hybrid Cloud Database-as-a-Service with Cloud Foundry’s Service​ ...
Integrating Hybrid Cloud Database-as-a-Service with Cloud Foundry’s Service​ ...
 
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scaleHow LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
How LinkedIn uses memcached, a spoonful of SOA, and a sprinkle of SQL to scale
 

Viewers also liked

How To Add Power Point Presentations To Blogger
How To Add  Power Point Presentations To BloggerHow To Add  Power Point Presentations To Blogger
How To Add Power Point Presentations To Blogger
guest66ae43
 

Viewers also liked (6)

Big data Hadoop
Big data  Hadoop   Big data  Hadoop
Big data Hadoop
 
Herramientas de Microsoft para el Científicos de Datos
Herramientas de Microsoft para el Científicos de DatosHerramientas de Microsoft para el Científicos de Datos
Herramientas de Microsoft para el Científicos de Datos
 
El Valor de construir First Party Data Orgánico a través del Ecosistema Digit...
El Valor de construir First Party Data Orgánico a través del Ecosistema Digit...El Valor de construir First Party Data Orgánico a través del Ecosistema Digit...
El Valor de construir First Party Data Orgánico a través del Ecosistema Digit...
 
How To Add Power Point Presentations To Blogger
How To Add  Power Point Presentations To BloggerHow To Add  Power Point Presentations To Blogger
How To Add Power Point Presentations To Blogger
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
Plan Estratégico e Integral de Analítica Digital
Plan Estratégico e Integral de Analítica DigitalPlan Estratégico e Integral de Analítica Digital
Plan Estratégico e Integral de Analítica Digital
 

Similar to Micro service architecture

gkkCloudtechnologyassociate(cta)day 2
gkkCloudtechnologyassociate(cta)day 2gkkCloudtechnologyassociate(cta)day 2
gkkCloudtechnologyassociate(cta)day 2
Anne Starr
 

Similar to Micro service architecture (20)

Pros & Cons of Microservices Architecture
Pros & Cons of Microservices ArchitecturePros & Cons of Microservices Architecture
Pros & Cons of Microservices Architecture
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
WSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice ArchitectureWSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice Architecture
 
Building cloud native data microservice
Building cloud native data microserviceBuilding cloud native data microservice
Building cloud native data microservice
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud Infrastructure
 
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
 
Enterprise Data Integration for Microsoft Dynamics CRM
Enterprise Data Integration for Microsoft Dynamics CRMEnterprise Data Integration for Microsoft Dynamics CRM
Enterprise Data Integration for Microsoft Dynamics CRM
 
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
 
gkkCloudtechnologyassociate(cta)day 2
gkkCloudtechnologyassociate(cta)day 2gkkCloudtechnologyassociate(cta)day 2
gkkCloudtechnologyassociate(cta)day 2
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: The Role of Enterprise Integration in Digital TransformationWSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
 
The Role of Enterprise Integration in Digital Transformation
The Role of Enterprise Integration in Digital TransformationThe Role of Enterprise Integration in Digital Transformation
The Role of Enterprise Integration in Digital Transformation
 
Microservice Architecture Patterns, by Richard Langlois P. Eng.
Microservice Architecture Patterns, by Richard Langlois P. Eng.Microservice Architecture Patterns, by Richard Langlois P. Eng.
Microservice Architecture Patterns, by Richard Langlois P. Eng.
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Micro service architecture

  • 2. • Traditional Approach • Issues in Traditional • Define MS • Characteristics of MSA • Service Discovery • Communication / Integration in MS – MSA
  • 3. • Data Management in MS • Deployment Strategy • Migration to MSA • PROS & Cons of MSA • Best Practices of MSA • Demo • QA – MSA
  • 4. Monolith – Architecture • Monolithic means composed all in one piece. Monolithic software is designed to be self-contained. • Components of the program are interconnected and interdependent (tightly coupled)
  • 5. Monolith Characteristics • Extensibility is bit difficult since the code base is very huge • Slow down the development and takes more time to shipping the new features • CD – Impossible Task • Difficult to scale • Application Reliability • Long Term commitment in Technology Stack
  • 6. Micro Service Architecture-MSA • Small, and Focused on Doing One Thing Well • Software applications as a suite of Independently deployable, small, modular services in which each service runs a unique process and communicates through a well-defined, lightweight mechanism to serve a business goal • Large functionality or business capability is decomposed into set of small services
  • 7. MSA – Characteristics • Componentization via Services • Organized around Business Capabilities • Decentralized Governance • Products not Projects • Decentralized Data Management • Infrastructure Automation • Design for failure • Evolutionary Design (From Martin Fowler’s Link)
  • 8. MSA – Interaction Style • Services are interacted using Inter process communication (IPV) Mechanism. IPC : One to one /One to Many Sync/Async
  • 9. MSA – Interaction Style IPC Style One to One One to Many Sync Request /Response Async Notification Publish /Subscribe Request/Async Response Publish/Async Response
  • 10. MSA – Interaction Style Sample
  • 11. MSA – Service Discovery
  • 12. MSA – Service Discovery • Client Side Discovery Pattern • Server Side Discovery Pattern
  • 13. MSA – Client Side Service Discovery
  • 14. MSA – Server Side Service Discovery
  • 15. MSA – Data Management • Challenge in MSA Data Management – Since MSA handling the different DB with different services the following challenges we are facing in the Data management Context • Transaction Management-2PC/Distributed Transaction • Retrieve the Data from Multiple DB
  • 16. Event Driven Architecture • You can use the events to implements Business transaction that span of Multiple Services • Its not ACID Transaction instead its BASE Model • Its guarantees such as eventually consistency
  • 17. Event Driven Architecture- • Steps to Perform the Transaction in EDA – Update the Business entity and publish the event from Service1 – Publish the events into Message Broker – Service 2 consume the event , update the business entity based on the event – Service 2 publish another event in the Message Broker – Service 1 consume the event and update the status in their DB
  • 19. Event Driven Architecture-Flow Materialized View : Read the data from Multiple DB Data is always eventually consistent.
  • 20. Atomicity in MSA Achieving Atomicity in following ways  Publishing event using local transaction  Mining a Database Transaction log  Event Sourcing  DB Link/Trigger
  • 21. Deployment Strategy MSA Deployment Patterns: Multiple Service Instance /Host Pattern Service Instance /Host Pattern Service Instance /VM Service Instance/Container Serverless Deployment Pattern
  • 22. Migration Strategy Following strategy for Monolith  MSA Migration • Stop Digging code – • No further extension in the Monolith instead create the separate service for those new requirement • Using glue code for internal integration between service and monolith • Separate the Frontend and Backend layer • Separate the Presentation layer with Business /Data Layer • Communication between those layers through IPC • Extract the Module from Monolith • Extract the key module from monolith and convert into service
  • 23. MSA Design Pattern Aggregator DP Proxy DP Shared Data DP ASync Message DP Chain DP Branch DP
  • 25. PROS -MSA • Independent Deployment and Development • Code and Team size not grow rapidly • Define the services based on Business capability • Reliability • Easy to Scale • No long-term commitment to technology stack
  • 26. Cons -MSA • Complexity in terms of Architect/Testing/Deployment • Increasing number of services will cause the Memory /Resource/ Maintenance issue • Communication between the services bit complex • Duplication effort
  • 27. Demo – Technology • Java 8 • Spring Boot • Spring Cloud • Postgresql • Cloud Foundry • Eureka • Maven
  • 28. Demo • Restful Service • Restful with DB • IPC Demo
  • 31. Handling Partial Failure • Network Timeout • Limiting number of outstanding request- Throttling • Circuit Broker Pattern • Provide the Fallback – – Perform fall back logic when a request fails. For example, return cached data or a default value, such as an empty set of recommendations
  • 32. Message Channels • Point 2 Point – delivers a message to exactly one of the consumers that are reading from the channel – IPC – One –to – One • Publish – Subscribe – delivers each message to all of the attached consumers. – IPC – One –to-Many
  • 34. MSA-Chassis • Its framework, which handles cross-cutting concerns like logging/Security/Health check/Externalize the configuration file,Service registration/service discovery and etc
  • 35. Service Registry • Key Part of Service Discovery • Its DB containing the network location of services instance • Tools /API used to register the services in Registry • Ex: – Etcd – Consul – Apache ZooKeeper
  • 36. Service Registration • Service instances must be registered with and unregistered from the service registry • Two ways – Self Registration – Third Party Tool Registration
  • 37. ACID • Atomicity – – Changes are made atomically • Consistency – – The state of the database is always consistent • Isolation – – Even though transactions are executed concurrently, it appears they are executed serially • Durable – – Once a transaction has committed, it is not undone
  • 38. BASE
  • 39. Polyglot Persistence • MSA uses the mix of Database like No SQL/RBDMS and etc to store/query the different kind of data

Editor's Notes

  1. This template can be used as a starter file for presenting training materials in a group setting. Sections Right-click on a slide to add sections. Sections can help to organize your slides or facilitate collaboration between multiple authors. Notes Use the Notes section for delivery notes or to provide additional details for the audience. View these notes in Presentation View during your presentation. Keep in mind the font size (important for accessibility, visibility, videotaping, and online production) Coordinated colors Pay particular attention to the graphs, charts, and text boxes. Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale. Graphics, tables, and graphs Keep it simple: If possible, use consistent, non-distracting styles and colors. Label all graphs and tables.
  2. What will the audience be able to do after this training is complete? Briefly describe each objective how the audience will benefit from this presentation.
  3. Micro Service Architecture
  4. Microsoft Confidential
  5. Microsoft Confidential