SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
1 | Titel| 7. Juni 2019
1 | © GBTEC Software + Consulting AG 2019
Titelmasterformat durch Klicken bearbeiten
Folienmaster
Ingo Griebsch, Coding Architect @GBTEC
Ensure the integration of Microservices with Consumer Driven Contracts
2 | Titel| 7. Juni 2019
2 | © GBTEC Software + Consulting AG 2019
@d0gb0t666
Coding Architect @GBTEC
Husband and father of two
Boardgame addict
Love Clutch as well as Tricky
Who am I
ingogriebsch
3 | Titel| 7. Juni 2019
3 | © GBTEC Software + Consulting AG 2019
If anything is unclear or not understandable…
What the heck is he talking about?
4 | Titel| 7. Juni 2019
4 | © GBTEC Software + Consulting AG 2019
Agenda
1. Terms and definitions
2. The problem
3. Possible solutions
4. Implementation
5. Conclusion
5 | Titel| 7. Juni 2019
5 | © GBTEC Software + Consulting AG 2019
Terms and definitions
May I have your attention, please?
6 | Titel| 7. Juni 2019
6 | © GBTEC Software + Consulting AG 2019
Terms and definitions
Microservices
- are an architectural style that structures an
application as a collection of services.
- enable the continuous deployment of large,
complex applications.
- are highly maintainable and testable, loosely
coupled and independently deployable.
7 | Titel| 7. Juni 2019
7 | © GBTEC Software + Consulting AG 2019
Terms and definitions
(Microservices based) Application
- is a software designed to perform a group
of coordinated functions, tasks, or
activities for the benefit of the user.
- represents a suite of small services, each
communicating with lightweight
mechanisms, often a REST like API.
8 | Titel| 7. Juni 2019
8 | © GBTEC Software + Consulting AG 2019
Representational State Transfer (REST)
- is an architectural style for providing
standards between computer systems on the
web, making it easier for systems to
communicate with each other.
- Services implementing REST allow to access
and manipulate textual representations of
resources by using a uniform and predefined
set of stateless operations.
Terms and definitions
9 | Titel| 7. Juni 2019
9 | © GBTEC Software + Consulting AG 2019
Terms and definitions
Application Programming Interface (API)
- represents a set of clearly defined methods of
communication among various components.
- simplifies programming by abstracting the
underlying implementation and only exposing
objects or actions a developer needs.
- is typically defined as a set of specifications, such
as HTTP request messages, along with a
definition of the structure of response messages,
usually in an XML or JSON format.
10 | Titel| 7. Juni 2019
10 | © GBTEC Software + Consulting AG 2019
Terms and definitions
Contract
- represents an agreement between a producer
and a consumer of an API how it will look like.
Producer
- is a service that exposes an API which is
consumed by several services.
Consumer
- is a service that consumes the API of a producer.
11 | Titel| 7. Juni 2019
11 | © GBTEC Software + Consulting AG 2019
The problem
Why is this broken (again)?
12 | Titel| 7. Juni 2019
12 | © GBTEC Software + Consulting AG 2019
The problem
A producer provides a specific API which is available through REST and allows the
access to specific resources hold inside the service.
13 | Titel| 7. Juni 2019
13 | © GBTEC Software + Consulting AG 2019
The problem
A consumer wants to call the API of the producer through REST to receive some of
the hold resources.
14 | Titel| 7. Juni 2019
14 | © GBTEC Software + Consulting AG 2019
The problem
The consumer expects a specific API (for whatever reason) which is NOT implemented
this way through the producer (not at all or not anymore).
15 | Titel| 7. Juni 2019
15 | © GBTEC Software + Consulting AG 2019
The problem
There can be several reasons why the consumer expects an API which is not
provided that way by the producer:
- The producer changed the API because he did not (yet/anymore) expect the
consumer.
- The producer changed the API because of a requirement of another consumer.
- The producer changed the API by accident.
- The API is either incorrectly documented or not sufficiently documented.
- Producer and consumer have talked past each other.
- The consumer expects that the API should work that way.
16 | Titel| 7. Juni 2019
16 | © GBTEC Software + Consulting AG 2019
Possible solutions
How could we solve this problem?
17 | Titel| 7. Juni 2019
17 | © GBTEC Software + Consulting AG 2019
Possible solutions
When trying to test an application that communicates with other services then we
could do one of the following things:
- Deploy all microservices and perform end to end tests.
- Mock other microservices in integration tests.
- Define contracts to be able to generate and use real world mocks in integration tests.
18 | Titel| 7. Juni 2019
18 | © GBTEC Software + Consulting AG 2019
Possible solutions
- Advantages
- Simulates production.
- Tests real communication between services.
- Disadvantages
- To test one microservice we would have to deploy several services, databases etc.
- The environment where the tests would be conducted is locked during the tests.
- Needs a long time to run the tests.
- Very late feedback.
Deploy all microservices and perform end to end tests
19 | Titel| 7. Juni 2019
19 | © GBTEC Software + Consulting AG 2019
Possible solutions
- Advantages
- Very fast feedback.
- No infrastructure required.
- Disadvantages
- The consuming service creates mocks that might have nothing to do with reality.
- You can go to production with passing tests and failing production.
Mock other microservices in integration tests
20 | Titel| 7. Juni 2019
20 | © GBTEC Software + Consulting AG 2019
Possible solutions
- Advantages (in addition to the already mentioned advantages)
- Ensures that the mocks behave exactly like the actual producer is implemented.
- Changes in contracts are immediately visible on both sides of the communication.
- Promote acceptance test driven development method and Microservices
architectural style.
Define contracts to be able to generate and use real world mocks
21 | Titel| 7. Juni 2019
21 | © GBTEC Software + Consulting AG 2019
Implementation
Let’s do it!
22 | Titel| 7. Juni 2019
22 | © GBTEC Software + Consulting AG 2019
Implementation
Developers who implement the consumer and developers who implement the
producer team up to define the contracts based on the needs of the consumer.
23 | Titel| 7. Juni 2019
23 | © GBTEC Software + Consulting AG 2019
Implementation
The contracts will then bundled and stored in a repository. The repository is
available for both the consumer and the producer.
24 | Titel| 7. Juni 2019
24 | © GBTEC Software + Consulting AG 2019
Implementation
The producer uses the contracts from the repository to verify that the API it
provides fulfills the contracts.
25 | Titel| 7. Juni 2019
25 | © GBTEC Software + Consulting AG 2019
Implementation
The consumer uses the contracts from the repository to verify that they call the API
in the way the producer provides.
26 | Titel| 7. Juni 2019
26 | © GBTEC Software + Consulting AG 2019
Conclusion
Nothing to worry about, we are on a good way!
27 | Titel| 7. Juni 2019
27 | © GBTEC Software + Consulting AG 2019
Conclusion
- Communication in a Microservices world is a complex problem.
- There are solutions available which help you to effectively test the
behavior of and communication between microservices.
- Talk to each other! ;) Using APIs is something that can cross team
boundaries, so it’s essential to get all involved.
- Some preparation is necessary to be able to define and use
consumer driven contracts.
28 | Titel| 7. Juni 2019
28 | © GBTEC Software + Consulting AG 2019
Questions
Brace yourself, questions are incoming!
29 | Titel| 7. Juni 2019
29 | © GBTEC Software + Consulting AG 2019
Sources
- https://martinfowler.com/articles/consumerDrivenContracts.html
- https://reflectoring.io/7-reasons-for-consumer-driven-contracts/
- https://spring.io/projects/spring-cloud-contract
- https://docs.pact.io/
- https://en.wikipedia.org/wiki/Representational_state_transfer
- https://www.novatec-gmbh.de/en/blog/introduction-microservices-testing-
consumer-driven-contract-testing-pact/
- https://sketchingdev.co.uk/blog/consumer-driven-contracts-by-example.html
- https://www.youtube.com/watch?v=sAAklvxmPmk
- https://www.youtube.com/watch?v=-51Jlyrhskc&feature=youtu.be&t=19990
30 | Titel| 7. Juni 2019
30 | © GBTEC Software + Consulting AG 2019
GBTEC Software + Consulting AG
Gesundheitscampus-Süd 23
44801 Bochum
Internet www.gbtec.de
E-Mail info@gbtec.de

