SLIDE 1 CISC 322
Software Architecture Lecture 04: Non Functional Requirements (NFR) – Quality Attributes Emad Shihab
Adapted from Ahmed E. Hassan and Ian Gorton
SLIDE 2
Last Class - Recap
■ Lot of ambiguity within stakeholders ■ Focus on the needs, not wants ■ Specifications used to bridge gap between stakeholder demands and software system ■ Use system perspective diagram to isolate system from users and interfaces
SLIDE 3
What are Quality Attributes
■ Often know as –ilities
– Reliability – Availability – Portability – Scalability – Performance
SLIDE 4
ICDE System
■ Information Capture and Dissemination Environment (ICDE) is a software system for providing intelligent assistance to
– financial analysts – scientific researchers – intelligence analysts – analysts in other domains
SLIDE 5 ICDE
■ Automatically captures and stores data of actions performed by a user ■ Google search:
– Record query – List of returned pages
■ Data can be later used by 3rd parties to
SLIDE 6 ICDE Schematic
ICDE Repository ICDE Recording Software Local information repositories
Internet
Analyst 3rd Party Tools
SLIDE 7 ICDE v2.0 Business Goals
Business Goal Supporting Technical Objective Encourage third party tool developers Simple and reliable programmatic access to data store for third party tools Heterogeneous (i.e. non-Windows) platform support for running third party tools Allow third party tools to communicate with ICDE users from a remote machine Promote the ICDE concept to users Scale the data collection and data store components to support up to 150 users at a single site Low-cost deployment for each ICDE user workstation
Portability Scalability Scalability Reliability Integration
SLIDE 8
Quality Attribute Specification
■ Architects are often told:
– “My application must be fast/secure/scale”
■ Quality attributes must be precise/measurable for a given system design, e.g.
– “It must be possible to scale the deployment from an initial 100 geographically dispersed user desktops to 10,000 without an increase in effort/cost for installation and configuration.”
SLIDE 9
Performance
■ Different ways to measure performance:
– Throughput – Response Time – Deadlines
SLIDE 10
Performance - Throughput
■ Measure of the amount of work in unit time
– Transactions per second – Messages per minute
SLIDE 11 Throughput Example
50 100 150 200 250 300 5 10 15 20 # of threads CPU % MST (msp)
SLIDE 12
Throughput Considerations
■ Is required throughput:
– Average? (Video streaming) – Peak? (Bidding)
■ Many system have low average but high peak throughput requirements
SLIDE 13
Performance - Response Time
■ Latency or delay an application exhibits in processing a request
– Often an important metric for users (Point-of- sales, stock trading)
SLIDE 14
Example Response Time
■ E.g. 95% of responses in sub-4 seconds, and all within 10 seconds
SLIDE 15
Response Time Considerations
■ Is required response time:
– Guaranteed? (VOIP) – Average? (Search)
SLIDE 16
Performance - Deadlines
■ ‘something must be completed before some specified time’
– Payroll system must complete by 2am – Weekly accounting run must complete by 6am Monday
SLIDE 17 Something to watch for …
■ What is a
– Transaction? – Message? – Request?
■ All are application specific measures. ■ System must achieve 100 mps throughput
– BAD!!
■ System must achieve 100 mps peak throughput for PaymentReceived messages
– GOOD!!!
SLIDE 18 ICDE Performance Issues
■ Response time:
– Overheads of trapping user events must be negligible to users
■ Solution for ICDE client:
– Decouple user event capture from storage using a queue
- 1. Trap user event
- 2. Write event
to queue
- 3. Return to user thread
- 4. Read event
from queue
to ICDE database queue
SLIDE 19
Scalability
■ ‘How well a solution to some problem will work when the size of the problem increases’
– Request Load – Connections – Data size – Deployment
SLIDE 20
Scalability – Request Load
■ How does an 100 TPS application behave when simultaneous request load grows? ■ Ideal solution:
– as the load increases, throughput remains constant (i.e. 100 tps), and response time per request increases only linearly (i.e. 10 seconds).
SLIDE 21 Scalability – Add more hardware
Application Application Application Application Application
Scale-out: Application replicated on different machines Scale-up: Single application instance is executed
machine
CPU
SLIDE 22 Scalability - reality
■ Decrease in throughput and exponential increase in response time.
– increased load causes increased contention for resources such as CPU, network and memory – each request consumes some additional resource (buffer space, locks, and so on) in the application, and eventually these are exhausted
SLIDE 23
Scalability - connections
■ What happens if number of simultaneous connections to an application increases
– Each connection consumes a resource? – Exceed maximum number of connections?
SLIDE 24
Connections Example
■ ISP wants to scale to 100,000 users
– Each user connection spawned a new process for targeted ads – Virtual memory on each server exceeded at 2000 users – Tech crash, ISP out of business
SLIDE 25
Scalability – Data Size
■ How does an application behave as the data it processes increases in size?
– Chat application sees average message size double? – Database table size grows from 1 million to 20 million rows? – Image analysis algorithm processes images of 100MB instead of 1MB?
SLIDE 26
Scalability - Deployment
■ How does effort to install/deploy an application increase as installation base grows?
– Install new users?
■ Solutions typically revolve around automatic download/installation
– E.g. downloading applications from the Internet
SLIDE 27
Scalability thoughts
■ Scalability often overlooked
– Major cause of application failure – Hard to predict – Hard to test/validate – Reliance on proven designs and technologies is essential
SLIDE 28 Scalability for ICDE
■ Should be capable of handling a peak load
- f 150 concurrent requests from ICDE
clients.
– Relatively easy to simulate user load to validate this
SLIDE 29
Next Class
■ Monday, Sep. 19 ■ Modifiability ■ Security ■ Availability ■ Integration