Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons
Attr...
Próxima SlideShare
Cargando en…5
×

Consumer Driven Contracts and Your Microservice Architecture

9.705 visualizaciones

Publicado el

My talk from SpringOnePlatform about Spring Cloud Contract

Links:
* http://martinfowler.com/articles/consumerDrivenContracts.html - article about Consumer Driven Contracts by Ian Robinson
* https://github.com/marcingrzejszczak/springone-cdc-client - code for the client side of the presented example
* https://github.com/marcingrzejszczak/springone-cdc-server - code for the server side of the presented example
* https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html - documentation of the Spring Cloud Contract project

Publicado en: Tecnología
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.ThesisScientist.com
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • This is Dr. Wakina’s season, the season he restores joy, peace and prosperity to broken relationships/marriages. He is the one and only spiritual healing doctor that has the power to do unimaginable things with his email:- dr.wakinalovetemple@gmail.com. With big faith and trust I have on Doctor I got results 7days after some inspirational spell cast that brought my husband back and made him realize his mistake for leaving us because of misunderstanding we usually had because of his affairs with his concubine. He realized after the spell that no woman is prettier than me or any woman that can love, care and satisfy him like I do. He realized he has a beautiful and promising family. I was not afraid contacting Dr. Wakina because I know he is one of the genuine spell doctors that can bring back my better half without negative effects. I am exited you read this wonderful testimony from a happy wife and mother. I pray and wish unending joy, peace and prosperity in your relationship/marriage… cheers!
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Welcome to the illuminati world of riches and fames Possess your riches today by joining the illuminati church of Satan created and organizing by our high priest ANTON SZANDOR LAVEY who is now in the bossom of the lord Lucifer, here is an opportunity for you today to join the illuminati and make all your heart desire come to pass by contacting us today with our contact id….. email us on Bavariaillumjnatitemple@gmail.com or call or whatsapp +2348034056542 Here is the benefit of becoming a born again child of the lord Lucifer A HOUSE IN ANY COUNTRY OF YOUR CHOICE NEW BRAND CARS OF YOUR CHOICE $50000000 AS A NEW MEMBER ILLUMINATI BIBLE ILLUMINATI RING OF POWERS ILLUMINATI GARMENT $10000000 AS YOUR MONTHLY PAYMENT $5000000 EVERY WEEK AS YOUR BLESSING FROM THE LORD LUCIFER AS A BORN AGAIN CHILD INTERNATIONAL PASSPORT FOR A VISIT TO ANY COUNTRY OF YOUR CHOICE
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Contact: drocusodospellcaster@gmail.com for Urgent lottery winner Fast, VERY POWERFUL:100% GUARANTEED RESULTS I want to use this opportunity to thank Dr.OCUSODO for helping me to win the lottery.I have been playing lottery for the past 8 years now and the only big money I have ever won was 800$ ever since then I have not been able to win again and I was so upset and I need help to win the lottery so I decided to go to a friend of mine call Robert,and he introduce me to Dr. OCUSODO, there I saw so many good talk about this man called Dr. OCUSODO of how he have cast spell for people to win the lottery.I contact him also and I tell him I want to win a lottery, he cast a spell for me which I use and I play and won 80million GBP. I am so grateful to this man just in case you also need him to help you win, you can contact him through his email: drocusodospellcaster@gmail.com is my part of promise I made, that if I win I tell the word how I win my game. drocusodospellcaster@yahoo.com or also call him or what-app +2349067457724.
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Do you utilize a pay~pal account ? in case if you have you can add an extra 1400 a week to your pay check only working on the internet for 3 hours a day, see this link●▬▬▬▬ஜ www.rulespro.com ஜ▬▬▬▬
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

Consumer Driven Contracts and Your Microservice Architecture

  1. 1. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Consumer Driven Contracts and Your Microservice Architecture By Marcin Grzejszczak @mgrzejszczak
  2. 2. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ About me • Spring Cloud developer • Working mostly on Spring Cloud Sleuth and Spring Cloud Contract • Automation freak Twitter: @mgrzejszczak Blog: http://toomuchcoding.com
  3. 3. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda • Introduction • Demo • Summary
  4. 4. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Introduction • Producer – service that exposes an API • Consumer – service that consumes the API of the producer • Contract – agreement between producer and consumer how the API will look like • Consumer Driven Contracts – approach where the consumer drives the changes of the API of the producer
  5. 5. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What are we going to code? • Consumer – service that gets beer requests – has to ask another service if the client can get the beer • Producer – service that checks if the client is old enough to buy beer • Feature – if the user is too young - the beer will not be sold – otherwise the beer will be granted
  6. 6. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DEMO
  7. 7. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Summary With Spring Cloud Contract and Consumer Driven Contracts: • we’ve created an API that suits the consumer and the producer • expectations were defined by readable contracts that were tested against the producer • producer stubs can be reused by consumers • starting and setting stubs is fully automated
  8. 8. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Summary - Consumer flow 1 Consumer • starts TDD - writes the test for the feature • clones producer code to change the API locally • in the cloned producer code converts contracts into stubs and installs them locally • in the consumer code turns Stub Runner to offline mode • configures Stub Runner to download stubs of the producer • red - green - refactor on the API and tests • repeats the process until the tests are green and API acceptable • files a PR to the producer with the contract proposal
  9. 9. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Summary - Producer flow Producer • takes over the PR • writes the missing implementation that will make the autogenerated tests pass • merges PR and deploys the JARs with the app and the stubs
  10. 10. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Summary - Consumer flow 2 Consumer • switches off the Stub Runner’s offline mode once the producer uploads the stubs • configure Stub Runner by providing the URL to a repo with stubs • will have its test broken if the producer makes any breaking changes of the API
  11. 11. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Why use Spring Cloud Contract Verifier? • Possibility to do CDC with messaging • Clear and easy to use, statically typed DSL • Automatic generation of tests from the defined Contract • Stub Runner functionality - the stubs are automatically downloaded at runtime from Nexus / Artifactory • Spring Cloud integration - no discovery service is needed for integration tests
  12. 12. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ QUESTIONS?
  13. 13. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ● http://martinfowler.com/articles/consumerDrivenContracts.html - article about Consumer Driven Contracts by Ian Robinson ● https://github.com/marcingrzejszczak/springone-cdc-client - code for the client side of the presented example ● https://github.com/marcingrzejszczak/springone-cdc-server - code for the server side of the presented example ● https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html - documentation of the Spring Cloud Contract project Thank you!
  14. 14. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Learn More. Stay Connected. https://gitter.im/spring-cloud/spring-cloud-contract @springcentral spring.io/blog @pivotal pivotal.io/blog @pivotalcf http://engineering.pivotal.io

×