SlideShare a Scribd company logo
Microservice 微服務
Presenter:CHEN,YOU-SHENG (Shane)
111/04/29 Fri
CONTENTS
1. Known uses
2. Key characteristics of a service
3. The structure of a service
4. Benefits and drawbacks
5. Microservice canvas
6. Forces of a service
/13
2
Known uses
A very popular video streaming service
Responsible for up to 30% of Internet traffic
A large scale, service-oriented architecture
Handle over a billion calls per day to their video
streaming API from over 800 different kinds of
devices
Each API call fans out to an average of six calls to
backend services
相片(標題) CC BY-SA 授權
/13
3
1
Netflix proprietary server
(Source by broadband analytics firm Sandvine)
Known uses
A multinational technology company
Migrated to a service-oriented architecture
consisting of hundreds of backend services
Website application calls 100-150 services to
get the data that used to build a web page
/13
4
2
Amazon S3 data center
相片(標題) CC BY
(Source by Amazon Architecture http://highscalability.com/amazon-architecture )
Known uses
A multinational e-commerce corporation
The application tier consists of multiple
independent applications
 Each application uses X-axis splits and
some applications such as search use Z-
axis splits
 Also applies a combination of X-, Y- and
Z-style scaling to the database tier
/13
5
3
相片 (標題) CC BY-SA 授權
Key characteristics of a service
/13
6
Highly maintainable
and testable
• rapid and frequent
development and
deployment
Loosely coupled
with other services
• without being
impacted by changes
to other services
• without affecting
other services
Independently
deployable
• enables a team to
deploy their service
without having to
coordinate with other
teams
Capable of being
developed by a
small team
• avoiding the high
communication
overhead of large
teams
The structure of a service
/13
7
The core of the service is its business logic, which is surrounded by adapters that communicate with
other services and applications
Operations
A command is an operation
that mutates data;
A query is a command that
retrieves data
Events
A service publishes events
to a message channel
implemented by a message
broker
• operations of other
services
• subscribes to their events
• persists data in the
service’s database
The structure of a service -Example
/13
8
• Let’s imagine that you are building an
e-commerce application
• Services communicate using either
synchronous protocols such as
HTTP/REST or asynchronous protocols
such as AMQP
• Each service has its own database
• Data consistency between services is
maintained using the Saga pattern
Fictitious e-commerce application(checking credit, maintaining inventory
and shipping orders)
The structure of a service -Saga pattern
/13
9
 A saga is a sequence of local transactions
 Each local transaction updates the database and publishes a message or event to
trigger the next local transaction in the saga
 If a local transaction fails then the saga undo the changes that were made by the
preceding local transactions
Benefits and drawbacks
/13
10
Enables the continuous delivery and deployment
• Improved maintainability (easier to change)
• Better testability (faster to test)
• Deployed independently
• Each team can develop, test, deploy and scale their services independently of all of the other teams
Each microservice is relatively small
• Making developers more productive (easier to understand)
• The application starts faster
Improved fault isolation
• Other services will continue to handle requests(if fault)
Eliminates any long-term commitment to a technology stack
Benefits and drawbacks
/13
11
Additional complexity of creating a distributed system
• Implement the inter-service communication mechanism and deal with partial failure
• Cross-multiple services is more difficult
• Testing the interactions is difficult
• Careful coordination between the teams
Deployment complexity
• Complexity of deploying and managing a system comprised of many different
services
Increased memory consumption
Microservice canvas
/13
12
External view
• Name:name of the service Name
• Description:a brief description of the service Description
• Capabilities:the business capabilities implemented by the service
• Service API:the operations implemented by the service and the
domain events published by the service
• Quality attributes:non-functional attributes
• Observability:includes health check endpoint, key metrics
Implementation
• DDD(domain-driven design) subdomain 、Use Case、Resources
Dependencies
• Invokes:the operations, which are implemented by other
services that this service invokes invoke
• Subscribes to:the messages, which includes events, that this
service subscribes to
Examples of the microservice canvas https://github.com/cer/microservice-canvas
(Matt McLarty and Irakli Nadareishvili, 2017)
Domain-Driven Design: Tackling Complexity in the Heart of Software
Forces of a service
/13
13
 New team members must quickly become productive
 The application must be easy to understand and modify
 To practice continuous deployment of the application
 Must run multiple instances of the application on multiple
machines in order to satisfy scalability and availability
requirements
 To take advantage of emerging technologies
(frameworks, programming languages and etc)
Thank you
•專屬伺服器、分流設計 Netflix解決全球驚人流量之道 https://www.cool3c.com/article/104032
•Pattern: Microservice Architecture https://microservices.io/patterns/microservices.html
•What’s a service - part 1? http://chrisrichardson.net/post/microservices/general/2019/02/16/whats-a-service-part-
1.html
•Pattern: Saga https://microservices.io/patterns/data/saga.html
•Node之可擴展性 --- Node的Cluster
https://mark-lin.com/posts/20170605/?msclkid=94b976b0c76011ecb073e53267a36d3c
•The Scale Cube https://microservices.io/articles/scalecube.html
 x: 負載平衡
If there are N copies then each copy handles 1/N of the load
 Y: Y-axis axis scaling splits the application into multiple
Each service is responsible for one or more closely related functions
(using noun / verb to split service )
Resources
•技術棧:它的定義以及構建方式 https://mixpanel.com/zh-hant/topics/what-is-a-technology-
stack/?msclkid=c2b64b17c5da11ecb1084e6a3f038b9b
技術棧也稱解決方案棧、技術基礎結構或數據生態系統,是用於構建和執行某款應用程式的所有技術服務的清單。
•[Domain Driven Design] 簡介和為什麼你需要DDD
https://medium.com/%E7%A7%91%E6%8A%80%E6%96%B0%E6%83%B3/domain-driven-design-
%E7%B0%A1%E4%BB%8B%E5%92%8C%E7%82%BA%E4%BB%80%E9%BA%BC%E4%BD%A0%E9%9C%80%E8%A6%81ddd-
6cf4ceed6088
•Documenting a service using the microservice canvas
https://chrisrichardson.net/post/microservices/general/2019/02/27/microservice-canvas.html
•P13 Microsoft Stock images (royalty-free images)
•PPT template- IT PowerPoint Template https://prezentr.com/templates/it-powerpoint-template/
Resources

More Related Content

Similar to Microservice 微服務

Application-Servers.pdf
Application-Servers.pdfApplication-Servers.pdf
Application-Servers.pdfSamir Paul
 
Client Server Architecture
Client Server ArchitectureClient Server Architecture
Client Server Architecturesuks_87
 
SWsoft Hosting Solutions for SaaS
SWsoft Hosting Solutions for SaaSSWsoft Hosting Solutions for SaaS
SWsoft Hosting Solutions for SaaSwebhostingguy
 
ISTIO Deep Dive
ISTIO Deep DiveISTIO Deep Dive
ISTIO Deep DiveYong Feng
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecturerahmed_sct
 
Ibm cloud forum managing heterogenousclouds_final
Ibm cloud forum managing heterogenousclouds_finalIbm cloud forum managing heterogenousclouds_final
Ibm cloud forum managing heterogenousclouds_finalMauricio Godoy
 
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클Oracle Korea
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioInho Kang
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Apigee | Google Cloud
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application DevelopmentWaveMaker, Inc.
 
Web Based Application for Rent or Sale
Web Based Application for Rent or SaleWeb Based Application for Rent or Sale
Web Based Application for Rent or SaleMike Taylor
 
08 hopex v next service fabric
08 hopex v next   service fabric08 hopex v next   service fabric
08 hopex v next service fabricMichel Bruchet
 
Technology Overview
Technology OverviewTechnology Overview
Technology OverviewLiran Zelkha
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architectureTouraj Ebrahimi
 

Similar to Microservice 微服務 (20)

Predix
PredixPredix
Predix
 
Application-Servers.pdf
Application-Servers.pdfApplication-Servers.pdf
Application-Servers.pdf
 
Client Server Architecture
Client Server ArchitectureClient Server Architecture
Client Server Architecture
 
Microservices
MicroservicesMicroservices
Microservices
 
SWsoft Hosting Solutions for SaaS
SWsoft Hosting Solutions for SaaSSWsoft Hosting Solutions for SaaS
SWsoft Hosting Solutions for SaaS
 
ISTIO Deep Dive
ISTIO Deep DiveISTIO Deep Dive
ISTIO Deep Dive
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecture
 
Microservices-101
Microservices-101Microservices-101
Microservices-101
 
Clientserver
ClientserverClientserver
Clientserver
 
Ibm cloud forum managing heterogenousclouds_final
Ibm cloud forum managing heterogenousclouds_finalIbm cloud forum managing heterogenousclouds_final
Ibm cloud forum managing heterogenousclouds_final
 
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istio
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
Taw opening session
Taw opening sessionTaw opening session
Taw opening session
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
 
Web Based Application for Rent or Sale
Web Based Application for Rent or SaleWeb Based Application for Rent or Sale
Web Based Application for Rent or Sale
 
08 hopex v next service fabric
08 hopex v next   service fabric08 hopex v next   service fabric
08 hopex v next service fabric
 
Demistifying serverless on aws
Demistifying serverless on awsDemistifying serverless on aws
Demistifying serverless on aws
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 

More from YOU SHENG CHEN

R語言期末專題-108年至110年山域意外事故救援案件
R語言期末專題-108年至110年山域意外事故救援案件R語言期末專題-108年至110年山域意外事故救援案件
R語言期末專題-108年至110年山域意外事故救援案件YOU SHENG CHEN
 
Paper sharing_Digital transformation of maritime logistics- Exploring trends ...
Paper sharing_Digital transformation of maritime logistics- Exploring trends ...Paper sharing_Digital transformation of maritime logistics- Exploring trends ...
Paper sharing_Digital transformation of maritime logistics- Exploring trends ...YOU SHENG CHEN
 
Paper sharing_Envisioning entrepreneurship and digital innovation through a d...
Paper sharing_Envisioning entrepreneurship and digital innovation through a d...Paper sharing_Envisioning entrepreneurship and digital innovation through a d...
Paper sharing_Envisioning entrepreneurship and digital innovation through a d...YOU SHENG CHEN
 
Paper sharing_Digital assemblages information infrastructures and mobile know...
Paper sharing_Digital assemblages information infrastructures and mobile know...Paper sharing_Digital assemblages information infrastructures and mobile know...
Paper sharing_Digital assemblages information infrastructures and mobile know...YOU SHENG CHEN
 
Paper sharing_Patient health locus of control the design of information syste...
Paper sharing_Patient health locus of control the design of information syste...Paper sharing_Patient health locus of control the design of information syste...
Paper sharing_Patient health locus of control the design of information syste...YOU SHENG CHEN
 
Paper sharing_An integrated framework of change management for social CRM imp...
Paper sharing_An integrated framework of change management for social CRM imp...Paper sharing_An integrated framework of change management for social CRM imp...
Paper sharing_An integrated framework of change management for social CRM imp...YOU SHENG CHEN
 
Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...
Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...
Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...YOU SHENG CHEN
 
LeetCode477_Total Hamming Distance.pptx
LeetCode477_Total Hamming Distance.pptxLeetCode477_Total Hamming Distance.pptx
LeetCode477_Total Hamming Distance.pptxYOU SHENG CHEN
 
Paper sharing_An assisted approach to business process redesign
Paper sharing_An assisted approach to business process redesignPaper sharing_An assisted approach to business process redesign
Paper sharing_An assisted approach to business process redesignYOU SHENG CHEN
 
Paper sharing_How Information Technology Governance Influences Organizational...
Paper sharing_How Information Technology Governance Influences Organizational...Paper sharing_How Information Technology Governance Influences Organizational...
Paper sharing_How Information Technology Governance Influences Organizational...YOU SHENG CHEN
 
Paper sharing_The interplay of digital transformation and employee competency
Paper sharing_The interplay of digital transformation and employee competencyPaper sharing_The interplay of digital transformation and employee competency
Paper sharing_The interplay of digital transformation and employee competencyYOU SHENG CHEN
 
Paper sharing_A digital twin hierarchy for metal additive manufacturing
Paper sharing_A digital twin hierarchy for metal additive manufacturingPaper sharing_A digital twin hierarchy for metal additive manufacturing
Paper sharing_A digital twin hierarchy for metal additive manufacturingYOU SHENG CHEN
 
Paper sharing_Digital servitization of symbiotic service composition in produ...
Paper sharing_Digital servitization of symbiotic service composition in produ...Paper sharing_Digital servitization of symbiotic service composition in produ...
Paper sharing_Digital servitization of symbiotic service composition in produ...YOU SHENG CHEN
 
Paper sharing_The architectural design and implementation of a digital platfo...
Paper sharing_The architectural design and implementation of a digital platfo...Paper sharing_The architectural design and implementation of a digital platfo...
Paper sharing_The architectural design and implementation of a digital platfo...YOU SHENG CHEN
 
Paper sharing_Legacy information system replacement_Pursuing quality design o...
Paper sharing_Legacy information system replacement_Pursuing quality design o...Paper sharing_Legacy information system replacement_Pursuing quality design o...
Paper sharing_Legacy information system replacement_Pursuing quality design o...YOU SHENG CHEN
 
Paper sharing_Standardizing information security _ a structurational analysis
Paper sharing_Standardizing information security _ a structurational analysisPaper sharing_Standardizing information security _ a structurational analysis
Paper sharing_Standardizing information security _ a structurational analysisYOU SHENG CHEN
 
Paper sharing_data-driven smart manufacturing (include smart manufacturing se...
Paper sharing_data-driven smart manufacturing (include smart manufacturing se...Paper sharing_data-driven smart manufacturing (include smart manufacturing se...
Paper sharing_data-driven smart manufacturing (include smart manufacturing se...YOU SHENG CHEN
 
Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...
Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...
Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...YOU SHENG CHEN
 
Paper sharing_Tapping into the wearable device revolution in the work environ...
Paper sharing_Tapping into the wearable device revolution in the work environ...Paper sharing_Tapping into the wearable device revolution in the work environ...
Paper sharing_Tapping into the wearable device revolution in the work environ...YOU SHENG CHEN
 
Paper sharing_New product development in taiwanese ic design companies
Paper sharing_New product development in taiwanese ic design companiesPaper sharing_New product development in taiwanese ic design companies
Paper sharing_New product development in taiwanese ic design companiesYOU SHENG CHEN
 

More from YOU SHENG CHEN (20)

R語言期末專題-108年至110年山域意外事故救援案件
R語言期末專題-108年至110年山域意外事故救援案件R語言期末專題-108年至110年山域意外事故救援案件
R語言期末專題-108年至110年山域意外事故救援案件
 
Paper sharing_Digital transformation of maritime logistics- Exploring trends ...
Paper sharing_Digital transformation of maritime logistics- Exploring trends ...Paper sharing_Digital transformation of maritime logistics- Exploring trends ...
Paper sharing_Digital transformation of maritime logistics- Exploring trends ...
 
Paper sharing_Envisioning entrepreneurship and digital innovation through a d...
Paper sharing_Envisioning entrepreneurship and digital innovation through a d...Paper sharing_Envisioning entrepreneurship and digital innovation through a d...
Paper sharing_Envisioning entrepreneurship and digital innovation through a d...
 
Paper sharing_Digital assemblages information infrastructures and mobile know...
Paper sharing_Digital assemblages information infrastructures and mobile know...Paper sharing_Digital assemblages information infrastructures and mobile know...
Paper sharing_Digital assemblages information infrastructures and mobile know...
 
Paper sharing_Patient health locus of control the design of information syste...
Paper sharing_Patient health locus of control the design of information syste...Paper sharing_Patient health locus of control the design of information syste...
Paper sharing_Patient health locus of control the design of information syste...
 
Paper sharing_An integrated framework of change management for social CRM imp...
Paper sharing_An integrated framework of change management for social CRM imp...Paper sharing_An integrated framework of change management for social CRM imp...
Paper sharing_An integrated framework of change management for social CRM imp...
 
Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...
Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...
Paper sharing_Explaining Data-Driven Decisions made by AI Systems_The Counter...
 
LeetCode477_Total Hamming Distance.pptx
LeetCode477_Total Hamming Distance.pptxLeetCode477_Total Hamming Distance.pptx
LeetCode477_Total Hamming Distance.pptx
 
Paper sharing_An assisted approach to business process redesign
Paper sharing_An assisted approach to business process redesignPaper sharing_An assisted approach to business process redesign
Paper sharing_An assisted approach to business process redesign
 
Paper sharing_How Information Technology Governance Influences Organizational...
Paper sharing_How Information Technology Governance Influences Organizational...Paper sharing_How Information Technology Governance Influences Organizational...
Paper sharing_How Information Technology Governance Influences Organizational...
 
Paper sharing_The interplay of digital transformation and employee competency
Paper sharing_The interplay of digital transformation and employee competencyPaper sharing_The interplay of digital transformation and employee competency
Paper sharing_The interplay of digital transformation and employee competency
 
Paper sharing_A digital twin hierarchy for metal additive manufacturing
Paper sharing_A digital twin hierarchy for metal additive manufacturingPaper sharing_A digital twin hierarchy for metal additive manufacturing
Paper sharing_A digital twin hierarchy for metal additive manufacturing
 
Paper sharing_Digital servitization of symbiotic service composition in produ...
Paper sharing_Digital servitization of symbiotic service composition in produ...Paper sharing_Digital servitization of symbiotic service composition in produ...
Paper sharing_Digital servitization of symbiotic service composition in produ...
 
Paper sharing_The architectural design and implementation of a digital platfo...
Paper sharing_The architectural design and implementation of a digital platfo...Paper sharing_The architectural design and implementation of a digital platfo...
Paper sharing_The architectural design and implementation of a digital platfo...
 
Paper sharing_Legacy information system replacement_Pursuing quality design o...
Paper sharing_Legacy information system replacement_Pursuing quality design o...Paper sharing_Legacy information system replacement_Pursuing quality design o...
Paper sharing_Legacy information system replacement_Pursuing quality design o...
 
Paper sharing_Standardizing information security _ a structurational analysis
Paper sharing_Standardizing information security _ a structurational analysisPaper sharing_Standardizing information security _ a structurational analysis
Paper sharing_Standardizing information security _ a structurational analysis
 
Paper sharing_data-driven smart manufacturing (include smart manufacturing se...
Paper sharing_data-driven smart manufacturing (include smart manufacturing se...Paper sharing_data-driven smart manufacturing (include smart manufacturing se...
Paper sharing_data-driven smart manufacturing (include smart manufacturing se...
 
Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...
Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...
Paper sharing_Swarm intelligence goal oriented approach to data-driven innova...
 
Paper sharing_Tapping into the wearable device revolution in the work environ...
Paper sharing_Tapping into the wearable device revolution in the work environ...Paper sharing_Tapping into the wearable device revolution in the work environ...
Paper sharing_Tapping into the wearable device revolution in the work environ...
 
Paper sharing_New product development in taiwanese ic design companies
Paper sharing_New product development in taiwanese ic design companiesPaper sharing_New product development in taiwanese ic design companies
Paper sharing_New product development in taiwanese ic design companies
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 

Microservice 微服務

  • 2. CONTENTS 1. Known uses 2. Key characteristics of a service 3. The structure of a service 4. Benefits and drawbacks 5. Microservice canvas 6. Forces of a service /13 2
  • 3. Known uses A very popular video streaming service Responsible for up to 30% of Internet traffic A large scale, service-oriented architecture Handle over a billion calls per day to their video streaming API from over 800 different kinds of devices Each API call fans out to an average of six calls to backend services 相片(標題) CC BY-SA 授權 /13 3 1 Netflix proprietary server (Source by broadband analytics firm Sandvine)
  • 4. Known uses A multinational technology company Migrated to a service-oriented architecture consisting of hundreds of backend services Website application calls 100-150 services to get the data that used to build a web page /13 4 2 Amazon S3 data center 相片(標題) CC BY (Source by Amazon Architecture http://highscalability.com/amazon-architecture )
  • 5. Known uses A multinational e-commerce corporation The application tier consists of multiple independent applications  Each application uses X-axis splits and some applications such as search use Z- axis splits  Also applies a combination of X-, Y- and Z-style scaling to the database tier /13 5 3 相片 (標題) CC BY-SA 授權
  • 6. Key characteristics of a service /13 6 Highly maintainable and testable • rapid and frequent development and deployment Loosely coupled with other services • without being impacted by changes to other services • without affecting other services Independently deployable • enables a team to deploy their service without having to coordinate with other teams Capable of being developed by a small team • avoiding the high communication overhead of large teams
  • 7. The structure of a service /13 7 The core of the service is its business logic, which is surrounded by adapters that communicate with other services and applications Operations A command is an operation that mutates data; A query is a command that retrieves data Events A service publishes events to a message channel implemented by a message broker • operations of other services • subscribes to their events • persists data in the service’s database
  • 8. The structure of a service -Example /13 8 • Let’s imagine that you are building an e-commerce application • Services communicate using either synchronous protocols such as HTTP/REST or asynchronous protocols such as AMQP • Each service has its own database • Data consistency between services is maintained using the Saga pattern Fictitious e-commerce application(checking credit, maintaining inventory and shipping orders)
  • 9. The structure of a service -Saga pattern /13 9  A saga is a sequence of local transactions  Each local transaction updates the database and publishes a message or event to trigger the next local transaction in the saga  If a local transaction fails then the saga undo the changes that were made by the preceding local transactions
  • 10. Benefits and drawbacks /13 10 Enables the continuous delivery and deployment • Improved maintainability (easier to change) • Better testability (faster to test) • Deployed independently • Each team can develop, test, deploy and scale their services independently of all of the other teams Each microservice is relatively small • Making developers more productive (easier to understand) • The application starts faster Improved fault isolation • Other services will continue to handle requests(if fault) Eliminates any long-term commitment to a technology stack
  • 11. Benefits and drawbacks /13 11 Additional complexity of creating a distributed system • Implement the inter-service communication mechanism and deal with partial failure • Cross-multiple services is more difficult • Testing the interactions is difficult • Careful coordination between the teams Deployment complexity • Complexity of deploying and managing a system comprised of many different services Increased memory consumption
  • 12. Microservice canvas /13 12 External view • Name:name of the service Name • Description:a brief description of the service Description • Capabilities:the business capabilities implemented by the service • Service API:the operations implemented by the service and the domain events published by the service • Quality attributes:non-functional attributes • Observability:includes health check endpoint, key metrics Implementation • DDD(domain-driven design) subdomain 、Use Case、Resources Dependencies • Invokes:the operations, which are implemented by other services that this service invokes invoke • Subscribes to:the messages, which includes events, that this service subscribes to Examples of the microservice canvas https://github.com/cer/microservice-canvas (Matt McLarty and Irakli Nadareishvili, 2017) Domain-Driven Design: Tackling Complexity in the Heart of Software
  • 13. Forces of a service /13 13  New team members must quickly become productive  The application must be easy to understand and modify  To practice continuous deployment of the application  Must run multiple instances of the application on multiple machines in order to satisfy scalability and availability requirements  To take advantage of emerging technologies (frameworks, programming languages and etc)
  • 15. •專屬伺服器、分流設計 Netflix解決全球驚人流量之道 https://www.cool3c.com/article/104032 •Pattern: Microservice Architecture https://microservices.io/patterns/microservices.html •What’s a service - part 1? http://chrisrichardson.net/post/microservices/general/2019/02/16/whats-a-service-part- 1.html •Pattern: Saga https://microservices.io/patterns/data/saga.html •Node之可擴展性 --- Node的Cluster https://mark-lin.com/posts/20170605/?msclkid=94b976b0c76011ecb073e53267a36d3c •The Scale Cube https://microservices.io/articles/scalecube.html  x: 負載平衡 If there are N copies then each copy handles 1/N of the load  Y: Y-axis axis scaling splits the application into multiple Each service is responsible for one or more closely related functions (using noun / verb to split service ) Resources
  • 16. •技術棧:它的定義以及構建方式 https://mixpanel.com/zh-hant/topics/what-is-a-technology- stack/?msclkid=c2b64b17c5da11ecb1084e6a3f038b9b 技術棧也稱解決方案棧、技術基礎結構或數據生態系統,是用於構建和執行某款應用程式的所有技術服務的清單。 •[Domain Driven Design] 簡介和為什麼你需要DDD https://medium.com/%E7%A7%91%E6%8A%80%E6%96%B0%E6%83%B3/domain-driven-design- %E7%B0%A1%E4%BB%8B%E5%92%8C%E7%82%BA%E4%BB%80%E9%BA%BC%E4%BD%A0%E9%9C%80%E8%A6%81ddd- 6cf4ceed6088 •Documenting a service using the microservice canvas https://chrisrichardson.net/post/microservices/general/2019/02/27/microservice-canvas.html •P13 Microsoft Stock images (royalty-free images) •PPT template- IT PowerPoint Template https://prezentr.com/templates/it-powerpoint-template/ Resources

Editor's Notes

  1. 擴展立方(scale cube) X 軸 : 複制 (附載平衡) Y 軸 : 以服務/功能分解 (微服務(Microservices)) Z 軸 : 以資料來分解 (資料庫 頻寬分配)
  2. 領域驅動設計 介紹 DDD 是什麼之前,我們先定義領域 (Domain) 是什麼。廣泛來說, domain (knowledge) 是指「一塊知識的範圍」。實務上,就是指「你工作上所需的一切知識集合」,包含「問題」以及「解決方案」。 由此可見, DDD 是一種基於領域知識來解決複雜業務問題的軟體開發方法論。 他有以下三個重點: 跟領域專家 (domain expert) 密切合作來定義出 domain 的範圍及相關解決的方案。 切分領域出數個子領域,並專注在核心子領域。 透過一系列設計模式,將領域知識注入進程式模型 (model) 中。