“Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky...

22
“Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky...

Page 1: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

“Assessing the Complexity of Software Architecture”

Moshsen AlSharifWalter P. Bond

Turky Al-Obtalby

Presentation by:

Martin Hoffman

Page 2: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Problem

• Primary activity of Software Architecture design is decomposition.

• Reduce complexity into manageable parts.

• Process is an art form, not a defined procedure.

• Architect must decide which component to process and how.

Page 3: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Complexity

• Intra-component complexity – Complexity within a component

• Inter-component complexity– Complexity between components

• Reducing intra-component complexity sometimes increases inter-component complexity.

Page 4: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Purpose

• Formulate a way to identify and calculate the complexity factors within inter and intra-complexity.

• Compile a new metric to measure the overall complexity of the software architecture.

Page 5: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Complexity Measurement

• Complexity measurement methods can be categorized as:

1. Internal-code-based: source code of the modules is available

2. External: information or control-flow between modules is available

3. Hybrid-code-based: both source and flow information is available.

• Goal is to measure complexity in the architecture design phase.

Page 6: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Full Function Points (FFP)

• FFP methodology is based on the Functional Size Measure (FSM), which is used to measure complexity.

• FFP is used to evaluate the decomposition of systems.

• FFP is able to measure intra- and inter-component complexity.

Page 7: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

FFP Functionality measurement

• An architecture is made up of components• Each component contains a collection of

services (functionality) that each component provides for other components.

• These components affect the interface (external dependency) and internal work of each component.

• Functionality measurement serves as an indicator of the internal and external complexity.

Page 8: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

#1 Weakness in FFP

• Does not account for the number of other components a component interacts with.

• Example: a functional process reads/writes to many other functional processes, FFP does not consider where that functional process resides.

• FFP does not address coupling for identified components.

Page 9: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

#2 Weakness in FFP

• FFP defines Read/Write data in reference to storage without distinguishing if that storage is local or shared between components.

• Shared data has additional complexity.

Page 10: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Resolution

• #1: Count coupling as additional source of complexity but only in cases where the component is a client. (import)

• #2: Identify components that write to shared memory (CW) and those that read (CR). Define coupling caused by shared data as (CW * CR).

Page 11: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Steps to measure Software Complexity

1. Identify the components of the architecture.

2. Identify the functional processes of each component.

3. Identify the sus-process of each functional process.

4. Compute the Component Complexity CXi of component i.

5. Compute the Component Coupling CCi of component i.

Page 12: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Steps to measure Software Complexity - continued

6. If Shared data is used, compute complexity and coupling effect on system

7. Model the system complexity and coupling as vectors. A system w/ n components and m shared data would result in n+m complexity terms and n+m coupling terms.

8. Compute System Complexity SX and System coupling SC using Euclidean norm distance formula.

Page 13: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Example – KWIC

• Key Word In Context (KWIC)• Inputs: set of text lines

• Human Species• Have Failed

• Output: all circular shifts of these lines in alphabetical order.

• Failed Have• Have Failed• Human Species• Species Human

Page 14: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Shared Data Architecture

Communication between modules using Shared memory.

Page 15: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Shared Data Architecture

Moderate Component complexity, High Coupling due to shared data solution. Poor attention to the reuse Quality Attribute

Page 16: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Abstract Data Type Architecture

Internal module implementation is hidden. Internal data representation is protected. Access functions are the only way to store and retrieve data.

Page 17: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Abstract Data Type Architecture

More complex solution resulting in more components but less coupling. Better reuse and modifiability.

Page 18: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Implicit Invocation Architecture

Based on the abstract data, using an active data model. Data triggers events to interested components.

Page 19: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Implicit Invocation Architecture

More Component complexity but less Coupling.

Page 20: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Pipe and Filter Architecture

Data flow approach.

Page 21: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Pipe and Filter Architecture

Low complexity and coupling. Better architecture than previous examples.

Page 22: “Assessing the Complexity of Software Architecture” Moshsen AlSharif Walter P. Bond Turky Al-Obtalby Presentation by: Martin Hoffman.

Conclusion

• The new FFP can be used to measure the complexity of alternative architectures.

• Complexity can be determined early in the architecture life-cycle.