360 likes | 539 Views
Lecture 8 Software Architecture. CSCI 3350 - Software Engineering II Fall 2014 Bill Pine. Lecture Overview. Examine two categories of architecture Independent Components Dataflow Architectures Most popular styles within each. What Is Software Architecture?.
E N D
Lecture 8Software Architecture CSCI 3350 - Software Engineering II Fall 2014 Bill Pine
Lecture Overview • Examine two categories of architecture • Independent Components • Dataflow Architectures • Most popular styles within each CSCI - 3350
What Is Software Architecture? • There is no universal definition • An effort by SEI at Carnegie Mellon identified more than 150 distinct definitions • Why might that be? CSCI - 3350
Definition • Software Architecture - the high-level structure or structures of the software system that show the software components, their interfaces, and the relationships among them • Must satisfy all system requirements: functional, nonfunctional and pseudo CSCI - 3350
Major Architectural Components • All systems consist of hardware and software • Software development consists of • Identifying the major software • Allocating those software components to the hardware components of the system • This allocation or mapping can be accomplished in a variety of ways CSCI - 3350
Basic Software Functions • There are four basic software functions • Data storage • Data access logic • Problem Domain (application) logic • Presentation logic CSCI - 3350
Data Storage Functionality • Most application require data persistence from one execution session to another • May range from • Simple unstructured text file • Structured text file • Relational database • Object-oriented database CSCI - 3350
Data Access Logic • Consists of the processing necessary to access the persistent data • May range from • Simple “reads” • Complex structured “reads” • SQL queries CSCI - 3350
Problem Domain Logic • The logic documented in the functional requirements • As captured by the • Use cases • Sequence diagrams • State machine diagrams • … Other UML diagrams as required CSCI - 3350
Presentation Logic • Human-computer interface • Accepting user input • Displaying information CSCI - 3350
Primary Hardware Components • There are three primary hardware components • Client computer - desktop, laptop, handheld, … • Servers – mainframe, minicomputer, microcomputer • The network connecting client to server – cell, …, broadband, high speed ethernet, T3, … • Nota Bene – This does not imply that the only possible architecture is client-server CSCI - 3350
Distribution of Software Functions • The architecture style is determined by the ways in which the four software functions are distributed (organized) over the hardware • Sometimes called just architectures, architectural patterns, … • A particular style is chosen to satisfy the nonfunctional and pseudo requirements CSCI - 3350
Aside on Motivation • According to the old saw • “Don’t reinvent the wheel” • Want to be able to leverage previous experience • Both our own, but more importantly • The experience of those who have gone before CSCI - 3350
An Analogy • To become a Chess Master • Learn the rules • Names of pieces, movements, board geometry • Learn the principles • Relative value of pieces, power of threats, strategic value of the center of the board • Study the games of the masters • These games contain patterns that must be • Understood • Memorized • Applied repeatedly CSCI 3350
An Analogy (continued) • To become a Software Design Master • Learn the rules • Language, algorithms, data structures • Learn the principles • Structured programming, o-o programming, generic programming • Study the designs of the masters • These designs contain patterns that must be • Understood • Memorized • Applied repeatedly CSCI 3350
An Analogy (continued) • When applied at different levels of granularity for software development, gives rise to • Coding patterns – at the module level • Relevant during implementation workflow • Design patterns – at the subsystem level • Relevant during detailed design workflow • Architectural patterns (styles) – at the system level • Relevant during the top-level design workflow CSCI 3350
Coding Patterns • You should have learned these during CSCI 1250, 1260, 2210, 3230, 2910, … • Examples • Find max, min of an unsorted list • Simple list sorting methods • Simple list searching • Read data from a flat file • Walk a linked list, … • Idiomatic (specific forms for each language) CSCI - 3350
Class Exercise • Assign simple coding patterns to teams ( Ten Minutes) CSCI - 3350
Design Patterns • Subject of a separate lecture CSCI - 3350
Architectural Styles • We will divide architectural styles into two categories • Independent Components • Dataflow • Begin with Independent Components • Server • Client • Client Server CSCI - 3350
Server-Based Style • Server (mainframe) responsible all four basic software functions • Clients (in the role of simple terminals) • Capture user inputs • Pass to server for processing • Accept instructions and data from the server for display CSCI - 3350
Server-Based Style (cont) • Advantages • All software is developed for a single platform • All data is stored on a single platform • Single point of control • Disadvantages • As demand grows, servers become overloaded and response slows • Upgrades come only in large increments and are expensive CSCI - 3350
Client-Based Style • Server (microcomputer) performs data storage function • Client (microcomputer) performs presentation logic, application logic, and data access logic CSCI - 3350
Client-Based Style (cont) • Advantages • Cost effective for low levels of service • Disadvantages • Network overload in high demand situations • All data must travel to client for processing • Likewise clients become overloaded in high demand situations • Examining all data records CSCI - 3350
Client-Server Style • Server (microcomputer → mainframe) performs data storage and data access logic • Application logic shared on client and server • Client(microcomputer) performs presentation logic • Thick client – has most of application logic • Thin client – has minimal application logic • Sometimes referred to as two-tier style CSCI - 3350
Client-Server Style (cont) • Advantages • Scales well with increasing demand – incremental upgrades • Server functions spread over several servers means greater reliability • Easy to clearly separate the implements of the different function • Supports many different platforms CSCI - 3350
Client-Server Style (cont) • Disadvantages • Structural complexity – must be able to support multiple platforms • Cost to support multiple platforms estimated at approximate 4 times an equivalent server style • Maintenance / Updates more complex to support CSCI - 3350
Multi-Tier Client-Server Style • Three-tier • Database server (microcomputer → mainframe) performs data storage and data access logic • Application server performs application logic • Client performs presentation logic • N-tier • Similar to three-tier, but with multiple layers of application servers CSCI - 3350
Multi-tier Style (cont) • Advantages • More scalable via load balancing • Disadvantages • Increased network load to handle multiple paths • Complex development and testing • Maintenance / Updates more complex to support CSCI - 3350
Distributed Objects Style • The logical extension of object-oriented paradigm to client-server computing • Three major players • OMG – Common Object Request Broker Architecture • Sun – Enterprise Java Beans / Java 2 Enterprise Edition • Microsoft - .NET OLE, COM and DCOM CSCI - 3350
Indep. Components Comparison 24 July 2013 CSCI 3350 Lecture 8 - 31
Dataflow Architectures Two primary type Filters and Pipes Batch sequential 24 July 2013 CSCI 3350 Lecture 8 - 32
Filters and Pipes Processing elements (filters) accept streams as input and produce output streams Processing elements are independent of one another Pipes used to connect the output stream of one filter to the input stream of another filter The heart of the Unix software development paradigm 24 July 2013 CSCI 3350 Lecture 8 - 33
Filters and Pipes (cont) Advantages Modularity An versatile means of implementing process that are best modeled as a sequence of transformations Useful model for serializing data from objects Disadvantages Some computations are not readily modeled sequence of transformations 24 July 2013 CSCI 3350 Lecture 8 - 34
Batch Sequential Perhaps the oldest and most common style Associated with Data Flow Analysis and Data Flow Diagrams 24 July 2013 CSCI 3350 Lecture 8 - 35
Batch Sequential (cont) Advantages For situations requiring an ordered set of transactions be processed on a unified dataset with the ability to “unprocess” if interrupted by external events Disadvantages Some computations are not readily modeled as dataflow 24 July 2013 CSCI 3350 Lecture 8 - 36