lecture13

Uploaded from authorPOINT
Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

CS 501: Software Engineering: 

CS 501: Software Engineering Lecture 13 System Architecture and Design I

Administration: 

Administration Quizzes There are 4 quizzes, each with 2 questions. The final grade will be based on the best 6 questions out of 8. Uncollected answer books are at 301 College Avenue. Average grades: Quiz 1 Q1 Quiz 1, Q2 Quiz 2 Q1 Quiz 2 Q2 8.4 5.8 7.2 7.0

Quiz 2, Question 2: 

Quiz 2, Question 2 The Pizza Ordering System The system allows the user of a cellular telephone with a Web browser to order pizza for home delivery. To place an order, a user searches to find items to purchase, adds items one at a time to a shopping cart, and possibly searches again for more items. When all items have been chosen, the user provides a delivery address, and may provide credit card information if not planning to pay with cash.

Quiz 2, Question 2: 

Quiz 2, Question 2 The following diagram illustrates various factors that, in combination, determine the usability of a computer system.

Quiz 2, Question 2: 

Quiz 2, Question 2 (a) What is the mental model for the Pizza Ordering System?

Quiz 2, Question 2: 

Quiz 2, Question 2 (a) What is the mental model for the Pizza Ordering System? A shopping model: select items from menu, add to shopping cart, check out, credit card payment.

Quiz 2, Question 2: 

Quiz 2, Question 2 (b) In this system the cellular phone is being used as a small computer. How do the usability characteristics of this computer and the network over which it operates constrain the design of this system? List three characteristics and the constraints that they place on the system.

Quiz 2, Question 2: 

Quiz 2, Question 2 (b) In this system the cellular phone is being used as a small computer. How do the usability characteristics of this computer and the network over which it operates constrain the design of this system? List three characteristics and the constraints that they place on the system. • small screen size -- difficult to display graphics • restricted keyboard -- input tedious, no mouse • slow network connection -- slow response, limited information • etc.

Quiz 2, Question 2: 

Quiz 2, Question 2 (c) List two important functions that the interface must support?

Quiz 2, Question 2: 

Quiz 2, Question 2 (c) List two important functions that the interface must support? • Select a type of pizza with toppings • Input delivery address

Quiz 2 Question 2: 

Quiz 2 Question 2 (d) Choose one important function and describe a possible interface design for this part of the system. State which function this part of the interface supports, how it relates to the conceptual model, and how your interface deals with the constraints that you listed in part (b).

Quiz 2, Question 2: 

Quiz 2, Question 2 (d) Answer Select a type of pizza with toppings. Types of pizza are displayed as a scrollable text list. Each has a number. User selects by keying the number. If the pizza has options, they are displayed as a second text list. Constraints: Consistent with small display, simple numeric input, little data to transmit. Conceptual model: Similar to choosing from a food menu.

System Architecture and Design: 

System Architecture and Design The overall design of a system: • Computers and networks (e.g., monolithic, distributed) • Interfaces and protocols (e.g., http, ODBC) • Databases (e.g., relational, distributed) • Security (e.g., smart card authentication) • Operations (e.g., backup, archiving, audit trails) • Software environments (e.g., languages, source control tools)

UML: System and Subsystem Modeling: 

UML: System and Subsystem Modeling Subsystem model A grouping of elements that specifies what a part of a system should do. Component (UML definition) 'A distributable piece of implementation of a system, including software code (source, binary, or executable) but also including business documents, etc., in a human system.' A component can be thought of as an implementation of a subsystem.

UML Notation: Component & Node: 

UML Notation: Component andamp; Node A component is a physical and replaceable part of a system that conforms to and provides the realization of a set of interfaces. Server A node is a physical element that exists at run time and represents a computational resource, e.g., a computer.

Components and Replaceability: 

Components and Replaceability Components allow system to be assembled from binary replaceable elements. • A component is physical -- bits not concepts • A component can be replaced by any other component(s) that conforms to the interfaces. • A component is part of a system. • A component provides the realization of a set of interfaces.

System Architecture Example:Extensibility in Web Browsers: 

System Architecture Example: Extensibility in Web Browsers Web browsers provide a flexible user interface through an extensible architecture. Protocols: HTTP, WAIS, Gopher, FTP, etc., proxies Data types: helper applications, plug-ins, etc. Executable code: CGI scripts at server JavaScript at client Java applets Style sheets: CSS, etc.

Web Interface: Basic: 

Web Interface: Basic Web browser • Static pages from server • All interaction requires communication with server

UML Notation: Deployment Diagram: 

UML Notation: Deployment Diagram WebBrowser PersonalComp WebServer DeptServer

UML Notation:Application Programming Interface (API): 

UML Notation: Application Programming Interface (API) API is an interface that is realized by one or more components. WebServer Get Post

UML Notation: Interfaces: 

UML Notation: Interfaces WebBrowser WebServer HTTP dependency interface realization

Web User Interface: CGI Script: 

Web User Interface: CGI Script Web browser • Scripts can configure pages • Scripts can validate information • All interaction requires communication with server Data CGI Scripts

