
Explore microservice architecture and patterns that enable frequent, reliable backend delivery and easier tech stack updates. This course uses Java Spring and demonstrates practical design patterns for building scalable microservices.
Explore microservice patterns and architecture from development to deployment, using Java Spring samples and a Postman collection, with REST API, message broker, and API gateway, plus reference materials.
Master this course by applying practical tips: watch five to ten minute segments, pause to understand and replicate code, use subtitles and playback speed, and use Q&A and Stack Overflow.
Explore why microservice architecture gains momentum but isn't a magical bullet; learn decomposition into independently deployable services with clear boundaries, patterns, and when to start with monolith.
Explore decomposing a microservice pattern and architecture into independent services by business capability or domain, map capabilities to services, and apply bounded contexts and ubiquitous language for data consistency.
Assign each team ownership of a service to develop, test, deploy, and scale its codebase for business capabilities, while negotiating APIs with teams, keeping teams around 5 to 10 people.
Explore microservice backends with Java Spring Boot and Spring Cloud through sample projects—employee movement, industrial relation, payroll compensation, performance management, and organization development—with PostgreSQL, JPA, REST APIs, and Docker Compose.
Install and run docker to simplify software installation. Use docker images and containers, and docker-compose to spin up zookeeper, kafka, and consul, with memory guidance across Windows, Mac, and Linux.
Run sample source code by launching each human resource microservice as a Spring Boot app in Eclipse, and use the 'Microservice Pattern' launch group to start all; test with Postman.
Standardize microservice development with a chassis template to speed setup, enable consistent code structure, and integrate cross-cutting concerns like external configuration, logging, and security.
Create a spring boot microservice chassis using spring initializr, enable external configuration with microservice.yml, configure logging and security, implement global exception handling, and auto generate api documentation with springdoc.
Explore api gateway and service mesh as separated node alternatives to microservice chassis for implementing cross cutting concerns, handling north-south and east-west traffic with sidecar proxies, language independent rest backends.
Organize microservice source code with hexagonal architecture and CQS patterns, using ports and adapters and inbound/outbound adapters to decouple business logic from data access and support multi-broker communication.
Explore a sample Java package design for microservices, detailing api, server, client, command and query, entity and repository, and broker packages, plus hexagonal architecture and javadoc generation.
Explore inter-process communication between services, including synchronous REST/RPC and asynchronous message brokers like Kafka or RabbitMQ, with a payroll example via Industrial Relation and payroll services.
Explore inter process communication with Spring OpenFeign for synchronous rest calls and Kafka messaging for asynchronous flows between industrial relation and payroll microservices, including configuration and sample code.
Explore synchronous rest api with testing ease and tight coupling, versus asynchronous broker messaging offering resilience, scalability, and retries.
Discover how service discovery locates dynamic microservice instances behind load balancers by using a registry like Consul or Eureka, with self-registration and health checks.
Learn how to implement service discovery with consul and feign in a microservice architecture, registering payroll-compensation services, load balancing across two instances, and routing unpaid-leave requests via consul-backed clients.
Learn how to handle errors in distributed microservices, using circuit breaker for synchronous calls and dead letter topic for asynchronous messaging, with retry strategies and Spring Retry examples.
Demonstrate synchronous error handling with Feign client, circuit breaker, and Spring Retry across employee movement and industrial relation services, plus dead letter topic handling in Spring Kafka.
Explore Resilience4j integration for Java Spring Cloud apps, implementing circuit breaker and retry with feign client, including open, half-open, and closed states, fallbacks, and actuator health monitoring.
learn how change data capture via database log tailing tracks committed database operations and reliably publishes messages to a broker using Debezium and Apache Kafka.
Tail PostgreSQL transaction logs with Debezium to publish changes to Kafka and process them through a Spring Data JPA and Spring Data REST workflow for employee_assignment.
Explore a polling publisher as an alternative to database log tailing, with API writes to transaction and outbox tables, and relay that reads outbox to publish to a message broker.
Learn to implement polling with Spring JPA and Spring Kafka, using an outbox pattern to publish json changes from PostgreSQL to Kafka.
Explore the saga pattern for coordinating multi-service transactions using asynchronous messaging, detailing choreography and orchestration approaches with a message broker and topic-based communication across payment, bank, and accounting services.
Explore a choreographed saga across performance management, payroll‑compensation, and organization‑development microservices, using Spring JPA, PostgreSQL, and Spring Kafka to finalize appraisal from on progress to approved.
Explore a saga orchestration across three microservices—performance management, payroll compensation, and organization development—using Spring JPA with PostgreSQL and Spring Kafka to approve appraisals, pay and record bonuses, and finalize status.
Understand saga error handling using compensation instead of rollback, with data preparation, asynchronous messaging via a message broker, and orchestration versus compensation strategies across bank, payment, and accounting services.
Explore a choreography saga with error handling across microservices, using compensating transactions to recover from a simulated performance appraisal failure and bonus history updates via Kafka topics.
Demonstrates saga orchestration with error handling in a performance appraisal workflow, showing how the orchestrator triggers compensating actions for pay bonus and record bonus via blue, orange, and green topics.
Choreography saga is simpler to implement but distributes logic and risks cyclic dependencies, making the flow hard to observe; orchestration centralizes the flow with looser coupling for growing participants.
Analyze how microservices with own databases use views, API composition, and CQRS with a change data event to expose payment history, balancing fast queries against complexity and inconsistencies.
Master CQRS as an evolution of CQS by separating command and query sides. Use transactional outbox to couple data changes with event publishing and manage saga and hotfix risks.
Implement cqrs with a transactional outbox using spring jpa, postgresql, debezium, and kafka. Create a performance history report by aggregating data from performance management and payroll across a choreography saga.
Learn how to handle large result sets in microservices by implementing pagination to return only a subset of data, using page and size parameters to improve performance and avoid timeouts.
Learn to manage large data sets with a Spring JPA and PostgreSQL sample, creating dummy data and retrieving paginated results via Spring Data REST and Postman using page and size.
Define event sourcing as storing changes as events, use commands to trigger events, and replay events to reconstruct state and provide an audit trail with aggregates.
Explore event sourcing with Axon through a sample funding scenario for a club. Learn to create, add, and deduct funds using commands, event sourcing handlers, and an Axon event store.
Before you purchase:
The course will be focused on architecture & microservice patterns, not how to hand-code the application.
You will get full source code (downloadble). I will explain the code & algorithm, but we will not learn how to code line-by-line.
To get full understanding of sample code, you must know how to code with Java Spring.
Basic spring programming with REST API is NOT covered in this course.
If you need to know the concept, you don't need to know Spring programming
-------------------------------------------------------------------------------------------------------------------------------------------
Microservice architecture has become general choice for modern application development. It solves certain problems, although it is not a solution for ecerything.
When using microservice, complexity shifts, and mindset change required. Technical challenges will arise and must be addressed. Fortunately, many people already facing the same technical challenges and developed a solution. These solutions become common patterns to solve thes problems. Thus, it become design patterns for microservices architecture.
There are many patterns to design and implement microservices.
Microservices is -by nature- distributed system, thus some technical challenges comes from this nature. Communication among services in distributed places require different approach to works efficiently. In this course, we will learn many things :
what is microservice architecture
microservice chassis to boost productivity
organize clean & standard microservice code
communication among services : synchronous, asynchronous
service discovery
handling communication error
synchronize data & keeping data integrity on transaction which involves several distributed services
capture changed data in real time, in reliable way
querying data from multiple services
event sourcing, replaying data flow
API gateway concept
composing several API
cache
monitoring services
tracing call chain that involves several services
centralized log & exception tracking
deploy the application as docker container
This course will be delivered with full sample code using Java Spring Boot & Spring Cloud.
Several other tools that we will use on this course :
Apache Kafka (will use a lot of this!)
MySQL
Debezium
Docker
Hashicorp Consul
Hashicorp Vault
Elasticsearch
Logstash
Kibana
Zipkin
Kong API management
Important!
This course uses Spring Boot version 2.x.
On late November 2022, Spring Boot 3.0.0 released. It takes time for updating the course to Spring boot 3.0.0, but I will do my best.
In the meantime, you have several options:
works with latest version of Spring boot 2.x, and the course should full compatible
works with Spring boot 3.x. Most of the courses should works, but some parts might need adjustment.