SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Consumer Driven Contracts
Qaiser Mazhar
$ whoami
● Scrum Master for Baskets & Checkouts
● Joined M&S in March
Previous Life
● Tech Lead & Agile Coach at Rightmove.co.uk
● Search Replacement (Odin)
● Property Data
● Helping other teams and individuals become more “agile”
Odin
● Microservices
○ Restful API, JSON over http
○ Java 8, Springboot
○ High quality, clean code
○ Healthy coverage (we did not chase percentage) - Spock, Wiremock, Mockito, AssertJ, Rest-
assured, Gatling, Spring Integration/Web-Integration etc...
○ ELK
○ Monitoring - Xymon, Dashing.io, Spring Health/Metrics, NewRelic
○ Resilience - Hystrix, 3 Site Architecture, Load Balancer
○ ...
● Frontend
○ Mobile first
○ Hand built components
○ Non-isomorphic
Odin
● High performing team
○ Autonomy
○ Support what we built
○ Right tool for the job
○ Clear standards and best practices
■ Living documents
○ Strong opinions, loosely held
○ All the DDs (ATDD, BDD, TDD, DDD)
○ CI/CD
○ Promiscuous Pragmatic Pair Programming
○ Sociocratic decision making process
Odin
● Challenges
○ Large Team (~12 Devs, 2 QAs, Team Lead, Tech Lead)
○ Lots of learning
■ It's ok to fail as long as there are learnings
○ Lots to do
■ Rearchitecture, CD, Mobile first responsive UI, Agile practices
○ Onboarding new developers
■ Better documentation?
○ Supporting non-CD Teams
○ Breaking changes in APIs
Consumer Driven Contracts
● Traditional end to end Tests (Dependency driven)
○ Too late to get feedback
○ Expensive to change so late
○ Difficult to orchestrate
■ Your client might not exist yet
○ Don’t know who is using your software
● Consumer Driven
○ APIs that provide value (and be beautiful )
○ Fail fast
○ Confidence in decommissions
○ Independent deployments
○ Improve communication/collaboration with dependent teams
How does it work?
● Centralised contract storage
○ Publish contracts each build
○ Golden source of client dependencies
○ Download and test each build
○ Test both consumer and provider against contract
● A Service can be both provider and consumer
● Frameworks can help:
○ Realestate.com.au pact
○ Thoughtworks pacto
● Stub Provider Service
○ Testing service not downstream
○ Spring @Profile annotation
Creating a new endpoint
1. Consumer identifies a need from a provider that is currently not available.
2. Consumer collaborates with service provider to define API to satisfy consumer’s
needs whilst considering the constraints and considerations of the provider.
Result is a contract that the provider must abide by.
3. Provider implements the API to honour the contract, whilst still satisfying all
other existing contracts.
4. Provider runs an automated test to verify the contract has been satisfied as far as
the API is concerned. Functionality is tested via Unit, Integration and other
appropriate tests.
5. Provider publishes changes.
6. Consumer publishes contract and consumes new provider API.
Creating a new endpoint
Consumer ProducerPACT
Consumer ProducerPACT
Consumer ProducerPACT
Updating existing endpoint
1. Consumer identifies a change to an existing endpoint for a provider.
2. Consumer collaborates with service provider and any other existing consumers to define API that
will satisfy all consumer’s needs whilst considering the constraints and considerations of the
provider. Result is a contract that the provider must abide by.
3. Provider implements the API to honour the contract, whilst still satisfying all other existing
contracts.
4. Provider runs an automated test to verify the contract has been satisfied as far as the API is
concerned. Functionality is tested via Unit, Integration and other appropriate tests.
5. Provider publishes changes.
6. Consumer publishes new contract, removes old redundant contract and consumes updated
provider API.
7. Remaining consumers publish new contracts, remove redundant contracts and consume updated
provider API.
8. Provider removes deprecated API.
Updating existing endpoint
Consumer ProducerPACT
Consumer ProducerPACT
Consumer ProducerPACT
Consumer ProducerPACT
Too much of a good thing..
● CDCs has most value when working with other teams with independent release
cycles
○ Limited when all consumers ever are in the same small team
● Overhead when rapidly changing API
● Single point of failure for CDC Repository
○ Pick somewhere robust - nexus?
● CDCs can be abused
○ Too loose of a contract
○ Not updated
○ Testing returned values
● CDCs enable conversations, not replace
Other Stuff
● Postels Law
● API Versioning
○ Keep only a couple API versions and clean them up
○ Contract with Consumers that only N versions will be supported so they must update regularly
● Rollbacks are more robust
● Discover and Test APIs
○ Swagger/Spring fox
○ README.md
○ Be consistent - don’t make me think

