+ All Categories
Home > Technology > Non-Functional Requirements

Non-Functional Requirements

Date post: 13-Apr-2017
Category:
Upload: david-simons
View: 489 times
Download: 1 times
Share this document with a friend
32
NFRs The Lovecraftian Requirements that lurk beneath your user stories.
Transcript
Page 1: Non-Functional Requirements

NFRsThe Lovecraftian Requirements

that lurk beneath your user stories.

Page 2: Non-Functional Requirements

What is an NFR

• ‘A functional requirement’ is that it essentially specifies something the system should do.

• ‘A non-functional requirement (NFR)’ is something that specifies how the system should behave - it is a constraint upon the systems behaviour.

Page 3: Non-Functional Requirements

For Example:

• Functional Requirements:• The time should be displayed to the nearest minute

• You should be able to set an alarm time

• At the alarm time, the alarm should go off

• The volume can be set

Page 4: Non-Functional Requirements

For Example:

• Non-Functional Requirements:• The battery life should last at least one year

• Nobody can hack into my alarm clock

• 99.9% of alarm clocks should still work after 3 months. 90% should still work after one year.

Page 5: Non-Functional Requirements

For Example:

Your Project?

Page 6: Non-Functional Requirements

What happens if things go wrong?

• If we’re lucky:• Things are slow

• If we’re only slightly lucky:• Things stop working

• If we’re unlucky:• E.g. Data corruption

Page 7: Non-Functional Requirements

Aim of this talk

• Touch on some of the most common NFRs and briefly examine:• Why are they important?

• What can we do about them?

• And more!

Page 8: Non-Functional Requirements

Performance

• Performance is the degree to which a software system or component meets its objectives for timeliness.

Page 9: Non-Functional Requirements

What makes performance hard?

• Hard or complicated things do take time.

Page 10: Non-Functional Requirements

Common Performance Bottlenecks

• Bad algorithms (e.g. lots of iterating – think big O notation)

• Rendering – i.e. printing on a page, changing what’s displayed on a website • Common issues listed here:

https://developer.yahoo.com/performance/rules.html

• Latency in communication between servers/different bits of hardware• HTTP requests, IO operations

• Badly written database queries• Common issues listed here: http://technet.microsoft.com/en-

us/library/ms177500(v=sql.105).aspx

Page 11: Non-Functional Requirements

Potential Solutions

• Scale your system out bigger/faster hardware; more computers

• Get a better algorithm, or use technologies that are more appropriate

• Batch Requests

• Accept the slowness, and deal with it asynchronously

• Accept slight hits to accuracy and use approximation algorithms

Page 12: Non-Functional Requirements

Capacity

• Capacity is the space, computer hardware, software and connection infrastructure resources that will be needed over some future period of time.

Page 13: Non-Functional Requirements

What sort of things get too big

• Amount of content that we’re storing

• Bandwidth

• Simultaneous Transactions (e.g. number of users)

• Memory

Page 14: Non-Functional Requirements

What to do?

• Where possible, plan up front to be sure you’re using sensible “sizes” of each thing in your software plan

• Be afraid at each step of the way – flag early when something is putting additional load on part of your system

• Depending on what is under strain:• Scaling out

• More efficient (i.e. less memory) algorithms

• Bigger pieces of hardware

Page 15: Non-Functional Requirements

Deployability

• Deployment is about getting your application out into the big wide world.

Page 16: Non-Functional Requirements

Problems with hard deployment

Manual Intervention

Hard Deployment

Do it Less Often

Causes Problems

Page 17: Non-Functional Requirements

“Snowflake Server Antipattern”

Page 18: Non-Functional Requirements

Solutions

• “If something’s hard, do it early and do it often”

• Automate as much as possible• Tools such as Hudson, TeamCity etc. which automate your build process

Page 19: Non-Functional Requirements

Scalability

• Scalability, simply, is about doing what you do in a bigger way.

Page 20: Non-Functional Requirements

Vertical Scalability

• If I give you a bigger server, you can do more stuff with it.

• This is the easier form of scalability – often your applications will do this automatically.

• It’s limited and very expensive.

Page 21: Non-Functional Requirements

Horizontal Scalability

• If I give you more computers, then you can use them.

• Often you don’t get this for free, so have to rework your systems to be “horizontally scalable”

Page 22: Non-Functional Requirements

How to measure scalability

Page 23: Non-Functional Requirements

What makes Scalability Hard

• Getting too big

• Licenses are expensive

• Concurrent programming is hard

• Large amounts of “state” makes distributing processes hard.

• Bottlenecks (often databases)

Page 24: Non-Functional Requirements

Reliability

• Reliability, or 'resilience' is about making software that fails rarely, and can react well to other parts of your system failing.

Page 25: Non-Functional Requirements

What causes systems to go down?

• “Hosting” hardware or software failure

• Malicious users

• Things your software is dependent on going down/being malicious

• Mistakes in the code you’ve written (e.g. memory leaks)

Page 26: Non-Functional Requirements

Nobody’s Perfect

Page 27: Non-Functional Requirements

Build for Failure

• Case Study: Netflix – Chaos Monkey etc.

• Have no single point of failure in your application – always build some redundancy into your system.

Page 28: Non-Functional Requirements

Postel’s Law

• Be conservative in what you do, be liberal in what you accept from others

• Deal with unexpected behaviour from a dependency in a sensible manner.• Corollary: If anything else goes down, we should deal with it gracefully

• Incidentally, this is also a good life philosophy

Page 29: Non-Functional Requirements

Maintainability

• Maintainabibility covers a lot of things - from the low level code; to working in environments which make maintaining code easier; to making your environments themselves maintainable

Page 30: Non-Functional Requirements

Cost of Software

Page 31: Non-Functional Requirements

What makes software unmaintainable?

• Software project is hard to get a working copy of

• Code is hard to understand

• Architecture is tightly coupled – can’t make one change without fear of others

• Changes are hard to deploy

Page 32: Non-Functional Requirements

Maintainability at Each Level

• Line-by-Line Code Level• Clean Code (e.g. good naming)• Tests

• Architecture Level• Clean Code (e.g. decoupling)

• Project Level• Easy to check out and get working• Fast “Feedback Loop”

• Server Level• Easy to deploy and undeploy changes


Recommended