$30 off During Our Annual Pro Sale. View Details »

CSE460 Lecture 22

CSE460 Lecture 22

Software Analysis and Design
Architectural Patterns
(202103)

Javier Gonzalez-Sanchez
PRO

July 22, 2020
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSE 460
    Software Analysis and Design
    Lecture 22: Architectural Patterns
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View Slide

  2. jgs
    Previously …

    View Slide

  3. jgs
    460 00000111
    Drafting an Implementation

    View Slide

  4. jgs
    460 00000111
    Example
    Main
    Factory
    Controller View
    Model
    Gift Ball Box Envelop

    View Slide

  5. jgs
    Layered Architecture

    View Slide

  6. jgs
    460 00000111
    A generic layered architecture

    View Slide

  7. jgs
    460 00000111
    Layered Architecture

    View Slide

  8. jgs
    460 00000111
    Layered Architecture
    Description
    § Organizes 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.
    When used
    § Building new facilities on top of existing systems
    § The development is spread across several teams with each team responsibility for
    a layer of functionality
    Advantages § Allows replacement of entire layers so long as the interface is maintained.
    Disadvantages
    § In practice, providing a clean separation between layers is often difficult and a
    high-level layer may have to interact directly with lower-level layers 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.

    View Slide

  9. jgs
    460 00000111
    Example
    Factory
    Main
    Gift Ball Box Envelop
    Layer
    Layer
    Layer

    View Slide

  10. jgs
    Blackboard

    View Slide

  11. jgs
    460 00000111
    Blackboard

    View Slide

  12. jgs
    460 00000111
    Blackboard
    Description
    § All data in a system is managed in a central repository
    § Components do not interact directly, only through the repository.
    When used
    § When Large volumes of information are generated that has to be stored
    for a long time.
    § When the inclusion of data in the repository triggers an action or tool.
    Advantages
    § Components do not need to know of the existence of other components.
    § Changes made by one component can be propagated to all components.
    Disadvantages
    § The repository is a single point of failure so problems in the repository
    affect the whole system.
    § May be inefficiencies in organizing all communication through the
    repository.

    View Slide

  13. jgs
    460 00000111
    Drafting an Implementation

    View Slide

  14. jgs
    460 00000111
    Implementation :: Classroom

    View Slide

  15. jgs
    460 00000111
    Implementation :: Professor

    View Slide

  16. jgs
    460 00000111
    Implementation :: Student

    View Slide

  17. jgs
    460 00000111
    Implementation :: Blackboard

    View Slide

  18. jgs
    Client-Server

    View Slide

  19. jgs
    460 00000111
    Client-Server

    View Slide

  20. jgs
    460 00000111
    Client-Server
    Description
    § Functionality of the system is organized into services.
    § Each service delivered from a separate server.
    § Clients are users of these services and access servers to make use
    of them.
    When used
    § Used when data has to be accessed from a range of locations.
    § May also be used when the load on a system is variable.
    Advantages § Distributed system
    Disadvantages
    § Each service is a single point of failure so susceptible to denial of
    service attacks or server failure.
    § Performance may be unpredictable because it depends on the
    network as well as the system.

    View Slide

  21. jgs
    460 00000111
    Implementation :: Server
    chrestomathy: https://www.javatpoint.com/socket-programming

    View Slide

  22. jgs
    460 00000111
    Implementation :: Client
    chrestomathy: https://www.javatpoint.com/socket-programming

    View Slide

  23. jgs
    460 00000111
    Drafting an Implementation
    ...

    View Slide

  24. jgs
    Next Step
    Assignment 04

    View Slide

  25. jgs
    CSE 460 Software Analysis and Design
    Javier Gonzalez-Sanchez
    [email protected]
    Fall 2020
    Disclaimer. These slides can only be used as study material for the class CSE460 at ASU. They cannot be distributed or used for another purpose.

    View Slide