Weitere ähnliche Inhalte

Was ist angesagt?

Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...Evgeniy Kuzmin
 
Collaborative Contract Driven Development
Collaborative Contract Driven DevelopmentCollaborative Contract Driven Development
Collaborative Contract Driven DevelopmentBilly Korando
 
vodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pactvodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pactvodQA
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015Phil Leggetter
 
Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...
Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...
Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...Peter Sellars
 
Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021Paulo Clavijo
 
Implementing BDD at scale for agile and DevOps teams
Implementing BDD at scale for agile and DevOps teamsImplementing BDD at scale for agile and DevOps teams
Implementing BDD at scale for agile and DevOps teamsLaurent PY
 
Design and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice ArchitectureDesign and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice ArchitectureLohika_Odessa_TechTalks
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management SmartBear
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Marcin Grzejszczak
 
API Design Collaboration
API Design CollaborationAPI Design Collaboration
API Design CollaborationUchit Vyas ☁
 
Contract Testing
Contract TestingContract Testing
Contract Testingkloia
 
Consumer Driven Contracts
Consumer Driven ContractsConsumer Driven Contracts
Consumer Driven ContractsVisuality
 
How to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSPhil Leggetter
 
Contract Testing: An Introduction
Contract Testing: An IntroductionContract Testing: An Introduction
Contract Testing: An IntroductionMike Harris
 
API First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipelineAPI First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipelinePronovix
 
Consumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanConsumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanPostman
 
ATAGTR2017 Testing of Connected Cars Based on IOT
ATAGTR2017 Testing of Connected Cars Based on IOTATAGTR2017 Testing of Connected Cars Based on IOT
ATAGTR2017 Testing of Connected Cars Based on IOTAgile Testing Alliance
 
Contract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiDContract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiDCODEiD PHP Community
 

Was ist angesagt? (20)

Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
 
Collaborative Contract Driven Development
Collaborative Contract Driven DevelopmentCollaborative Contract Driven Development
Collaborative Contract Driven Development
 
vodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pactvodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pact
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015
 
Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...
Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...
Lightening Talk: Auckland Continuous Delivery Meetup [Sept 2014] - Pact: Cons...
 
Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021
 
Implementing BDD at scale for agile and DevOps teams
Implementing BDD at scale for agile and DevOps teamsImplementing BDD at scale for agile and DevOps teams
Implementing BDD at scale for agile and DevOps teams
 
Design and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice ArchitectureDesign and Evolution of APIs in Microservice Architecture
Design and Evolution of APIs in Microservice Architecture
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
 
API Design Collaboration
API Design CollaborationAPI Design Collaboration
API Design Collaboration
 
Process
ProcessProcess
Process
 
Contract Testing
Contract TestingContract Testing
Contract Testing
 
Consumer Driven Contracts
Consumer Driven ContractsConsumer Driven Contracts
Consumer Driven Contracts
 
How to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJS
 
Contract Testing: An Introduction
Contract Testing: An IntroductionContract Testing: An Introduction
Contract Testing: An Introduction
 
API First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipelineAPI First Workflow: How could we have better API Docs through DevOps pipeline
API First Workflow: How could we have better API Docs through DevOps pipeline
 
Consumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanConsumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With Postman
 
ATAGTR2017 Testing of Connected Cars Based on IOT
ATAGTR2017 Testing of Connected Cars Based on IOTATAGTR2017 Testing of Connected Cars Based on IOT
ATAGTR2017 Testing of Connected Cars Based on IOT
 
Contract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiDContract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiD
 

Ähnlich wie Microservices: Consumer Driven Contracts in Practice

Testing microservices, contract testing
Testing microservices, contract testingTesting microservices, contract testing
Testing microservices, contract testingDaria Golub
 
LF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIELF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIEDanBrown980551
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021Ieva Navickaite
 
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIsWSO2
 
Integration testing with PACT
Integration testing with PACTIntegration testing with PACT
Integration testing with PACTKnoldus Inc.
 
Consumer driven Contract Test
Consumer driven Contract TestConsumer driven Contract Test
Consumer driven Contract TestKnoldus Inc.
 
