Facebook Pixel
Searching...
English
EnglishEnglish
EspañolSpanish
简体中文Chinese
FrançaisFrench
DeutschGerman
日本語Japanese
PortuguêsPortuguese
ItalianoItalian
한국어Korean
РусскийRussian
NederlandsDutch
العربيةArabic
PolskiPolish
हिन्दीHindi
Tiếng ViệtVietnamese
SvenskaSwedish
ΕλληνικάGreek
TürkçeTurkish
ไทยThai
ČeštinaCzech
RomânăRomanian
MagyarHungarian
УкраїнськаUkrainian
Bahasa IndonesiaIndonesian
DanskDanish
SuomiFinnish
БългарскиBulgarian
עבריתHebrew
NorskNorwegian
HrvatskiCroatian
CatalàCatalan
SlovenčinaSlovak
LietuviųLithuanian
SlovenščinaSlovenian
СрпскиSerbian
EestiEstonian
LatviešuLatvian
فارسیPersian
മലയാളംMalayalam
தமிழ்Tamil
اردوUrdu
Software Architecture Patterns

Software Architecture Patterns

by Mark Richards 2015 47 pages
3.64
100+ ratings
Listen
Listen

Key Takeaways

1. Layered Architecture: The Foundation

The layered architecture pattern closely matches the traditional IT communication and organizational structures found in most companies, making it a natural choice for most business application development efforts.

Common and Familiar. The layered architecture, also known as the n-tier architecture, is the most common pattern, widely used in Java EE applications. It organizes components into horizontal layers, each with a specific role, such as presentation, business, persistence, and database. This structure mirrors traditional IT organizational structures, making it a natural fit for many business applications.

Separation of Concerns. Each layer handles specific logic, promoting modularity and making it easier to develop, test, and maintain applications. For example, the presentation layer deals with user interface logic, while the business layer handles business rules. This separation allows for clear roles and responsibilities, simplifying development and maintenance.

  • Layers of isolation: Changes in one layer generally don't affect other layers.
  • Closed layers: Requests must go through each layer sequentially.
  • Open layers: Allow bypassing certain layers for efficiency.

Monolithic Tendencies. While simple to implement, the layered architecture often leads to monolithic applications, which can be difficult to scale and deploy. This can result in tightly coupled components, making changes cumbersome and requiring redeployment of large portions of the application. This pattern is a good starting point but may not be suitable for complex, high-scalability needs.

2. Event-Driven Architecture: Asynchronous Agility

The event-driven architecture pattern is a popular distributed asynchronous architecture pattern used to produce highly scalable applications.

Decoupled and Scalable. The event-driven architecture is a distributed, asynchronous pattern ideal for highly scalable applications. It uses decoupled, single-purpose event processing components that react to events. This pattern comes in two main topologies: mediator and broker. The mediator topology uses a central mediator to orchestrate events, while the broker topology chains events without a central mediator.

Mediator vs. Broker. The mediator topology is suitable for complex events requiring orchestration, using event queues, a mediator, event channels, and event processors. The broker topology is better for simpler event flows, distributing the message flow across event processors through a message broker.

  • Mediator: Centralized orchestration, good for complex workflows.
  • Broker: Decentralized, good for simple event chains.
  • Asynchronous: Enables high performance through parallel operations.

Complex Implementation. Implementing the event-driven architecture can be complex due to its distributed nature, requiring careful consideration of issues like remote process availability and error handling. It also lacks atomic transactions across event processors, requiring careful design of event granularity. Despite the complexity, it offers high agility and scalability.

3. Microkernel Architecture: Product Extensibility

The microkernel architecture pattern (sometimes referred to as the plug-in architecture pattern) is a natural pattern for implementing product-based applications.

Core and Plug-ins. The microkernel architecture, also known as the plug-in architecture, is ideal for product-based applications. It consists of a core system with minimal functionality and plug-in modules that add specialized features. This pattern allows for extensibility, flexibility, and isolation of application features.

