L6 Architectural Styles Flashcards
What is a control model?
Are concerned with the control flow between sub-systems
What is a Centralised control model?
One sub-system has overall responsibility for control
What is an Event-based system?
Each sub-system can respond to externally generated events from other sub-systems or the system’s environment
What is the two principal of event-driven models?
- Broadcast models – an event is broadcast to all sub-systems. Any sub-system which can handle the event may do so;
- Interrupt-driven models – used in real-time systems where interrupts are detected by an interrupt handler and passed to some other component for processing
Explain the Broadcast model on event-driven models
Sub-systems register an interest in specific events. When these occur, control is transferred to the sub-system which can handle the event (publisher-subscriber pattern)
A control policy is not embedded in the event or message handler.
- Sub-systems decide on events of interest to them
Explain the Interrupt-driven systems
Used in real-time system where fast response to an event is essential
- there are a known number of interrupt types with a handler defined for each type
- when an interrupt of a particular type is received, a control is transferred to its handler
What is an Architectural styles?
Specific templates which are general and reusable when considering the way to structure system architecture:
○ mechanism/template for structuring system architectures
○ each template can be used for different types of software
○ stylised description of good design practice, which has been tried and tested in different environments
○ include information about when they are and when they are not useful
○ choice of a suitable style depends on the requirements (e.g. what is more important, security or speed?)
What are the architectural styles you know?
- Client-Server
- Repository
- Plug-in
- Layered
- Pipe and filter
- Microservice
- Model View Controller (MVC)
- Service Oriented Architecture (SOA)
What are the things that need to be considered when choosing an architectural style?
- Performance ( Localise critical operations and minimise communications. Use large rather than fine-grain components)
- Security (Use a layered architecture with critical assets in the inner layers)
- Safety (Localise safety-critical features in a small number of sub-systems)
- Availability (Include redundant components and mechanisms for fault tolerance)
- Maintainability (Use fine-grain, replaceable components)
What would happen if use large-grain components in our architecture
Performance improved, but maintainability is reduced.
What would happen if we introduce redundant components?
It will improves availability but makes security more difficult
What would happen if we localise safety-related features?
It means that it will have more communication, hence performance is degraded.
What would happen if we use small-grain components?
Improve reusability but degrade performance
Explain the input-process-output architecture
- User performs an action which is transferred in a request model via a delivery mechanism (e.g. web server)
- Interactor receives the request model through an input boundary
- Interactor decides which actions to take based on the request model and executes entities accordingly
- Interactor generates a result model (POJO) and prepares to send it across the boundary back to the user
- The response is transferred through the boundary to the user
Explain why architectural boundary is fundamental to architectural design
- Enable separation and independence between sub-systems (e.g. UI and business logic)
- Make maintenance, deployment and testing simpler and faster