Reaves.dev

v0.1.0

built using

Phoenix v1.7.12

Software Architecture

Stephen M. Reaves

::

2023-09-26

Notes about Lesson 7 of CS-6300

Summary

What is Software Architecture?

Elements, Form, and Rationale

Shaw and Garland say that Software Architecture is a level of design that involves

Software Architecture := a set of principal design decisions about the system

Blueprint

Temporal aspect

Prescriptive v Descriptive Architecture

A prescriptive architecture captures the design decisions made prior to the system’s construction.

A descriptive architecture describes how the system has actually been built

Architectural Evolution

Ideally, when a system evolves, the prescriptive SWA should be modified first. This rarely happens.

Can happen for multiple reasons:

Architecture Degradation

Architectural Drift := introduction of architectural design decisions orthogonal to a system’s prescriptive architecture

Architectural Erosion := introduction of architectural design decisions that violate a system’s prescriptive architecture

Architectural Recovery

Drift and Erosion \Rightarrow degraded architecture

Architectural Recovery := determining the SWA from implementation and fixing it.

Architectural Elements

3 main types of elements:

Processing + Data = Components

Interaction elements are contained and controlled by system connectors

Components + Connectors = Configuration

Components, Connectors, and Configurations

Software Component := an architectural entity that encapsulates a subset of the system’s functionality and/or data

Components restrict access to that subset via explicit interface

Software Connector := an architectural entity effecting and regulating interactions

Architectural configuration := association between components and connectors of a software architecture

Architectural Styles

Styles capture idioms that work well together

A family of systems in terms of a pattern of structural organization; a vocabulary of components and connectors, with constraints on how they can be combined.

Named collection of architectural design decisions applicable in a given context

Type of Styles

P2P Styles

Decentralized resource sharing and discovery

Napster

P2P File sharing system

GcdPeer &Content DeliverypaPeer Acd->pa4pcPeer Ccd->pcpa->cd1pa->cd3pbPeer Bpa->pb5pb->cd2pb->pa6
  1. Peer A registers with content directory
  2. Peer B registers with content directory
  3. Peer A requests a song
  4. Content directory returns a handle to peer that contains requested song
  5. Peer A requests song
  6. Peer B responds with song

Content Directory is SPOF and issue with scaling

Skype

Gcluster_logincluster_superloginLogin ServersaSuper Node AsbSuper Node Bsa->sbp2p2sa->p2scSuper Node Csb->scp8p8sb->p8sc->sap4p4sc->p4p6p6sc->p6p1p1p1->loginp1->sap3p3p2->p3p3->scp5p5p5->scp7p7p7->sb

Login server is only SPOF

Supernodes are NOT owned by skype. They are just regular nodes that are promoted by skype

Peer 2 can talk to Peer 3 by going through Super Nodes A and B

Takeaways

A great architecture