5 Software Architectures
12 September 2024
Questions?
When people turn ideas (the dot on the white board) into an analysis and then a “requirements document,” they rarely aim for a blank-page arrangement of components. They typically have one in mind for the “big picture” components, and sometimes they mix-and-match (connect) well-known arrangements.
An architecture is a plan for arranging components and organizing their interactions. People who arrange components into organized settings are software architects, in analogy to building architects. There are a number of frequently-used architectures (just like there are certain types of family houses from the simple Cape to a Victorian).
5.1 Model View Control
[10-15min]
F III relies on one particular architecture, occasionally called a pattern. It combines several patterns, which is why “architecture” is a better categorical name.
how it works, what its components are:
model —
how to implement it:
an observer can implement a view; the observer pattern helps realize one of these connections: from model to view
– sign up observers initially
– inform when things change
– dynamic addition of observers
also: interfaces between these pieces enable developers to write new implementations, swap out implementations, etc.
5.2 Pipelines
[10-15min]
The designers of Unix came up with the first architecture: pipelines of programs.
pipe lines are essentially “function composition” for programs
convention: Unix programs consumes things from STDIN and send results to STDOUT.
pipes: are “devices” the rewire STDOUT from one to next etc.
Examples:
$ ls -l | grep rkt | wc -l |
15 |
$ cat SomeLargeDocument.scrbl | tr -s '[:space:]' | sort | uniq | head -7 |
0 |
00 |
000 |
A |
ASCII |
Absolutely |
Addison |
5.3 Client-Server
[10-15min]
in principle: hub-and-spoke approach but with different communication patterns
example: web server, web browsers
dbs: database servers, clients
local vs distributed
5.4 Architectures for Bazaar
[5-10min]
let students propose what we saw when we did the analysis?
client-server : inform about setup, grant turns, inform about winning/losing
model-view-control : for spectators
wire them up
5.5 Administrivia, Finally
[5min]
key things:
– explain grades; points keep going up; how why?
– communicate: ofc hrs, staff
– when the various obligations kick in (xtest, readme, lab book, Make)
– don’t cheat; we’ll discover it and you will go to prison
Total: 40-60 mins (which does not include the Q&A period)