CS 5150 2
Administration
Second assignment
• Everybody who presented last week should have received comments on their presentation and report.
• Several teams did not have a good schedule. If you are one of these teams, please create a schedule and include it with your progress report on Friday this week.
CS 5150 3
Administration
Next and final presentations
Sign up now
Team members who were unable to come to the first presentation should attend the second
CS 5150 4
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
7.7 6.3 6.1 7.9
Last time that this course was taught, poor test results were a common reason for getting a poor overall grade for the course
CS 5150 5
Test 2 Questions 1 (a)
Theater Ticket System allows a purchaser to buy theater tickets online. In Phase 1, a purchaser will be able to either: (a) buy tickets online, or (b) change or cancel a previous order.
To buy tickets online, the purchaser searches a database of events to discover which tickets are available, chooses tickets, adds them to a shopping cart, and possibly continues buying more tickets for other performances.
When all items have been chosen, the purchaser provides information to pay for the tickets by credit card. The purchaser can choose to have the tickets sent by mail, or arrange to collect them at the theater on the day of the performance.
CS 5150 6
Test 2 Questions 1 (a)
Draw a use case diagram that models the various ways in which a purchaser interacts with this system. The diagram should show a relationship to a use case, 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.
CS 5150 7
Test 2 Questions 1 (a)
Authenticate
TakeExam
<<includes>>
<<includes>>
CheckGradesExamTaker
Example from Lecture 9:
CS 5150 9
Test 2 Questions 1 (a)
FAQ about Use Cases
See: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html
CS 5150 10
Test 2 Questions 1 (a)
Simple Solution
BuyTickets
PurchaserPaybyCredit
<<includes>>
Change <<includes>>
Cancel
<<includes>>
These could be combined
CS 5150 11
Test 2 Questions 1 (a)
More Complex Solution
BuyTickets
PurchaserPaybyCredit
<<includes>>
ChangeCancel
<<includes>>
SelectTickets
AddtoCart
<<extends>>
<<extends>>
CS 5150 12
Test 2 Questions 1 (a)
Incorrect SolutionBuyTickets
PurchaserPaybyCredit
<<includes>>
ChangeCancel
<<includes>>
SelectTickets
AddtoCart
CS 5150 13
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)
CS 5150 14
Example: Electricity Utility Billing
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.,
Architectural Style: Master File Update
CS 5150 15
Electricity Utility Billing
First attempt:
Data input Master fileTransaction Bill
Each transaction is handled as it arrives.
CS 5150 16
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
CS 5150 17
Electricity Utility BillingBatch Processing: Edit and Validation
Data input
Master file
Edit & validation
read only
errors
Batches of validated transactions
Batches of incoming transactions
CS 5150 19
Electricity Utility BillingBatch Processing: Master File Update
Master fileupdate Bills
Validated transactionsin batches
Sort by account
errors
Reports
Batches of input data
Checkpoints and audit trail
CS 5150 20
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
CS 5150 21
Architectural Style: Master File Update (basic)
Master file update
Data input and validation
Mailing and reports
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.
Sort
CS 5150 22
Online Inquiry: Use Case
CustomerRep
AnswerCustomer
NewTransaction
<<uses>>
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.
CS 5150 23
Online Inquiry
Master file
read only
Customer Service Representative
Customer Service department can read the master file, make annotations, and create transactions, but cannot change the master file.
New transaction
CS 5150 24
Architectural Style: Master File Update (full)
Example: billing system for electric utility
Advantages: Efficient way to answer customer inquiries.
Disadvantages: Information in master file is not updated immediately.
Customer services
Master file update
Data input and validation
Mailing and reports
Sort
CS 5150 25
Data Intensive Systems with Real Time Transactions
• Transactions
Received by mail or over telephone
For immediate or later action
• Complex customer inquiries
• Highly competitive market
Example: A Small-town Stockbroker
CS 5150 26
Real-time Transactions & Batch Processing
Customer & account database
Real-time transactions
Data input
This is a combination of the Repository style and the Master File Update style
CS 5150 27
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)
CS 5150 28
Real-time Transactions
Customer & account database
Products & services database
Real-time transactions
External services
CS 5150 29
Real-time Transactions & Batch Processing
Customer & account database
Products & services database
Real-time transactions
Batch processing
Data input
External services
CS 5150 31
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 + logdetailed 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.
CS 5150 32
Systems Architecture for Network Systems: Firewall
Public network
Private network
Firewall
A firewall is a computer at the junction of two network segments that:
• Inspects every packet that attempts to cross the boundary
• Rejects any packet that does not satisfy certain criteria, e.g.,
an incoming request to open a TCP connectionan unknown packet type
Firewalls provide security at a loss of flexibility and a cost of system administration.
CS 5150 33
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 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.
CS 5150 34
Time Critical System: Architectural Style - Daemon
Daemon
Example: Web server
The daemon listens at port 80
When a message arrives it:spawns a processes to handle the messagereturns to listening at port 80
Spawned process
A daemon is used when messages sometimes arrive at closer intervals than the the time to process them.
CS 5150 35
Software Considerations
In some types of system architecture, non-functional requirements of the system may dictate the software design and development process.
CS 5150 36
Software Considerations:Time-Critical System
Developers of advanced time-critical software spend almost all 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.
CS 5150 37
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.
Top Related