SlideShare une entreprise Scribd logo
1  sur  48
Applying Domain Driven Design to
APIs and Microservices
James Higginbotham
@launchany
Your API tells a story about your
company and your vision
A great API design strategy is
critical for API product adoption
and sustainable application
development
Your APIs may not be considered
“mission critical” like Stripe. But
your API design is a contract with
your API consumers.
Your API design is composed of
the capabilities (or “skills”)
you offer to developers
API Skills == “I want to…”
What skills do your
APIs need to offer?
Outside-In API Design Approach
Web
Application
API Design – “The Contract”
Internal
Application
API Consumer
Mobile
Application
API Design is an architectural
concern that combines business,
product design, and software
engineering
Lack of Modularization = Regret
VS
Function-Based Module-Based
High cohesion
internally for common
functionality
Loose coupling
externally across
modules
High Cohesion + Loose Coupling
Public APIs
encourage
loose coupling
between modules
API
Scoping rules
restrict access
outside of modules
X
API-Centric Software Design
Systems Design
System
Subsystem Subsystem
Module Module
Module Module
Subsystem Subsystem
Module Module
LEGO as Modular System Design
System
Sub-systems
Modules
API
API
API
System/Solution
Subsystem Subsystem
Subsystem
Module Module
Module Module
Module Module
Module Module
Module Module
Module Module
Module Module
Module Module
Domain-Driven Design helps
with identifying context
boundaries for complex APIs
Domain Driven Design (DDD)
 Maps domain concepts into software
 Heavy domain expert involvement
 Common vocabulary (“Ubiquitous Language”)
 Boundary-driven (“Bounded Context”)
 Applies learning over time
“I need to multiply two numbers
together. So, I am building
a microservice architecture.”
- almost everyone today
Microservice Architecture
 Loosely-coupled, service-oriented architecture
 Apply bounded context to limit cognitive load
 Independently deployable via automation
 Enable replaceability and experimentation
 Encourage composability of the business
 Best for larger teams