Contenu connexe

Similaire à Ensure the integration of Microservices with Consumer Driven Contracts

Why an innovative mobile strategy needs a robust API
Why an innovative mobile strategy needs a robust APIWhy an innovative mobile strategy needs a robust API
Why an innovative mobile strategy needs a robust API
Manmohan Gupta
 
Webinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided AnalyticsWebinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided Analytics
KNIMESlides
 

Similaire à Ensure the integration of Microservices with Consumer Driven Contracts (20)

All important terms in the BPM context simply explained.
All important terms in the BPM context simply explained.All important terms in the BPM context simply explained.
All important terms in the BPM context simply explained.
 
Business Utility Application
Business Utility ApplicationBusiness Utility Application
Business Utility Application
 
70% of GCC Projects not using Collaboration Software
70% of GCC Projects not using Collaboration Software70% of GCC Projects not using Collaboration Software
70% of GCC Projects not using Collaboration Software
 
abapGit Use Cases
abapGit Use CasesabapGit Use Cases
abapGit Use Cases
 
MuleSoft Meetup Valletta 1.0
MuleSoft Meetup Valletta  1.0MuleSoft Meetup Valletta  1.0
MuleSoft Meetup Valletta 1.0
 
IRJET- Developers Community-Devcom
IRJET- Developers Community-DevcomIRJET- Developers Community-Devcom
IRJET- Developers Community-Devcom
 
