CISC 322 Software Architecture Lecture 04: Non Functional - - PowerPoint PPT Presentation

cisc 322
SMART_READER_LITE
LIVE PREVIEW

CISC 322 Software Architecture Lecture 04: Non Functional - - PowerPoint PPT Presentation

CISC 322 Software Architecture Lecture 04: Non Functional Requirements (NFR) Quality Attributes Emad Shihab Adapted from Ahmed E. Hassan and Ian Gorton Last Class - Recap Lot of ambiguity within stakeholders Focus on the needs,


slide-1
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
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
SLIDE 3

What are Quality Attributes

■ Often know as –ilities

– Reliability – Availability – Portability – Scalability – Performance

slide-4
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
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

  • ffer intelligent help
slide-6
SLIDE 6

ICDE Schematic

ICDE Repository ICDE Recording Software Local information repositories

Internet

Analyst 3rd Party Tools

slide-7
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
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
SLIDE 9

Performance

■ Different ways to measure performance:

– Throughput – Response Time – Deadlines

slide-10
SLIDE 10

Performance - Throughput

■ Measure of the amount of work in unit time

– Transactions per second – Messages per minute

slide-11
SLIDE 11

Throughput Example

50 100 150 200 250 300 5 10 15 20 # of threads CPU % MST (msp)

slide-12
SLIDE 12

Throughput Considerations

■ Is required throughput:

– Average? (Video streaming) – Peak? (Bidding)

■ Many system have low average but high peak throughput requirements

slide-13
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
SLIDE 14

Example Response Time

■ E.g. 95% of responses in sub-4 seconds, and all within 10 seconds

slide-15
SLIDE 15

Response Time Considerations

■ Is required response time:

– Guaranteed? (VOIP) – Average? (Search)

slide-16
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
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
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

  • 5. Write event

to ICDE database queue

slide-19
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
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
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

  • n a multiprocessor

machine

CPU

slide-22
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
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
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
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
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
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
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
SLIDE 29

Next Class

■ Monday, Sep. 19 ■ Modifiability ■ Security ■ Availability ■ Integration