View
98
Download
1
Category
Preview:
Citation preview
Common Patterns
● Layered Architecture● Event-Driven Architecture● Microkernel Architecture● Microservices Architecture
●The most common architecture
●De-facto standard for most JEEApplications
●AKA - “N-Tier” architecture
The Architecture Sinkhole Anti-Pattern
● Requests flow through layers without processing
● Keep it to 80-20
Pattern Analysis
● Overall Agility - Low● Ease of Deployment - Low● Testability - High● Performance - Low● Scalability - Low● Ease of Development - High
Mediator Topology
● Events processing have multiple steps that require orchestration
● Four main components:o Event Queueso Event Mediatoro Event Channelso Event Processors
The Event Mediator
● For basic use cases:o Apache Camelo Spring Integrationo Mule ESB
● More Complex (BPEL):o Apache ODE
● Even More Complexo jBPM
Broker Topology
● No central event mediator● Message flows across processors in
a chain like fashion● Main components:o Message Brokero Event Processor
Pattern Analysis
● Overall Agility - High● Ease of Deployment - High● Testability - Low● Performance - High● Scalability - High● Ease of Development - Low
Microkernel● AKA Plugin Architecture Pattern● Natural for Product Based Apps● Consists of:o Core Systemo Plugins
● Can be embedded in other patterns
Pattern Analysis
● Overall Agility - High● Ease of Deployment - High● Testability - High● Performance - High● Scalability - Low● Ease of Development - Low
Microservices● Evolved from other patterns● Alternative to Monolithic
Applications and SOA Architecture● Still evolving● Many ways to implement
Core Concepts● Separately deployed units● Very Very small service components● Single purpose function or an
independent portion of functionality● Distributed● Loosely coupled ● Multiple versions are acceptable● Asynchronous● No Orchestration
DataBase● Central Database tends to become a
bottleneck● DB should be segregated among
services - without sharing● Service publishes conclusions - NOT
raw data
Pattern Analysis
● Overall Agility - High● Ease of Deployment - High● Testability - High● Performance - Low● Scalability - High● Ease of Development - High
Pattern ConsiderationsLayered Pattern A solid general purpose pattern - best when you are not sure.
Avoid the “Sinkhole Anti-Pattern”Tends to encourage Monolithic Applications
Event-Driven Relatively complex. Distributed architectures issues must be addressed, such as remote processor availability, lack of responsiveness, reconnection logic,and failure recovery.No transactions across processors. Difficult to create and maintain processor contracts
Microkernel Can be embedded and used within other patterns.Great support for evolutionary design and incremental development.Should always be the first choice for product-based applications
Microservices Easy to perform real-time production deployments.Very agile-oriented architectureShares complexity issues with data-driven pattern
Recommended