IBM Interconnect 2017 - Maximo update
IBM Interconnect 2017 - Maximo updateIBM Interconnect 2017 - Maximo update
IBM Interconnect 2017 - Maximo update
 
Estimation of a micro services based estimation application bhawna thakur -...
Estimation of a micro services based estimation application   bhawna thakur -...Estimation of a micro services based estimation application   bhawna thakur -...
Estimation of a micro services based estimation application bhawna thakur -...
 
MicroShed Testing
MicroShed TestingMicroShed Testing
MicroShed Testing
 
CWIN17 telford application integration and ap is - lisa eckersley
CWIN17 telford   application integration and ap is - lisa eckersleyCWIN17 telford   application integration and ap is - lisa eckersley
CWIN17 telford application integration and ap is - lisa eckersley
 
Contract testing TestCon 2019
Contract testing TestCon 2019Contract testing TestCon 2019
Contract testing TestCon 2019
 
Backend for Frontend in Microservices
Backend for Frontend in MicroservicesBackend for Frontend in Microservices
Backend for Frontend in Microservices
 
Appear IQ The Business Case for hybrid html5 mobile apps
Appear IQ The Business Case for hybrid html5 mobile appsAppear IQ The Business Case for hybrid html5 mobile apps
Appear IQ The Business Case for hybrid html5 mobile apps
 
Why an Innovative Mobile Strategy Requires a Robust API
Why an Innovative Mobile Strategy Requires a Robust API Why an Innovative Mobile Strategy Requires a Robust API
Why an Innovative Mobile Strategy Requires a Robust API
 
IRJET- Agriculture Business to Business Website
IRJET- Agriculture Business to Business WebsiteIRJET- Agriculture Business to Business Website
IRJET- Agriculture Business to Business Website
 
API's for innovative cloud and mobile apps
API's for innovative cloud and mobile appsAPI's for innovative cloud and mobile apps
API's for innovative cloud and mobile apps
 
Creation Of Social Group in Full Stack Progressive Apparel Purchasing Web App
Creation Of Social Group in Full Stack Progressive Apparel Purchasing Web AppCreation Of Social Group in Full Stack Progressive Apparel Purchasing Web App
Creation Of Social Group in Full Stack Progressive Apparel Purchasing Web App
 
Why an innovative mobile strategy needs a robust API
Why an innovative mobile strategy needs a robust APIWhy an innovative mobile strategy needs a robust API
Why an innovative mobile strategy needs a robust API
 
Mobile order management
Mobile order managementMobile order management
Mobile order management
 
Webinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided AnalyticsWebinar: Behind the Scenes on Guided Analytics
Webinar: Behind the Scenes on Guided Analytics
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Ensure the integration of Microservices with Consumer Driven Contracts

  • 1. 1 | Titel| 7. Juni 2019 1 | © GBTEC Software + Consulting AG 2019 Titelmasterformat durch Klicken bearbeiten Folienmaster Ingo Griebsch, Coding Architect @GBTEC Ensure the integration of Microservices with Consumer Driven Contracts
  • 2. 2 | Titel| 7. Juni 2019 2 | © GBTEC Software + Consulting AG 2019 @d0gb0t666 Coding Architect @GBTEC Husband and father of two Boardgame addict Love Clutch as well as Tricky Who am I ingogriebsch
  • 3. 3 | Titel| 7. Juni 2019 3 | © GBTEC Software + Consulting AG 2019 If anything is unclear or not understandable… What the heck is he talking about?
  • 4. 4 | Titel| 7. Juni 2019 4 | © GBTEC Software + Consulting AG 2019 Agenda 1. Terms and definitions 2. The problem 3. Possible solutions 4. Implementation 5. Conclusion
  • 5. 5 | Titel| 7. Juni 2019 5 | © GBTEC Software + Consulting AG 2019 Terms and definitions May I have your attention, please?
  • 6. 6 | Titel| 7. Juni 2019 6 | © GBTEC Software + Consulting AG 2019 Terms and definitions Microservices - are an architectural style that structures an application as a collection of services. - enable the continuous deployment of large, complex applications. - are highly maintainable and testable, loosely coupled and independently deployable.
  • 7. 7 | Titel| 7. Juni 2019 7 | © GBTEC Software + Consulting AG 2019 Terms and definitions (Microservices based) Application - is a software designed to perform a group of coordinated functions, tasks, or activities for the benefit of the user. - represents a suite of small services, each communicating with lightweight mechanisms, often a REST like API.
  • 8. 8 | Titel| 7. Juni 2019 8 | © GBTEC Software + Consulting AG 2019 Representational State Transfer (REST) - is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other. - Services implementing REST allow to access and manipulate textual representations of resources by using a uniform and predefined set of stateless operations. Terms and definitions
  • 9. 9 | Titel| 7. Juni 2019 9 | © GBTEC Software + Consulting AG 2019 Terms and definitions Application Programming Interface (API) - represents a set of clearly defined methods of communication among various components. - simplifies programming by abstracting the underlying implementation and only exposing objects or actions a developer needs. - is typically defined as a set of specifications, such as HTTP request messages, along with a definition of the structure of response messages, usually in an XML or JSON format.
  • 10. 10 | Titel| 7. Juni 2019 10 | © GBTEC Software + Consulting AG 2019 Terms and definitions Contract - represents an agreement between a producer and a consumer of an API how it will look like. Producer - is a service that exposes an API which is consumed by several services. Consumer - is a service that consumes the API of a producer.
  • 11. 11 | Titel| 7. Juni 2019 11 | © GBTEC Software + Consulting AG 2019 The problem Why is this broken (again)?
  • 12. 12 | Titel| 7. Juni 2019 12 | © GBTEC Software + Consulting AG 2019 The problem A producer provides a specific API which is available through REST and allows the access to specific resources hold inside the service.
  • 13. 13 | Titel| 7. Juni 2019 13 | © GBTEC Software + Consulting AG 2019 The problem A consumer wants to call the API of the producer through REST to receive some of the hold resources.
  • 14. 14 | Titel| 7. Juni 2019 14 | © GBTEC Software + Consulting AG 2019 The problem The consumer expects a specific API (for whatever reason) which is NOT implemented this way through the producer (not at all or not anymore).
  • 15. 15 | Titel| 7. Juni 2019 15 | © GBTEC Software + Consulting AG 2019 The problem There can be several reasons why the consumer expects an API which is not provided that way by the producer: - The producer changed the API because he did not (yet/anymore) expect the consumer. - The producer changed the API because of a requirement of another consumer. - The producer changed the API by accident. - The API is either incorrectly documented or not sufficiently documented. - Producer and consumer have talked past each other. - The consumer expects that the API should work that way.
  • 16. 16 | Titel| 7. Juni 2019 16 | © GBTEC Software + Consulting AG 2019 Possible solutions How could we solve this problem?
  • 17. 17 | Titel| 7. Juni 2019 17 | © GBTEC Software + Consulting AG 2019 Possible solutions When trying to test an application that communicates with other services then we could do one of the following things: - Deploy all microservices and perform end to end tests. - Mock other microservices in integration tests. - Define contracts to be able to generate and use real world mocks in integration tests.
  • 18. 18 | Titel| 7. Juni 2019 18 | © GBTEC Software + Consulting AG 2019 Possible solutions - Advantages - Simulates production. - Tests real communication between services. - Disadvantages - To test one microservice we would have to deploy several services, databases etc. - The environment where the tests would be conducted is locked during the tests. - Needs a long time to run the tests. - Very late feedback. Deploy all microservices and perform end to end tests
  • 19. 19 | Titel| 7. Juni 2019 19 | © GBTEC Software + Consulting AG 2019 Possible solutions - Advantages - Very fast feedback. - No infrastructure required. - Disadvantages - The consuming service creates mocks that might have nothing to do with reality. - You can go to production with passing tests and failing production. Mock other microservices in integration tests
  • 20. 20 | Titel| 7. Juni 2019 20 | © GBTEC Software + Consulting AG 2019 Possible solutions - Advantages (in addition to the already mentioned advantages) - Ensures that the mocks behave exactly like the actual producer is implemented. - Changes in contracts are immediately visible on both sides of the communication. - Promote acceptance test driven development method and Microservices architectural style. Define contracts to be able to generate and use real world mocks
  • 21. 21 | Titel| 7. Juni 2019 21 | © GBTEC Software + Consulting AG 2019 Implementation Let’s do it!
  • 22. 22 | Titel| 7. Juni 2019 22 | © GBTEC Software + Consulting AG 2019 Implementation Developers who implement the consumer and developers who implement the producer team up to define the contracts based on the needs of the consumer.
  • 23. 23 | Titel| 7. Juni 2019 23 | © GBTEC Software + Consulting AG 2019 Implementation The contracts will then bundled and stored in a repository. The repository is available for both the consumer and the producer.
  • 24. 24 | Titel| 7. Juni 2019 24 | © GBTEC Software + Consulting AG 2019 Implementation The producer uses the contracts from the repository to verify that the API it provides fulfills the contracts.
  • 25. 25 | Titel| 7. Juni 2019 25 | © GBTEC Software + Consulting AG 2019 Implementation The consumer uses the contracts from the repository to verify that they call the API in the way the producer provides.
  • 26. 26 | Titel| 7. Juni 2019 26 | © GBTEC Software + Consulting AG 2019 Conclusion Nothing to worry about, we are on a good way!
  • 27. 27 | Titel| 7. Juni 2019 27 | © GBTEC Software + Consulting AG 2019 Conclusion - Communication in a Microservices world is a complex problem. - There are solutions available which help you to effectively test the behavior of and communication between microservices. - Talk to each other! ;) Using APIs is something that can cross team boundaries, so it’s essential to get all involved. - Some preparation is necessary to be able to define and use consumer driven contracts.
  • 28. 28 | Titel| 7. Juni 2019 28 | © GBTEC Software + Consulting AG 2019 Questions Brace yourself, questions are incoming!
  • 29. 29 | Titel| 7. Juni 2019 29 | © GBTEC Software + Consulting AG 2019 Sources - https://martinfowler.com/articles/consumerDrivenContracts.html - https://reflectoring.io/7-reasons-for-consumer-driven-contracts/ - https://spring.io/projects/spring-cloud-contract - https://docs.pact.io/ - https://en.wikipedia.org/wiki/Representational_state_transfer - https://www.novatec-gmbh.de/en/blog/introduction-microservices-testing- consumer-driven-contract-testing-pact/ - https://sketchingdev.co.uk/blog/consumer-driven-contracts-by-example.html - https://www.youtube.com/watch?v=sAAklvxmPmk - https://www.youtube.com/watch?v=-51Jlyrhskc&feature=youtu.be&t=19990
  • 30. 30 | Titel| 7. Juni 2019 30 | © GBTEC Software + Consulting AG 2019 GBTEC Software + Consulting AG Gesundheitscampus-Süd 23 44801 Bochum Internet www.gbtec.de E-Mail info@gbtec.de