Microservices Patterns, Second Edition teaches you how to develop, test, and deploy production-quality microservices. In it, microservices architecture pioneer Chris Richardson presents dozens of battle-tested patterns that solve recurring microservices problems. Far more than just a patterns catalog, this book takes a balanced, pragmatic, and sometimes skeptical approach to microservices that explores both benefits and drawbacks, and when (and when not) to use them. This updated second edition incorporates lessons learned from nearly a decade of microservices adoption across industries, including sage advice on when to use microservices and how to design right-sized services. You’ll appreciate the book’s focus on architecture fundamentals and decision making, the core benefits of the microservices architectural style, including fast-flow development, service collaboration, deployment, and more.
E-commerce takeout company FTGO is ready to move to a microservices-based architecture. In this liveProject series, you’ll be helping them overcome one of the biggest hurdles: deploying all their services to Kubernetes. Stepping into FTGO’s senior architect role, you’ll start by deploying the app’s key infrastructure services, including PostgreSQL and Apache Kafka, on a Kubernetes cluster running on your laptop. From there, you’ll use the Helm package manager for Kubernetes to package the applications and Flux, a GitOps tool, to deploy your services. Finally, you’ll create an AWS EKS cluster and deploy the services to the cloud. When you’re done, you’ll have accomplished one of the most challenging—and most lucrative—tasks you can undertake as a developer! While you'll utilize Java/Kotlin tooling in these liveProjects, the skills you learn can be applied to any language.
FGTO is almost ready to deploy their Kubernetes application—they just need you to help them create a Kubernetes cluster for their production environment. The simplest and most reliable way to do this is to use a managed Kubernetes service, and for this liveProject, you’ll use AWS EKS. You’ll work with various tools, including Terraform and Crossplane, to create and configure the cluster. Terraform helps you configure your cluster with just a small amount of code, while Crossplane ensures you can provision the service and its infrastructure using only Kubernetes manifests. Once the application is deployed, you’ll work to encrypt secrets in Git using SOPS and AWS KMS and promote changes from development to production on EKS. When you’re done, FGTO will have a complete working Kubernetes deployment!
Takeout e-commerce company FTGO currently manages their Kubernetes microservices deployments from the command line. So there’s no record of who has deployed what, and it’s very difficult to reproduce past states. Your goal in this liveProject is to help them with a GitOps-based continuous deployment pipeline for their platform. You’ll utilize Flux to establish and build your pipeline and configure the Flagger tool to use the traffic management features of the Linkerd service mesh.
Takeout company FTGO has a problem with its Kubernetes-based application—its services are still deployed using vanilla Kubernetes manifests. This makes it hard to tailor services to environments and automatically declare a service’s dependencies. You’ve stepped in to help them—by utilizing Helm, a Kubernetes package manager. You’ll get hands-on experience creating Helm charts for services, configuring deployment pipelines to seamlessly publish them to Helm repositories, and mastering the art of deploying and upgrading services packaged as Helm charts.
In this liveProject, you’ll help takeout delivery company FTGO Inc. take their first steps in moving to a microservices-based architecture. You’ll begin by creating Kubernetes manifests that enable you to deploy your services and their required infrastructures, such as databases, within a cluster environment. You'll use the package manager Helm to seamlessly install and manage infrastructure services like Postgres and Apache Kafka and use kind (Kubernetes in Docker) to create a local Kubernetes cluster that runs on your machine. Finally, you’ll see how GitHub Actions can automate your testing process.
In this series of liveProjects, you’ll step into the shoes of a Java/Kotlin developer building a microservices-based application using Kotlin. To eliminate duplication and gratuitous differences that arise when developing multiple services, you’ll define a Spring Boot and Docker-based microservice service template and microservice chassis. Together, these components enable you and your colleagues to quickly and easily create production-ready services. Throughout the liveProjects in this series, you’ll develop key features of the microservice chassis and service template including observability, security, and Docker deployment.
Make your Java/Kotlin developer colleagues’ lives easier by enabling them—and you!—to quickly maintain services that were cloned from the service template. In this liveProject, you’ll extract a microservice chassis from the service template project, create Gradle plugins, and publish chassis artifacts and template source code. When you’re done, you’ll have a small service template project that uses a much larger microservice chassis framework. (Your colleagues will thank you!) Work will be done in Kotlin.
In this liveProject, you’ll progressively enhance a service template, starting with packaging it as a container image. Next, you’ll build and run a service template container with Docker Compose, write component tests for a service, and finally build and test a container image. When you’re finished, you’ll have a Github repository that automatically pushes a tested container image to a Docker registry. This project focuses on Kotlin.
In this liveProject, you’ll add security-related features to the service template. In your role as a Java/Kotlin developer, you’ll gain hands-on Kotlin experience implementing authentication and authorization of a service’s REST API using JSON Web Tokens (JWTs) as well as a Security Token Service, such as Keycloak, to issue and authenticate JWTs.
In this liveProject, you’ll take on the role of a Java/Kotlin developer tasked with implementing the service template’s observability-related features—key aspects of production-readiness—including a health check API, application metrics, and distributed tracing. Work will be done in Kotlin.
Microservices Patterns teaches you how to develop and deploy production-quality microservices-based applications. This invaluable set of design patterns builds on decades of distributed system experience, adding new patterns for writing services and composing them into systems that scale and perform reliably under real-world conditions. More than just a patterns catalog, this practical guide offers experience-driven advice to help you design, implement, test, and deploy your microservices-based application.
There is agreement in the Java community that EJBs often introduce more problems than they solve. Now there is a major trend toward lightweight technologies such as Hibernate, Spring, JDO, iBATIS, and others, all of which allow the developer to work directly with the simpler Plain Old Java Objects, or POJOs. Bowing to the new consensus, EJB 3 now also works with POJOs.
POJOs in Action describes these new, simpler, and faster ways to develop enterprise Java applications. It shows you how to go about making key design decisions, including how to organize and encapsulate the domain logic, access the database, manage transactions, and handle database concurrency.