Extensibility and Isolation. The core system contains basic business logic, while plug-in modules provide custom code and additional features. Plug-ins are independent, allowing for easy addition, removal, and modification without affecting the core system.

  • Core system: Minimal functionality, general business logic.
  • Plug-in modules: Specialized processing, custom code.
  • Plug-in registry: Manages available plug-ins.

Evolutionary Design. This pattern supports evolutionary design and incremental development, allowing for the addition of features over time without significant changes to the core system. It is a good starting point for product-based applications, offering control over which users get which features. However, it can be complex to implement due to contract governance and plug-in connectivity choices.

4. Microservices Architecture: Independent Scalability

The microservices architecture pattern is quickly gaining ground in the industry as a viable alternative to monolithic applications and service-oriented architectures.

Separately Deployed Units. The microservices architecture is characterized by separately deployed service components, enabling easier deployment, increased scalability, and high decoupling. Service components can vary in granularity, from single-purpose functions to independent portions of a large application. This pattern evolved from issues with monolithic and SOA applications.

API, Application, and Messaging. There are three main topologies: API REST-based, application REST-based, and centralized messaging. The API topology uses fine-grained services accessed through a web API, while the application topology uses larger services accessed through a web application. The messaging topology uses a message broker for remote access.

  • API REST: Fine-grained services, web API access.
  • Application REST: Coarse-grained services, web application access.
  • Centralized Messaging: Message broker for remote access.

Avoid Orchestration. A key challenge is determining the correct granularity of service components to avoid orchestration. Inter-service communication should be minimized, and shared functionality can be duplicated across services. This pattern offers high agility, scalability, and testability, but can be complex due to its distributed nature.

5. Space-Based Architecture: Extreme Scalability

The space-based architecture pattern is specifically designed to address and solve scalability and concurrency issues.

In-Memory Data Grids. The space-based architecture, also known as the cloud architecture, is designed for extreme scalability and concurrency. It removes the central database bottleneck by using replicated in-memory data grids. Processing units can be dynamically started and shut down based on user load, providing variable scalability.

Processing Units and Middleware. The architecture consists of processing units containing application components, in-memory data grids, and a replication engine. Virtualized middleware manages housekeeping and communications, including messaging, data, and processing grids, and a deployment manager.

  • Processing unit: Application components, in-memory data grid.
  • Virtualized middleware: Manages requests, data replication, and deployment.
  • Messaging grid: Manages input requests and session information.

Scalability and Concurrency. The data grid replicates data between processing units, ensuring each unit has the same data. The messaging grid forwards requests to available processing units. This pattern is ideal for high-volume applications with variable user loads, providing near-infinite scalability by removing the database bottleneck.

6. Choosing the Right Pattern: Context is Key

Knowing the characteristics, strengths, and weaknesses of each architecture pattern is necessary in order to choose the one that meets your specific business needs and goals.

No One-Size-Fits-All. There is no single best architecture pattern; the right choice depends on the specific needs and goals of the application. Each pattern has its strengths and weaknesses, and understanding these is crucial for making informed decisions. Consider factors like scalability, agility, performance, and ease of development.

Contextual Factors. The layered architecture is a good starting point but may not be suitable for high-scalability needs. The event-driven architecture is ideal for asynchronous, scalable applications. The microkernel architecture is best for product-based applications. The microservices architecture is suitable for independent scalability, and the space-based architecture is for extreme scalability.

  • Layered: Good starting point, but can be monolithic.
  • Event-driven: Asynchronous, scalable, complex.
  • Microkernel: Product-based, extensible, complex.
  • Microservices: Independent scalability, distributed.
  • Space-based: Extreme scalability, in-memory data.

Justify Decisions. As an architect, you must justify your architecture decisions, particularly when choosing a specific pattern. The goal is to select the pattern that best aligns with your business needs and goals, considering the trade-offs of each option. Understanding the characteristics of each pattern is essential for making the right choice.

7. Architecture Anti-Patterns: Pitfalls to Avoid