Consumer contract testing
Consumer contract testingConsumer contract testing
Consumer contract testingRafiq Gemmail
 
Big ideas in small packages - How microservices helped us to scale our vision
Big ideas in small packages  - How microservices helped us to scale our visionBig ideas in small packages  - How microservices helped us to scale our vision
Big ideas in small packages - How microservices helped us to scale our visionSebastian Schleicher
 
Monitoring SLA with Prometheus and LibreOffice Calc
Monitoring SLA with Prometheus and LibreOffice CalcMonitoring SLA with Prometheus and LibreOffice Calc
Monitoring SLA with Prometheus and LibreOffice CalcDidiet A. Pambudiono
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservicesRon Barabash
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionMukesh Singh
 
Deployability
DeployabilityDeployability
DeployabilityLen Bass
 
A multi sided marketplace platform for telco enabled products Werner Eriksen
A multi sided marketplace platform for telco enabled products Werner EriksenA multi sided marketplace platform for telco enabled products Werner Eriksen
A multi sided marketplace platform for telco enabled products Werner EriksenAlan Quayle
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileIosif Itkin
 
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...Data Con LA
 
Why You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API DevelopmentWhy You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API DevelopmentDevenPhillips
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureMarcin Grzejszczak
 
Choosing the Right Angular Development Agency for Your Web Projects.pdf
Choosing the Right Angular Development Agency for Your Web Projects.pdfChoosing the Right Angular Development Agency for Your Web Projects.pdf
Choosing the Right Angular Development Agency for Your Web Projects.pdfDigisoft Solution
 

Ähnlich wie Microservices: Consumer Driven Contracts in Practice (20)

Testing microservices, contract testing
Testing microservices, contract testingTesting microservices, contract testing
Testing microservices, contract testing
 
LF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIELF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIE
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
 
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
 
Integration testing with PACT
Integration testing with PACTIntegration testing with PACT
Integration testing with PACT
 
Consumer driven Contract Test
Consumer driven Contract TestConsumer driven Contract Test
Consumer driven Contract Test
 
Consumer contract testing
Consumer contract testingConsumer contract testing
Consumer contract testing
 
Big ideas in small packages - How microservices helped us to scale our vision
Big ideas in small packages  - How microservices helped us to scale our visionBig ideas in small packages  - How microservices helped us to scale our vision
Big ideas in small packages - How microservices helped us to scale our vision
 
Monitoring SLA with Prometheus and LibreOffice Calc
Monitoring SLA with Prometheus and LibreOffice CalcMonitoring SLA with Prometheus and LibreOffice Calc
Monitoring SLA with Prometheus and LibreOffice Calc
 
Hyperledger fabric 3
Hyperledger fabric 3Hyperledger fabric 3
Hyperledger fabric 3
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
 
Deployability
DeployabilityDeployability
Deployability
 
Agile 101
Agile 101Agile 101
Agile 101
 
A multi sided marketplace platform for telco enabled products Werner Eriksen
A multi sided marketplace platform for telco enabled products Werner EriksenA multi sided marketplace platform for telco enabled products Werner Eriksen
A multi sided marketplace platform for telco enabled products Werner Eriksen
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibile
 
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
Data Con LA 2018 - Enabling real-time exploration and analytics at scale at H...
 
Why You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API DevelopmentWhy You Should Be Doing Contract-First API Development
Why You Should Be Doing Contract-First API Development
 
Spring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice ArchitectureSpring Cloud Contract And Your Microservice Architecture
Spring Cloud Contract And Your Microservice Architecture
 
Choosing the Right Angular Development Agency for Your Web Projects.pdf
Choosing the Right Angular Development Agency for Your Web Projects.pdfChoosing the Right Angular Development Agency for Your Web Projects.pdf
Choosing the Right Angular Development Agency for Your Web Projects.pdf
 

