Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spring Cloud Contract Introduction

Spring Cloud Contract Introduction

Presented for JVM Meetup #11: Spring 5 Party

Wednesday, 21st February 2018 @Allianz Tower

Alex Xandra Albert Sim

February 21, 2018
Tweet

More Decks by Alex Xandra Albert Sim

Other Decks in Technology

Transcript

  1. Disclaimer Presentations are intended for educational purposes only and not

    to replace independent professional judgment. The views and opinions expressed in this presentation do not necessarily reflect the official policy or position of blibli.com. Audience discretion is advised.
  2. Who Am I? • Alex Xandra Albert Sim • Principal

    R&D Engineer at blibli.com • [email protected] • bertzzie(.sim)
  3. Our Current System • Hundreds of microservices • All on

    the JVM, except UIs and Mobile • Most are on Spring Framework
  4. Provider Contract • The service defines the interface, everyone use

    it • Close and complete • Singular and authoritative • (Usually) stable and immutable
  5. The Microservice Problem • Managing Changes • How are people

    using my service(s)? • Stubs / Mocks. TONS of it. • Release Engineering requires 5 PHDs, 3 geniuses, and 1 Norse God • Short Release Cycle and Continuous Delivery only available in Wakanda • QA L
  6. Consumer Contract • Consumers define their interfaces to the service

    • There’s still conventions and limits (duh) • Open and incomplete • Multiple and non-authoritative • (Usually) stable and immutable
  7. Consumer Driven Contract - How does it work? 1. Each

    consumer write their executable tests 2. Producer reviews and approves the tests written 3. Producer test against the tests and make sure it all passes PS. The test could be on separate repo or on producer’s
  8. Why Consumer Driven? • Service providers now know how their

    service is used • Evolving the service is easier • Could be easily integrated to CI / CD systems • Better confidence in each release • No more manual stub / less mocks