Applications lacking a formal architecture are generally tightly coupled, brittle, difficult to change, and without a clear vision or direction.

Big Ball of Mud. The "big ball of mud" anti-pattern occurs when applications lack a formal architecture, resulting in unorganized source code with unclear roles and responsibilities. This leads to tightly coupled, brittle applications that are difficult to change and maintain.

Architecture Sinkhole. The "architecture sinkhole" anti-pattern occurs when requests flow through multiple layers with little or no logic performed in each layer. This results in inefficient processing and can indicate that the layered architecture is not being used effectively.

  • Big ball of mud: Lack of formal architecture, unorganized code.
  • Architecture sinkhole: Pass-through processing, inefficient layers.
  • Tightly coupled: Interdependencies between components, difficult to change.

Consequences of Poor Architecture. Poor architecture choices lead to applications that are difficult to scale, test, and deploy. It is important to understand the trade-offs of each architecture pattern and choose the one that best fits the specific needs of the application. Avoiding these anti-patterns is crucial for building robust and maintainable systems.

Last updated:

Review Summary

3.64 out of 5
Average of 100+ ratings from Goodreads and Amazon.

Software Architecture Patterns receives mostly positive reviews, with an average rating of 3.64/5. Readers appreciate its concise overview of common architecture patterns, clear explanations, and useful comparisons. The book's brevity is seen as both a strength and weakness, providing a quick introduction but lacking depth. Many find it valuable for beginners and as a refresher for experienced developers. Some criticize outdated examples and controversial pattern analyses. Overall, it's recommended as a starting point for understanding software architecture concepts.

Your rating:

About the Author

Mark Richards is an author known for his work on software architecture. His book "Software Architecture Patterns" is a concise guide to common architectural patterns in software development. Richards provides clear explanations and comparisons of different patterns, making complex concepts accessible to readers. His writing style is praised for its brevity and clarity, making it suitable for both beginners and experienced developers seeking a quick refresher. While some readers note limitations in the book's depth, Richards' approach is generally well-received for offering a solid foundation in software architecture principles.

Download PDF

To save this Software Architecture Patterns summary for later, download the free PDF. You can print it out, or read offline at your convenience.
Download PDF
File size: 0.19 MB     Pages: 10

Download EPUB

To read this Software Architecture Patterns summary on your e-reader device or app, download the free EPUB. The .epub digital book format is ideal for reading ebooks on phones, tablets, and e-readers.
Download EPUB
File size: 2.93 MB     Pages: 11
0:00
-0:00
1x
Dan
Andrew
Michelle
Lauren
Select Speed
1.0×
+
200 words per minute
Create a free account to unlock:
Requests: Request new book summaries
Bookmarks: Save your favorite books
History: Revisit books later
Ratings: Rate books & see your ratings
Try Full Access for 7 Days
Listen, bookmark, and more
Compare Features Free Pro
📖 Read Summaries
All summaries are free to read in 40 languages
🎧 Listen to Summaries
Listen to unlimited summaries in 40 languages
❤️ Unlimited Bookmarks
Free users are limited to 10
📜 Unlimited History
Free users are limited to 10
Risk-Free Timeline
Today: Get Instant Access
Listen to full summaries of 73,530 books. That's 12,000+ hours of audio!
Day 4: Trial Reminder
We'll send you a notification that your trial is ending soon.
Day 7: Your subscription begins
You'll be charged on Mar 1,
cancel anytime before.
Consume 2.8x More Books
2.8x more books Listening Reading
Our users love us
50,000+ readers
"...I can 10x the number of books I can read..."
"...exceptionally accurate, engaging, and beautifully presented..."
"...better than any amazon review when I'm making a book-buying decision..."
Save 62%
Yearly
$119.88 $44.99/year
$3.75/mo
Monthly
$9.99/mo
Try Free & Unlock
7 days free, then $44.99/year. Cancel anytime.
Settings
Appearance
Black Friday Sale 🎉
$20 off Lifetime Access
$79.99 $59.99
Upgrade Now →