Getting Started
Get a basic understanding of the course.
We'll cover the following
Course introduction
Over the years, we have used common patterns and principles for designing and implementing integration applications when programming in Java or .NET, or creating endpoints. These are messaging patterns, SOA patterns, cloud patterns, microservices patterns, resiliency patterns, and others. It is important to classify and be aware of them and understand their costs and benefits to make informed design decisions.
Patterns evolve over time. With the advance of technology, hardware gets faster, compilers get more intelligent, and new languages and paradigms get created. The business wants to go faster and adapt more rapidly to the changing world. All of these forces are catalysts for new languages, frameworks, patterns, and best practices. The Gang of Four (GoF) design patterns today can become AntiPatterns tomorrow. Consider the Singleton pattern and the Double-Checked Locking pattern: we hardly use them today as the Singleton creates hard-to-unit-test classes, and there are now better-performing methods for concurrent programming than the Double-Checked Locking pattern. We must believe that there are no best practices, only good practices in context. This line of thinking should also be applied to the patterns in this course. Read through these patterns, and before using one, think about whether it adds more value than the effort it requires. We should not be afraid of creating our own pattern if it doesn’t.
Lesson layout
It is worth setting expectations from the beginning by saying that this course does not follow any specific pattern description language. Each chapter has the following structure:
-
Name: The pattern’s name
-
Intent: A short description of the pattern
-
Context and problem: When and how the problem manifests itself
-
Forces and solution: How the pattern solves the problem
-
Mechanics: The Camel-specific details related to the pattern
As much as is practical, diagrams are used to depict the essence of the use cases and patterns. The icons in the Enterprise Integration Patterns language are used as the primary notation in the diagrams, rather than relying on Camel DSL, pseudocode, or UML. At the end of each lesson, there is a short quiz to test your knowledge.
Course structure
The next lesson contains an alphabetically ordered list of all the patterns discussed in this course along with a mind map. The rest of the course is structured as described below.
The following illustration gives an overview of the hierarchy used in this course:
A pattern does not always fit into one category. Depending on the intent, the same pattern may have various implications and contribute to multiple categories. The course will discuss three pattern categories as follows:
- Foundational patterns
The patterns in this category are used for structuring and organizing the integration flow, primarily for the happy path scenarios.
The following are the patterns discussed under this category:
- VETRO pattern
- Canonical Data Model pattern
- Command Query Responsibility
- Segregation pattern
- Reusable Route pattern
- Runtime Reconfiguration pattern
- External Configuration pattern
- Error Handling patterns
The patterns under this category are focused on error handling, error prevention, and recovery. These are the patterns and principles used for designing the integration flow for the unhappy paths.
The following are the patterns discussed under this category:
- Data Integrity pattern
- Saga pattern
- Idempotent Filter pattern
- Retry pattern
- Throttling pattern
- Circuit Breaker pattern
- Error Channel pattern
- Deployment patterns
Having designed integration flows considering the happy and unhappy paths, the next step is to take a higher-level view and consider how and why these integration flows are interacting with each other. The patterns in this category are not focused on the structure of individual services but rather on the structure of the distributed system as a whole.
The following are the patterns discussed under this category:
- Service Instance pattern
- Singleton Service pattern
- Load Leveling pattern
- Parallel Pipeline pattern
- Bulkhead pattern
- Service Consolidation pattern