ASD-Notes

My notes on Advanced-Software-Development

View the Project on GitHub angus-mackenzie/ASD-Notes

Architecture & Patterns

Requirements and Analysis leads to design

Requirements & Analysis

MVC

Layered Architecture Pattern

| | Description | |—|—| |Problem | Used when building new facilities on top of existing systems; when the development is spread across several teams with each team responsibility for a layer of functionality; when there is a requirement for multi-level security.| |Solution|Organises the system into layers with related functionality associated with each layer. A layer provides services to the layer above it so the lowest-level layers represent core services that are likely to be used throughout the system| |Pro| Allows replacement of entire layers so long as the interface is maintained. Redundant facilities (e.g.: authentication) can be provided in each layer to increase the dependability of the system| |Con|In practice, providing a clean separation between layers is often difficult and a high-level layer may have to interact directly with a lower-level layer rather than through the layer immediately below it. Performance can be a problem because of multiple levels of interpretation of a service request as it is processed at each layer|

Layered Architecture

Repository Pattern

Repo Repo

Client-Server Pattern

CSP CSP

Pipe and Filter Pattern

PFP PFP

Key Aim of these Patterns

Advice: An Application Coordination Layer

Model-View Separation Principle

Internet Stack (TCP/IP Model)

Layering Considered Harmful (?)

Patterns and Concurrency

Parallel or Concurrent Programming

Moore’s Law

The complexity for minimum component costs has increased at a rate of roughly a factor of two per year. Certainly over the short term this rate can be expected to continue, if not to increase. Over the longer term, the rate of increase is a bit more uncertain, although there is no reason to believe it will not remain nearly constant for at least 10 years.

Repository (or Blackboard)

  • Suitable for applications in which the central issue is establishing, augmenting, and maintaining a complex central body of information
  • Typically the information must be manipulated in a wide variety of ways
  • An example of a repository or blackboard architecture may the management of work allocation process in a company

    Parallel Agent and Repository

  • Data-centred concurrency
    • Autonomous agents update state managed in a central repository
  • Repository (Blackboard) of the resulting creation that is shared by all agents
    • Logical structure may be in a shared memory in a multi-core machine
    • Can be distributed among agents as a block it owns
  • Agents intelligent agents that wil act on blackboard
  • Controller orchestrates agents access to the repository and creation of the aggregate result
    • Can reside either in the agents or the blackboard

Blackboard

Client-Server Architecture

Diagram

Pipes and Filters in Parallel

Although, in parallel the pip and filter will look like this: PFP

Scenario of Pipes and Filters

  1. Pipe A receives data from a Data Source or another previous filter, synchronising and transferring it to the Filter N
  2. Filter N receives the package of data, performs operation Op.n on it, and delivers the result to Pipe B.
    • At the same time, new data arrives to the Pipe A, which delivers it as soon as it can synchronise with Filter N
    • Pipe B synchronises and transfers the data to Filter M
  3. Filter M receives the data, performs Op.m on it, and delivers it to Pipe C, which sends it to the next filter or Data Sink
    • Simultaneously, Filter N has received the new data, performed Op.n on it, and syncrhonised with Pipe B to deliver it
  4. The previous steps are repeated over and over until no further data is perceived from the initial Data Source or previous filter

    Conclusion

    Realizing Non-functional Requirements

    Performance

    • Localize critical operations and minimize communications
    • Use large rather than fine-grained components. Allow for concurrency

Security

Safety

Availability

Maintainability

Bennet, McRobb & Farmer