Kürzlich hochgeladen

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Kürzlich hochgeladen (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Microservices: Consumer Driven Contracts in Practice

  • 2. $ whoami ● Scrum Master for Baskets & Checkouts ● Joined M&S in March Previous Life ● Tech Lead & Agile Coach at Rightmove.co.uk ● Search Replacement (Odin) ● Property Data ● Helping other teams and individuals become more “agile”
  • 3. Odin ● Microservices ○ Restful API, JSON over http ○ Java 8, Springboot ○ High quality, clean code ○ Healthy coverage (we did not chase percentage) - Spock, Wiremock, Mockito, AssertJ, Rest- assured, Gatling, Spring Integration/Web-Integration etc... ○ ELK ○ Monitoring - Xymon, Dashing.io, Spring Health/Metrics, NewRelic ○ Resilience - Hystrix, 3 Site Architecture, Load Balancer ○ ... ● Frontend ○ Mobile first ○ Hand built components ○ Non-isomorphic
  • 4. Odin ● High performing team ○ Autonomy ○ Support what we built ○ Right tool for the job ○ Clear standards and best practices ■ Living documents ○ Strong opinions, loosely held ○ All the DDs (ATDD, BDD, TDD, DDD) ○ CI/CD ○ Promiscuous Pragmatic Pair Programming ○ Sociocratic decision making process
  • 5. Odin ● Challenges ○ Large Team (~12 Devs, 2 QAs, Team Lead, Tech Lead) ○ Lots of learning ■ It's ok to fail as long as there are learnings ○ Lots to do ■ Rearchitecture, CD, Mobile first responsive UI, Agile practices ○ Onboarding new developers ■ Better documentation? ○ Supporting non-CD Teams ○ Breaking changes in APIs
  • 6. Consumer Driven Contracts ● Traditional end to end Tests (Dependency driven) ○ Too late to get feedback ○ Expensive to change so late ○ Difficult to orchestrate ■ Your client might not exist yet ○ Don’t know who is using your software ● Consumer Driven ○ APIs that provide value (and be beautiful ) ○ Fail fast ○ Confidence in decommissions ○ Independent deployments ○ Improve communication/collaboration with dependent teams
  • 7. How does it work? ● Centralised contract storage ○ Publish contracts each build ○ Golden source of client dependencies ○ Download and test each build ○ Test both consumer and provider against contract ● A Service can be both provider and consumer ● Frameworks can help: ○ Realestate.com.au pact ○ Thoughtworks pacto ● Stub Provider Service ○ Testing service not downstream ○ Spring @Profile annotation
  • 8. Creating a new endpoint 1. Consumer identifies a need from a provider that is currently not available. 2. Consumer collaborates with service provider to define API to satisfy consumer’s needs whilst considering the constraints and considerations of the provider. Result is a contract that the provider must abide by. 3. Provider implements the API to honour the contract, whilst still satisfying all other existing contracts. 4. Provider runs an automated test to verify the contract has been satisfied as far as the API is concerned. Functionality is tested via Unit, Integration and other appropriate tests. 5. Provider publishes changes. 6. Consumer publishes contract and consumes new provider API.
  • 9. Creating a new endpoint Consumer ProducerPACT Consumer ProducerPACT Consumer ProducerPACT
  • 10. Updating existing endpoint 1. Consumer identifies a change to an existing endpoint for a provider. 2. Consumer collaborates with service provider and any other existing consumers to define API that will satisfy all consumer’s needs whilst considering the constraints and considerations of the provider. Result is a contract that the provider must abide by. 3. Provider implements the API to honour the contract, whilst still satisfying all other existing contracts. 4. Provider runs an automated test to verify the contract has been satisfied as far as the API is concerned. Functionality is tested via Unit, Integration and other appropriate tests. 5. Provider publishes changes. 6. Consumer publishes new contract, removes old redundant contract and consumes updated provider API. 7. Remaining consumers publish new contracts, remove redundant contracts and consume updated provider API. 8. Provider removes deprecated API.
  • 11. Updating existing endpoint Consumer ProducerPACT Consumer ProducerPACT Consumer ProducerPACT Consumer ProducerPACT
  • 12. Too much of a good thing.. ● CDCs has most value when working with other teams with independent release cycles ○ Limited when all consumers ever are in the same small team ● Overhead when rapidly changing API ● Single point of failure for CDC Repository ○ Pick somewhere robust - nexus? ● CDCs can be abused ○ Too loose of a contract ○ Not updated ○ Testing returned values ● CDCs enable conversations, not replace
  • 13. Other Stuff ● Postels Law ● API Versioning ○ Keep only a couple API versions and clean them up ○ Contract with Consumers that only N versions will be supported so they must update regularly ● Rollbacks are more robust ● Discover and Test APIs ○ Swagger/Spring fox ○ README.md ○ Be consistent - don’t make me think