1 / 35

CS 5150 Software Engineering

CS 5150 Software Engineering. Lecture 14 System Architecture 2. Administration. Next and final presentations Sign up now Team members who were unable to come to the first presentation should attend the second Office hours No office hours tomorrow, October 18. Administration. Tests

vilina
Télécharger la présentation

CS 5150 Software Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 5150 Software Engineering Lecture 14 System Architecture 2

  2. Administration Next and final presentations Sign up now Team members who were unable to come to the first presentation should attend the second Office hours No office hours tomorrow, October 18.

  3. Administration Tests There are 4 tests, 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: Test 1 Q1 Test 1 Q2 Test 2 Q1 Test 2 Q2 6.9 6.2 8.4 7.8 Last time that this course was taught, poor test results were a common reason for getting a poor overall grade for the course

  4. Test 2 Question 2 The Pizza Ordering System allows the user of a web browser to order pizza for home delivery. To place an order, a shopper 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 shopper provides a delivery address. If not planning to pay with cash, the shopper also provides credit card information. The system has an option for shoppers to register with the pizza shop. They can then save their name and address information, so that they do not have to enter this information every time that they place an order.

  5. Test 2 Question 2 (i) Develop a use case diagram, for a use case for placing an order, PlaceOrder. The use case should show a relationship to two previously specified use cases, IdentifyCustomer, which allows a user to register and log in, and PaybyCredit, which models credit card payments. Definition from Lecture 9: A use case is a a task that an actor needs to perform with the help of the system.

  6. Test 2 Question 2 (i) Example from Lecture 9: <<includes>> TakeExam Authenticate ExamTaker CheckGrades <<includes>>

  7. Test 2 Question 2 (i) FAQ about Use Cases See: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html

  8. Test 2 Question 2 (i) Example from Wikipedia:

  9. Test 2 Question 2 (i) Correct solution <<includes>> PaybyCredit PlaceOrder <<includes>> Shopper Optional link IdentifyCustomer

  10. Test 2 Question 2 (i) Incorrect Solution SearchMenu AddtoCart <<includes>> Pay Shopper PaybyCredit <<includes>> IdentifyCustomer

  11. 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)

  12. Example: Electricity Utility Billing Architectural Style: Master File Update Requirements analysis identifies 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.,

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

  14. Criticisms of First Attempt • Where is this first attempt weak? • All activities are triggered by a transaction • 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

  15. Electricity Utility BillingBatch Processing: Edit and Validation errors Edit & validation Batches of incoming transactions Batches of validated transactions Data input read only Master file

  16. UML Deployment Diagram:Validation EditCheck DataInput RawData ValidData MasterFile Check

  17. Electricity Utility BillingBatch Processing: Master File Update errors Reports Validated transactions in batches Sort by account Batches of input data Master file update Bills Checkpoints and audit trail

  18. Electricity Utility BillingBenefits 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 • Error detection and correction is simplified

  19. Architectural Style: Master File Update (basic) Master file update Mailing and reports Data input and validation Sort Example: billing system for electric utility Advantages: Efficient way to process batches of transactions. Disadvantages: Information in master file is not updated immediately. No good way to answer customer inquiries.

  20. Online Inquiry: Use Case AnswerCustomer <<uses>> NewTransaction CustomerRep A customer calls the utility and speaks to a customer service representative. The representative can read the master file, but not make changes to it. If the representative wishes to change information in the master file, a new transaction is created as input to the master file update system.

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

  22. Architectural Style: Master File Update (full) Master file update Customer services Mailing and reports Data input and validation Sort Example: billing system for electric utility Advantages: Efficient way to answer customer inquiries. Disadvantages: Information in master file is not updated immediately.

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

  24. Real-time Transactions & Batch Processing Data input Real-time transactions This is a combination of the Repository style and the Master File Update style Customer & account database

  25. Extending the Repository Architectural Style:A Small-town Stockbroker • 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)

  26. Real-time Transactions Real-time transactions Products & services database External services Customer & account database

  27. Real-time Transactions & Batch Processing Data input Real-time transactions Batch processing Products & services database External services Customer & account database

  28. Stock Broker: Interface Diagram OnLineTR BatchTR External CustomerDB ProductDB

  29. Practical considerations to include in Architecture and Specification • Can real-time service during scheduled hours be combined with batch processing overnight? • How will the system guarantee database consistency after any type of failure? • 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.

  30. System Design: Non-Functional Requirements In some types of system architecture, non-functional requirements of the system may dictate the software design and development process.

  31. Non-functional requirements: Continuous Operation Many systems must operate continuously • Software update while operating • Hardware monitoring and repair • Alternative power supplies, networks, etc. • Remote operation These functions must be designed into the fundamental architecture.

  32. Time-Critical Systems A time-critical (real time) system is a software system whose correct functioning depends upon the results produced and the time at which they are produced. • A soft real time system is degraded if the results are not produced within required time constraints e.g., a network router is permitted to time out or lose a packet • A hard real time system fails if the results are not produced within required time constraints e.g., a fly-by-wire control system for an airplane, must respond within specified time limits.

  33. Time Critical System: Architectural Style - Daemon A daemon is used when messages might arrive at closer intervals than the the time to process them. Spawned process Daemon Example: Web server The daemon listens at port 80 When a message arrives it: spawns a processes to handle the message returns to listening at port 80

  34. Software Considerations: Testing Example: Testing multi-threaded and parallel systems Several similar threads operating concurrently: • Re-entrant code -- separation of pure code from data for each thread • May be real-time (e.g., telephone switch) or non-time critical The difficult of testing real-time, multi-threaded systems may determine the entire software architecture. • Division into components, each with its own acceptance test.

  35. Software Considerations:Time-Critical System • Developers of advanced time-critical software spend much of their effort developing the software environment: • Monitoring and testing -- debuggers • Crash restart -- component and system-wide • Downloading and updating • Hardware troubleshooting and reconfiguration • etc., etc., etc.

More Related