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

My upcoming Manning LiveProject: Developing a s...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

My upcoming Manning LiveProject: Developing a service template and microservice chassis

Learn about the Service template and Microservice chassis patterns and my upcoming Manning LiveProject.

Chris Richardson PRO

March 15, 2022

Transcript

34 slides
  1. @crichardson Service template and Microservice chassis Chris Richardson Founder of

    Eventuate.io Founder of the original CloudFoundry.com Author of POJOs in Action and Microservices Patterns @crichardson [email protected] adopt.microservices.io Copyright © 2022. Chris Richardson Consulting, Inc. All rights reserved
  2. @crichardson Presentation goal What are the Service template and Microservice

    chassis patterns A walk through the Live Project series Demo the service template
  3. @crichardson Agenda About the Service Template pattern About the Microservice

    Chassis pattern Live project series: developing a service template and chassis Demoing a service template
  4. @crichardson But what about start.spring.io? Convenient BUT Code generator =

    copy/paste programming Focussed on the Spring Boot ecosystem Simplistic, single Gradle project Generic and flexible - not tailored to your organization’s requirements or standards No sample business logic
  5. @crichardson Using a service template to create a new service

    $ gh clone —private —template myorg/service-template my-new-service $ cd my-new-service
  6. @crichardson What you get: build logic Build logic Gradle dependencies

    { …. } Gradle Plugin configuration Other build logic: GitHub Actions, scripts, …
  7. @crichardson What you get: sample code Sample application logic Domain

    logic: entities, repositories, services, …. Adapters: HTTP Controllers, … Tests
  8. @crichardson Agenda About the Service Template pattern About the Microservice

    Chassis pattern Live project series: developing a service template and chassis Demoing a service template
  9. @crichardson A service template (or code generator) = copy/paste Changing

    requirements = update each service individually
  10. @crichardson When requirements change For example: new version of log4j2

    Update microservice chassis and publish a new version Update service template to use new version Update each service to use new version One line change
  11. @crichardson Agenda About the Service Template pattern About the Microservice

    Chassis pattern Live project series: developing a service template and chassis Demoing a service template
  12. @crichardson About the Live Project Series Service Template Service Chassis

    Skeleton application Implement security Package as Docker container Create a microservice chassis Configure observability Live project series
  13. @crichardson Starting point = skeleton application Spring Boot Spring Data

    for JPA Example entity and repository Persistence tests use Testcontainers to run MySQL container …
  14. Live project 1: configure observability Observability = key part of

    production readiness An observable service exposes its internal state to enable monitoring, and troubleshooting Milestones https://microservices.io/patterns/#observability
  15. Live project 2: implement security Secure the service API with

    JSON Web Tokens (JWTs) Milestones https://microservices.io/patterns/#observability
  16. Live project 3: Package as a Docker container Build, test

    and publish a Docker container image to Github container registry Milestones
  17. Live project 4: Create a microservice chassis Extract the service

    chassis framework for the service template Milestones
  18. @crichardson Agenda About the Service Template pattern About the Microservice

    Chassis pattern Live project series: developing a service template and chassis Demoing a service template
  19. Summary: My new Live Project series teaches you how to

    develop a service template and chassis The service template pattern: Runnable source template for a service Accelerates the creation of a new service Implements plumbing, build logic, …. Built on a Microservice chassis The Microservice chassis pattern Contains the bulk of the plumbing, build logic, …. Minimizes copy/paste duplication in the service template Simplifies maintenance of services

More Decks by Chris Richardson

Other Decks in Programming