1. Layered Architecture (Style) = Layered Pattern (Pattern)
Definition:
- Shaw & Garlan: Defines a hierarchical structure where each layer provides services to the layer above it.
- Bass et al.: Describes a structured approach where responsibilities are divided into layers to improve separation of concerns.
Real-World Examples:
- Operating Systems – Windows, Linux (Kernel, Hardware Abstraction, User Interface)
- Enterprise Software – 3-tier architecture (Presentation, Business Logic, Data)
Trade-offs:
- Easy to maintain and extend
- Supports modularization and separation of concerns
- Can introduce performance bottlenecks due to inter-layer communication
2. Pipe-and-Filter (Style) = Pipe-and-Filter Pattern (Pattern)
Definition:
- Shaw & Garlan: A system is divided into processing units (filters) that pass data through pipes.
- Bass et al.: Describes a processing pipeline where data flows through sequential transformations.
Real-World Examples:
- Unix Shell Pipelines – (
cat file.txt | grep "error" | sort
) - Compilers – Lexical Analysis → Syntax Analysis → Optimization → Code Generation
- ETL (Extract, Transform, Load) Systems – Data processing in Apache NiFi
Trade-offs:
- Supports parallel processing and reusability
- Makes transformations modular and easy to test
- High overhead due to data transfer between filters
3. Client-Server (Style) = Client-Server Pattern (Pattern)
Definition:
- Shaw & Garlan: Defines a system where clients request services from a central server.
- Bass et al.: A pattern where processing is distributed between a service provider (server) and consumers (clients).
Real-World Examples:
- Web Applications – Browsers accessing web servers (e.g., Google, Facebook)
- Databases – MySQL, PostgreSQL, Oracle (client apps interact with DB servers)
- Email Systems – SMTP/POP3/IMAP protocols
Trade-offs:
- Centralized control and security
- Easier to scale compared to monolithic architectures
- Single point of failure unless redundancy is added
4. Event-Based (Implicit Invocation) (Style) = Event-Bus Pattern (Pattern)
Definition:
- Shaw & Garlan: Components communicate indirectly by broadcasting events.
- Bass et al.: Uses an event bus to decouple event producers from event consumers.
Real-World Examples:
- IoT Systems – Smart home devices using MQTT, Kafka, or RabbitMQ
- GUI Applications – Button clicks triggering events in React, Angular
- Stock Market Trading Systems – Event-driven architecture for handling transactions
Trade-offs:
- High scalability and decoupling of components
- Supports real-time event processing
- Difficult to debug due to lack of direct control flow
5. Repository (Blackboard) (Style) = Blackboard Pattern (Pattern)
Definition:
- Shaw & Garlan: A centralized data store (repository) that multiple components interact with.
- Bass et al.: The Blackboard pattern defines a shared knowledge base where independent processes read/write.
Real-World Examples:
- Integrated Development Environments (IDEs) – Eclipse, Visual Studio Code (central repository for plugins)
- AI & Machine Learning Systems – Blackboard systems for inference engines
- Database-Driven Applications – CRM, ERP systems (centralized database for business logic)
Trade-offs:
- Facilitates data consistency and sharing
- Ideal for AI/ML reasoning systems
- Can become a performance bottleneck if poorly managed
6. Interpreter (Virtual Machine) (Style) = Microkernel Pattern (Pattern)
Definition:
- Shaw & Garlan: A system that interprets and executes commands dynamically.
- Bass et al.: Describes a core (microkernel) with additional extensible components.
Real-World Examples:
- Virtual Machines – Java Virtual Machine (JVM), .NET CLR
- Web Browsers – JavaScript engine (V8 in Chrome, SpiderMonkey in Firefox)
- Modular Software – Eclipse plug-ins, Adobe Photoshop extensions
Trade-offs:
- High flexibility and extendability
- Reduces core complexity by offloading features to external modules
- Performance overhead due to interpretation/execution layer
Comments
Post a Comment