UML Notation: CGI Interface Diagram: 

UML Notation: CGI Interface Diagram CGIScript HTTP Apache CGI ODBC MySQL These components might be located on a single node.

Web User Interface: JavaScript: 

Web User Interface: JavaScript Data CGI Scripts Web browser • JavaScripts can validate information as typed • Some interactions are local • Server interaction constrained by web protocols Java Script html

UML Notation: Package: 

UML Notation: Package A package is a general-purpose mechanism for organizing elements into groups. Note: Some authors draw packages with a different shaped box: JavaScript JavaScript

Example: Web Browser: 

Example: Web Browser HTTP JavaScript HTMLRender Each package represents a group of objects. WebBrowser

Web User Interface: Applet: 

Web User Interface: Applet Any server Web browser • Any executable code can run on client • Client can connect to any server Applets

Applet Interfaces: 

Applet Interfaces WebBrowser WebServer HTTP XYZServer XYZInterface

UML Diagrams and Specifications: 

UML Diagrams and Specifications For every subsystem, there is a choice of diagrams Choose the diagrams that best model the system and are clearest to everybody. In UML every diagram must have supporting specification The diagrams shows the relationships among parts of the system, but much, much more detail is needed to specify a system explicitly. For example, in the Applet Interface slide, at the very least, the specification should include the version of the protocols to be supported at the interfaces, the options (if any), and implementation restrictions.

Components and Classes: 

Components and Classes Classes represent logical abstractions. They may be grouped into packages. Components represent physical things. They may live on nodes. Classes have attributes and operations directly. Components have operations that are reachable only through interfaces.

System Design: Data Intensive Systems: 

System Design: Data Intensive Systems Examples • Electricity utility customer billing (e.g., NYSEG) • Telephone call recording and billing (e.g., Verizon) • Car rental reservations (e.g., Hertz) • Stock market brokerage (e.g., Charles Schwab) • E-commerce (e.g., Amazon.com) • University grade registration (e.g., Cornell)

Example: Electricity Utility Billing Transaction Types: 

Example: Electricity Utility Billing Transaction Types Requirements analysis has identified several transaction types: • Create account / close account • Meter reading • Payment received • Other credits / debits • Check cleared / check bounced • Account query • Correction of error • etc., etc., etc.,

Batch Processing DesignExample: Electricity Utility Billing: 

Batch Processing Design Example: Electricity Utility Billing First attempt: Data input Master file Transaction Bill Each transaction is handled as it arrives.

Criticisms of First Attempt: 

Criticisms of First Attempt Where is this first attempt weak? A bill is sent out for each transaction, even if there are several per day Bills are not sent out on a monthly cycle Awkward to answer customer queries No process for error checking and correction All activities are triggered by a transaction

Batch Processing: Validation: 

Batch Processing: Validation Data input Master file Edit andamp; validation read only errors Batches of validated transactions Batches of incoming transactions

UML Deployment Diagram:Batch Processing Validation: 

UML Deployment Diagram: Batch Processing Validation MasterFile EditCheck ValidData DataInput RawData

Batch Processing: Master File Update: 

Batch Processing: Master File Update Master file update Bills Validated transactions in batches Sort by account errors Reports Instructions

Interfaces to DataInput : 

Interfaces to DataInput DataInput RawData EditCheckError UpdateError DataforCheck

Benefits of Batch Updating: 

Benefits of Batch Updating All transactions for an account are processed together at appropriate intervals Backup and recovery have fixed checkpoints Better management control of operations Efficient use of staff and hardware

Online Inquiry: 

Online Inquiry Master file read only Customer Service Customer Service department can read file, make annotations, and create transactions, but cannot change the master file. New transaction

Online Inquiry: Use Cases: 

Online Inquiry: Use Cases CustomerServer AnswerCustomer NewTransaction andlt;andlt;usesandgt;andgt;

Data Intensive SystemsExample: A Small-town Stockbroker: 

Data Intensive Systems Example: A Small-town Stockbroker • Transactions Received by mail or over telephone For immediate or later action • Complex customer inquiries • Highly competitive market

A Database Architecture: 

A Database Architecture Databases: Customer and account database Financial products (e.g., account types, pension plans, savings schemes) Links to external databases (e.g., stock markets, mutual funds, insurance companies)

Real-time Transactions: 

Real-time Transactions Customer andamp; account database Products andamp; services database External services Real-time transactions

Real-time Transactions & Batch Processing: 

Real-time Transactions andamp; Batch Processing Customer andamp; account database Products andamp; services database External services Real-time transactions Batch processing Data input

Stock Broker: Interface Diagram: 

Stock Broker: Interface Diagram CustomerDB ProductDB OnLineTR BatchTR External

Practical considerations to include in Architecture and Specification: 

Practical considerations to include in Architecture and Specification Real-time service during scheduled hours with batch processing overnight Database consistency after any type of failure two-phase commit reload from checkpoint + log detailed audit trail How will transaction errors be avoided and identified? How will transaction errors be corrected? How will staff dishonesty be controlled? These practical considerations may be major factors in the choice of architecture. *