Project Risk - Integration Failure


Integration failure is one of the largest areas of technical risk for most projects.
What is integration failure? When the team is unable to combine individually unit tested modules into a complete working system. Analogy: (wallpaper cartoon) or ( image )
Exactly what does that mean?  Either the units won't all compile together or they will compile, but won't execute successfully.
What's an example?

Example 1:
Developer A's unit says:     public int findName(String user)
but Developer B who calls this unit wrote
                    if (findName(myUser)) ...
because developer B expected A to return a boolean, not an int.
So the modules won't compile together.  

Example 2:
  Developer B wrote
                    int result = findName(myUser)
                    if (result < 0)  reportMissingUser();
expecting developer A to return -1 if the user wasn't found,
but actually developer A returns zero in that case. 
So the modules will compile together but won't execute correctly.

How does this happen?
1.  The team has no source code repository.  Developers write their modules independently, and uses the "Big Bang" approach below.

2. The team has a source code repository, but no integration plan and no process to control how units get submitted.  Developers are allowed to commit to the repository at will.  This is the "Chinese Water Torture" approach below.

Is the a better way?
Yes, the incremental approach described below, which gets realized as an Integration Schedule.

Integration Strategies

Issue: How do we combine individually unit tested modules into a complete system?

Six Solutions

  1. Big Bang

  2. Chinese Water Torture
  3. Incremental

  4. Bottom - Up

  5. Top - Down

  6. Threads

 


Big Bang (or "shake and bake")

Method

Throw all the modules together into a large bag and shake vigorously ... it usually goes "bang." In other words, integration doesn't begin until all modules are unit tested, then all modules are integrated and tested simultaneously.  This is most common when the team has no shared code repository, or developers are "hoarding" their work and not committing it.

Disadvantages

Advantages

 

 



Chinese Water Torture

Method

The team has a source code repository, but there is no integration planning and no process to control how units get submitted.  Developers are allowed to commit to the repository at will.  Usually at the end of the work day all developers submit their new code to the repository, and the next morning everyone comes in to find something unexpected broken.  Frequently developers spend a large amount of time isolating problems and then reworking their code.

It's like the "big bang" but in slow motion and without the pizza.  Excruciating and demoralizing.




Incremental Approach

Method

  1. Implement the interfaces first (this was a requirement in our project; coding and compiling the module headers).

  2. Code and unit test an individual module.

  3. Add the module to the system.

  4. Test and debug the system.

  5. Repeat until the system is complete.

Disadvantages

Advantages

Template for Integration Schedule.

Suggested detailed incremental development process.

 


Top-Down Approach

Method

Use the incremental approach. The order of integration proceeds from the top of the structure chart down.

Disadvantages

Advantages

 

 


Bottom -Up Approach

Method

Use the incremental approach. The order of integration proceeds from the bottom of the structure chart toward the top.

Disadvantages

Advantages

 

 


Threads (or "staged") Approach

Method

Use the incremental approach. The order of integration proceeds as follows:

Determine which subset of modules (a "thread") are needed to perform each function required in the specification.

Allocate the threads to "stages," where each stage demonstrates a significant partial functioning system.

Implement in top-down order.

Disadvantages

Advantages

 


Exercise: Can you identify which integration strategy is implied by the directions in this memo?

 

Learn a simple three-step technique to create an integration schedule for the modules in a class diagram.
Then try it yourself on this class diagram.

 

(Winter 2011) Discuss: What were the advantages and disadvantages that you experienced following the Crazy Eights integration schedule in lab?