Applying Systems Design
and Domain-Driven Design
to find API boundaries
and resources
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Point
Of Sale
Remove
Product
Customer
Operator
Operator
Order Mgmt
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Operator
Point
Of Sale
Remove
Product
Customer
Operator
Inventory Mgmt
Fulfillment
Each subsystem has an API that
exposes one or more endpoints
Order API
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Point
Of Sale
Remove
Product
Customer
Operator
Inventory API
Fulfillment API
Operator
Identifying product opportunities
becomes easier when we have
boundaries around the APIs
Order API
List Avail
Inventory
Distributor
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Operator
Remove
Product
Inventory API
Fulfillment API
#1 #2
`
Point
Of Sale
For every API, ask:
“What resources will it offer?”
Use domain-driven design to
find business entities, relations,
state transitions, and events
Order API
List Avail
Inventory
Add Product
to Order
Complete
Order
Cancel
Booking
Add Product
to Inventory
Update
Product Qty
Locate
Booking
Redeem
Booking
Remove
Product
Inventory API
Fulfillment API
Order API
Product
Availabilities
Orders
Product
Inventory
Bookings
Inventory API
Fulfillment API
Same entity (Products),
Conceptually different to
the API context!
Availabilities
- product
- date(s) avail
- qty avail
Orders
- bookings
- order total
Products
- name
- avail schedule
Bookings
- product
- date(s)
- status
Availabilities
- product
- date(s) avail
- qty avail
availabilityChanged()
Orders
- bookings
- order total
created()
updated()
Products
- name
- avail schedule
created()
removed()
updated()
Bookings
- product
- date(s)
- Status
redeemed()
cancelled()
Availabilities
- product
- date(s) avail
- qty avail
availabilityChanged()
Orders
- bookings
- order total
created()
updated()
Products
- name
- avail schedule
created()
removed()
updated()
Bookings
- product
- date(s)
- status
redeemed()
cancelled()
Order API Inventory API
Fulfillment API
Map Resources to the API
API composability using
microservices
Public APIs target durability
through external contracts.
Microservice APIs target evolution through
learning and experimentation
Availabilities Service Orders Service
Products Service
Bookings Service
Orders HTTP API
Inventory HTTP API
Fulfillment HTTP API
Availabilities Service Orders Service
Products Service
Bookings Service
Orders HTTP API
Inventory HTTP API
Fulfillment HTTP API
Payment Service Refund Service
Alexa
VoiceSkill
API
Gateway
API
Gateway
Messaging
…
Microservice
…
API
…
Microservice
…
API
…
Microservice
…
API
…
Microservice
…
API
Slack
Chatbot
Web+
MobileApp
API
Gateway
Microservice Architecture
The Composable World of APIs
Offers API
Inventory
API
Bookings
API
Identity API
Accounts
API
Rewards
API
Partners
Internal
Developers
Public App
Developers
Consumers
Third-party
Approved Apps
Thank you
James Higginbotham
@launchany
http://bit.ly/api-skills

Contenu connexe

Tendances

Tendances (20)

Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
02 api gateway
02 api gateway02 api gateway
02 api gateway
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
The Architecture of an API Platform
The Architecture of an API PlatformThe Architecture of an API Platform
The Architecture of an API Platform
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
MSA 전략 2: 마이크로서비스, 어떻게 구현할 것인가?
MSA 전략 2: 마이크로서비스, 어떻게 구현할 것인가?MSA 전략 2: 마이크로서비스, 어떻게 구현할 것인가?
MSA 전략 2: 마이크로서비스, 어떻게 구현할 것인가?
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
Cloud Migration Workshop
Cloud Migration WorkshopCloud Migration Workshop
Cloud Migration Workshop
 
API Management Within a Microservices Architecture
API Management Within a Microservices Architecture API Management Within a Microservices Architecture
API Management Within a Microservices Architecture
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdfCNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology Stack
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
 
API Management
API ManagementAPI Management
API Management
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
What is an API Gateway?
What is an API Gateway?What is an API Gateway?
What is an API Gateway?
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 

En vedette

Onion Architecture
Onion ArchitectureOnion Architecture
Onion Architecture
matthidinger
 

En vedette (8)

Pragmatic RESTful API Design: Apigee Webinar
Pragmatic RESTful API Design: Apigee WebinarPragmatic RESTful API Design: Apigee Webinar
Pragmatic RESTful API Design: Apigee Webinar
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
 
Onion Architecture
Onion ArchitectureOnion Architecture
Onion Architecture
 
Domain Driven Design Through Onion Architecture
Domain Driven Design Through Onion ArchitectureDomain Driven Design Through Onion Architecture
Domain Driven Design Through Onion Architecture
 
Api architectures for the modern enterprise
Api architectures for the modern enterpriseApi architectures for the modern enterprise
Api architectures for the modern enterprise
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravel
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
 

Similaire à Designing APIs and Microservices Using Domain-Driven Design

Api management introduction and product overview v1.0 2014.08.28
Api management introduction and product overview v1.0 2014.08.28Api management introduction and product overview v1.0 2014.08.28
Api management introduction and product overview v1.0 2014.08.28
floridawusergroup
 
Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0
sflynn073
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
Akana
 

Similaire à Designing APIs and Microservices Using Domain-Driven Design (20)

API:World 2016 - Applying Domain Driven Design to APIs and Microservices
API:World 2016 - Applying Domain Driven Design to APIs and MicroservicesAPI:World 2016 - Applying Domain Driven Design to APIs and Microservices
API:World 2016 - Applying Domain Driven Design to APIs and Microservices
 
Transformation through the API
Transformation through the APITransformation through the API
Transformation through the API
 
IBM API management Philip Little
IBM API management Philip LittleIBM API management Philip Little
IBM API management Philip Little
 
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
 
Api management introduction and product overview v1.0 2014.08.28
Api management introduction and product overview v1.0 2014.08.28Api management introduction and product overview v1.0 2014.08.28
Api management introduction and product overview v1.0 2014.08.28
 
Webcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product DemoWebcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product Demo
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...
 
CA API Developer Portal
CA API Developer PortalCA API Developer Portal
CA API Developer Portal
 
Apigee Edge Product Demo
Apigee Edge Product DemoApigee Edge Product Demo
Apigee Edge Product Demo
 
APIs as a Product Strategy
APIs as a Product StrategyAPIs as a Product Strategy
APIs as a Product Strategy
 
Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0Manage your ap is securely and easily ibm apim 4.0
Manage your ap is securely and easily ibm apim 4.0
 
Meetup 2022 - API Gateway landscape.pdf
Meetup 2022 - API Gateway landscape.pdfMeetup 2022 - API Gateway landscape.pdf
Meetup 2022 - API Gateway landscape.pdf
 
Webinar: How API Lifecycle Management can help to Accelerate Growth
Webinar: How API Lifecycle Management can help to Accelerate GrowthWebinar: How API Lifecycle Management can help to Accelerate Growth
Webinar: How API Lifecycle Management can help to Accelerate Growth
 
Innovation at scale - Key drivers and pitfalls to building API driven agile b...
Innovation at scale - Key drivers and pitfalls to building API driven agile b...Innovation at scale - Key drivers and pitfalls to building API driven agile b...
Innovation at scale - Key drivers and pitfalls to building API driven agile b...
 
API Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value ChainAPI Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value Chain
 
apidays Australia 2023 - API Strategy In The Era Of Generative AI,Shreshta Sh...
apidays Australia 2023 - API Strategy In The Era Of Generative AI,Shreshta Sh...apidays Australia 2023 - API Strategy In The Era Of Generative AI,Shreshta Sh...
apidays Australia 2023 - API Strategy In The Era Of Generative AI,Shreshta Sh...
 
Securely expose protected resources as ap is with app42 api gateway
Securely expose protected resources as ap is with app42 api gatewaySecurely expose protected resources as ap is with app42 api gateway
Securely expose protected resources as ap is with app42 api gateway
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
 

Plus de LaunchAny

Plus de LaunchAny (20)

Refining Your API Design - Architecture and Modeling Learning Event
Refining Your API Design - Architecture and Modeling Learning EventRefining Your API Design - Architecture and Modeling Learning Event
Refining Your API Design - Architecture and Modeling Learning Event
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
Event-based API Patterns and Practices - AsyncAPI Online Conference
Event-based API Patterns and Practices - AsyncAPI Online ConferenceEvent-based API Patterns and Practices - AsyncAPI Online Conference
Event-based API Patterns and Practices - AsyncAPI Online Conference
 
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and StreamingGlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
 
Austin API Summit 2019 - APIs, Microservices, and Serverless: The Shape of Th...
Austin API Summit 2019 - APIs, Microservices, and Serverless: The Shape of Th...Austin API Summit 2019 - APIs, Microservices, and Serverless: The Shape of Th...
Austin API Summit 2019 - APIs, Microservices, and Serverless: The Shape of Th...
 
APIStrat Keynote: Lessons in Transforming the Enterprise to an API Platform
APIStrat Keynote: Lessons in Transforming the Enterprise to an API PlatformAPIStrat Keynote: Lessons in Transforming the Enterprise to an API Platform
APIStrat Keynote: Lessons in Transforming the Enterprise to an API Platform
 
Austin API Summit 2018: Are REST APIs Still Relevant Today?
Austin API Summit 2018: Are REST APIs Still Relevant Today?Austin API Summit 2018: Are REST APIs Still Relevant Today?
Austin API Summit 2018: Are REST APIs Still Relevant Today?
 
GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?
 
Lessons in Transforming the Enterprise to an API Platform
Lessons in Transforming the Enterprise to an API PlatformLessons in Transforming the Enterprise to an API Platform
Lessons in Transforming the Enterprise to an API Platform
 
APIStrat 2017: API Design in the Age of Bots, IoT, and Voice
APIStrat 2017: API Design in the Age of Bots, IoT, and VoiceAPIStrat 2017: API Design in the Age of Bots, IoT, and Voice
APIStrat 2017: API Design in the Age of Bots, IoT, and Voice
 
API Design in the Age of Bots, IoT, and Voice
API Design in the Age of Bots, IoT, and VoiceAPI Design in the Age of Bots, IoT, and Voice
API Design in the Age of Bots, IoT, and Voice
 
APIStrat 2016: Moving Toward a Modular Enterprise
APIStrat 2016: Moving Toward a Modular EnterpriseAPIStrat 2016: Moving Toward a Modular Enterprise
APIStrat 2016: Moving Toward a Modular Enterprise
 
Moving Toward a Modular Enterprise - All About the API Conference 2016
Moving Toward a Modular Enterprise - All About the API Conference 2016Moving Toward a Modular Enterprise - All About the API Conference 2016
Moving Toward a Modular Enterprise - All About the API Conference 2016
 
APIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIsAPIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIs
 
API Thinking - How to Design APIs Through Systems Design
API Thinking - How to Design APIs Through Systems DesignAPI Thinking - How to Design APIs Through Systems Design
API Thinking - How to Design APIs Through Systems Design
 
Swagger 2.0: Latest and Greatest
Swagger 2.0: Latest and GreatestSwagger 2.0: Latest and Greatest
Swagger 2.0: Latest and Greatest
 
Gluecon 2015 Recap
Gluecon 2015 RecapGluecon 2015 Recap
Gluecon 2015 Recap
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
 
Microservices on the Edge
Microservices on the EdgeMicroservices on the Edge
Microservices on the Edge
 
How to Design and Build a Great Web API
How to Design and Build a Great Web APIHow to Design and Build a Great Web API
How to Design and Build a Great Web API
 

Dernier

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Dernier (20)

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Designing APIs and Microservices Using Domain-Driven Design

Notes de l'éditeur

  1. We’re going to talk about how to design LONG-LASTING APIs. The goal is to avoid a redesign not long after your API is deployed. API TRAINING to help coach teams on how to think in APIs and apply the techniques I’ll show you today Across every team and company, I reiterate one common theme…
  2. Capital One is changing the way we interact with banking and bank-level security Released 3 APIs during SXSW in March
  3. Watson is changing the way we UNDERSTAND DATA LANGUAGE, SPEECH, VISION, and DATA INSIGHTS
  4. Marvel is changing the way we INTERACT with the ENTERTAINMENT MEDIA and their storytelling Characters, stories, comics, creators, and events
  5. At their core, APIs are contracts for software component interaction. How we design our APIs will drive the level of short and long-term success. As an example, STRIPE…
  6. Stripe is well known because they focus on great API design and documentation. But it extends beyond that. They tell a story with their API: “we power commerce for businesses of all sizes” Everything is built around that…
  7. You may not be at Stripe’s scale or mission critical for customers How you version your API design over time is important, however – IT IS A CONTRACT
  8. Medhi recently tweeted that Stripe maintains 50 (actually now closer to 65) different versions of their API. They OWN VERSIONING, rather than pushing it to the CONSUMER. Even when we, as designers, MISS THE MARK, we should OWN IT
  9. Kin Lane has been conducting API workshops at universities by showing how to ACCOMPLISH THINGS Zapier/IFTTT is his model for teaching the use of APIs
  10. Our DATABASES are not our API Our CODE (classes, functions) are not our API Our API is a contract that is implemented by our code and databases We must put ourselves IN THE PLACE OF THE CONSUMER, NOT THE DEVELOPER
  11. Web APIs are an architectural concern, but MORE THAN THAT – PRODUCT AND BUSINESS TODAY IS HTTP, TOMORROW may be something else Use architectural design techniques to drive your API design What is it we are trying to solve and how are we planning to solve it? THAT IS THE PRODUCT SIDE and WHAT IS MOST EXCITING TO ME
  12. <<ADV…>>There are several popular web frameworks that make building a monolithic application easy – almost trivial. These frameworks commonly offer: accelerated development, but left off modular design This leads to a lack of proper modularization, impacting our API designs
  13. 10 years, new frameworks, but they assume a single subsystem – the webapp or “site” They missed the mark for larger applications, trying to avoid SOA This is leading to “MONOLITHIC REGRET” and a lack of modular applications Microservices is becoming a common way to deal with this problem at LARGER SCALES
  14. High Cohension – common functionality that is related BELONG TOGETHER Loose coupling – reduced dependencies across modules - minimize cohesion across modules
  15. Public APIs define the contract that the top module is offering to other modules around it. If the API contract changes, either through a change in the inputs, outputs, or overall behavior, it can break the integration between these modules. To prevent other modules from interacting with the internal components of itself, we apply scoping rules to restrict access
  16. Systems: This is a completely independent system that provides a solution to one or more problems Subsystems: Bounded concerns that help to compose the system itself. Subsystems do not offer a solution on their own, but contribute a bounded portion of it. finally, Modules: These are the building blocks for composing subsystems. Modules may contain one or more components, where components are classes in object-oriented programming languages or functions in functional programming languages.
  17. Demonstration of LEGO of how to BREAK a big KIT (problem) into smaller, manageable modules ALIGN OURSELVES based on core competencies
  18. APIs provide the opportunity to connect subsystems, with internal APIs that connect modules together. We should ONLY KNOW what the subsystem APIs are, NOT THE MODULE APIs
  19. Approach on software development for complex needs Based on Eric Evans' book "Domain Driven Design”
  20. Adrian Cockcroft’s definition
  21. I want to SHARE what METHODS I have USED to HELP TEAMS DESIGN APIs Product development = opportunity + need + solution Systems design defines how your product is architected API Systems design tells 2 stories: about how your API is architected (internal-facing), and how your API works within other solutions (external-facing)
  22. Ecommerce example – what does it take to place an order? These are the skills that our API must offer Essential step #1
  23. First step – list, understand what the business requirements were, how different parties were to interact with the system
  24. Group related activities participant(s) need to perform into subsystems Use the boundaries to determine: - what has already been built in-house - what needs to be built in-house - what can be replaced by COTS, third-party APIs
  25. We found 2 stories: a distributor story and an operator story = 2 PRODUCTS Operators vs Distributors drove API DESIGN, DOCS, MARKETING Different vocabularies for distributors and operators
  26. Not “what are your endpoints” or “what are your URLs”
  27. Discuss aggregates, entities, and value objects. Aggregates become resources, named after the root entity within Goal: Consistent naming that reflects the API’s intended use
  28. PRODUCT INVENTORY PRODUCT AVAIL + ORDERS BOOKINGS
  29. EVENTS – often the MOST MISSED OPPORTUNITY Callbacks change the way developers interact with you API, from POLLING to automatic NOTIFICATION when things change. Allows them to be more reactive to change in your own subsystems Github callbacks expanded the development pipeline beyond a single tool vendor
  30. [recall early in the talk: when is my product ready to launch?] Our architecture shows us not only what we need to build, but what each party needs to accomplish their goals/solution. This helps us with product roadmaps, scheduling, and other internal aspects of product management.
  31. Durability == LONG LASTING Replaceability == AGILITY, EXPERIMENTATION, EVOLUTION
  32. Start with services for each root-level domain entity Use SERVICE OBJECTS or MICROSERVICES
  33. Starting with the simplest services, we can break services out as we dig into the implementation details. In this case, PAYMENT and REFUND can be broken out and assigned to a different team
  34. API Gateways offer public contracts, integrate with microservices
  35. We live in a world with a growing number of APIs Many APIs represented in this room and at this conference Let’s look for skills and capabilities around us, build APIs, and HELP OTHERS TELL A STORY