CSci 658: Software Language Engineering
Architectural Mismatch

H. Conrad Cunningham

17 February 2018

Copyright (C) 2018, H. Conrad Cunningham
Professor of Computer and Information Science
University of Mississippi
211 Weir Hall
P.O. Box 1848
University, MS 38677
(662) 915-5358

Advisory: The HTML version of this document requires use of a browser that supports the display of MathML. A good choice as of February 2018 is a recent version of Firefox from Mozilla.

Architectural Mismatch

These notes accompany discussion of the paper [Garlan 1995]:

Introduction

The ability to systematically construct new software systems from pre-existing components remains an elusive goal.

Why?

The authors call the latter type of incompatibility an architectural mismatch.

Architectural mismatches are usually more subtle and pervasive than the low-level incompatibilities. Frequently the architectural assumptions of a component are implicit; they are seldom documented and often not even acknowledged by the designer of the component.

Aesop

The authors of the paper, who are software architecture researchers at Carnegie Mellon University, discovered the problem as they were developing Aesop, an implementation platform for experimenting with architectural development environments.

Aesop generates an environment as an open collection of tools built around a shared architectural-design database. The tools execute as separate processes and access the database via remote procedure calls.

Aesop also uses event-broadcast system as a tool-integration mechanism. A tool can register to receive notification of changes to certain database objects; it can also announce important events to other tools via the system.

Example tools include a graphical editor for creating, examining, and modifying architectural design descriptions, managers for the repositories of components, analysis and consistency checking tools, and code generators.

In the design of Aesop, the authors sought to reuse existing components:

The chosen tools seem quite stable; all have been used on several projects. They also seem compatible; all are implemented using either C or C++ with source code available. Thus the task of building an Aesop prototype did not seem to be a massive effort-–estimated at approximately one staff-year of work during a six-month schedule.

Unexpected Problems

The authors’ rosy development plan failed. The first prototype took five times as long and five times as much effort to get working-–approximately five person-years of work during a two-and-a-half-year period. And then the resulting system performed very sluggishly and was very difficult to maintain.

The authors identify six primary difficulties they had in integrating the four components.

  1. Code bloat

    Any program that interacted with the Aesop system grew excessively large in size. A simple 20-line program might end up as 600,000 ones of code when all the interfaces were included.

  2. Poor performance

    The programs performed poorly because of the overhead of the tool-to-database communication and because of the excessive code size.

  3. Need to modify the pre-existing packages

    Some of the tools have subtle incompatibilities or deficiencies that required considerable time to understand and remedy.

    For example, the event mechanisms in SoftBench and InterViews are not completely compatible. Since the event communication mechanism was a critical piece of functionality, the code had to be modified for Aesop.

  4. Need to reimplement some existing functions

    Even though a capability was present in a pre-existing component, it was sometimes necessary to reimplement the capability to allow it to work as needed with the other components in Aesop.

    For example, the authors replaced the OBST transaction mechanism by a version that allows the sharing of transactions across multiple address spaces.

  5. Unnecessarily complex code

    Simple sequential tools often had to become quite complex multithreaded tools because of the need to work through the standard interface.

  6. Error-prone construction process

    Building a system from its sources was a very time-consuming process. Because of the large code size, compilation was slow. Because of the high degree of interdependence, a simple code change might cause the need to recompile the entire system. The automated build procedures proved quite fragile.

What went wrong?

In analyzing the problem, the authors discovered that most of the problems resulted from architectural mismatch. The architectural assumptions made by the various components are in conflict.

Components and Connectors

To understand the architectural mismatch, it is helpful to view a system as made up of components and connectors.

components:
the high-level computational and data storage entities in the system.
connectors:
the interactions among the components.

The authors identify four primary categories of assumptions that can lead to architectural mismatch.

  1. Nature of components

  2. Nature of connectors

  3. Global architectural structure

  4. Construction process

Conflicting Assumptions in Aesop

Aesop architecture:

Nature of components conflict

Nature of connectors conflict

Global architectural structure conflict

OBST assumes that all communications in the system occurs in a star configuration, with itself at the center of the star. It assumes that there is no direct interaction between other tools. It’s transaction mechanism is designed to control access and maintain consistency in that type of environment.

However, the Aesop’s communication structure is a more general graph and its tools must often cooperate without involving the OBST database. OBST’s transaction mechanism can result in deadlock or database inconsistency in this environment.

As a result, the authors found it necessary to build their own transaction mechanism to run on top of OBST.

Construction process conflict

Several of the packages used assume that there are three categories of code in the system:

  1. the unchanging, lower-level infrastructure it assumes (e.g., the package’s own runtime library and the X Window library)

  2. the user’s application code (written in C or C++) that uses the infrastructure but is otherwise self-contained

  3. code generated by the package that controls and integrates the rest of the application. (The user may have supplied information for generating this code in the package’s “scripting language”.)

However, several of the packages used in Aesop took such an approach. This added a fourth category of code to the above three.

  1. code generated by other packages in the system.

The code in the fourth category makes the build process more complicated and fragile.

For example, to build systems involving SoftBench, OBST, and Mach Interface Generator (MIG), the authors had to “take the output of the OBST preprocessor and specify the resulting procedure calls in MIG’s notation, run MIG to generate a server version of the database, and then rebuild all the tools (including rebuilding and linking the SoftBench wrapper code) to recognize the new client interface.” … Doesn’t sound like fun to your instructor!

Recommendations

The authors suggest that a long-term solution to the problem of architectural mismatch should have at least the following aspects:

  1. Make architectural assumptions explicit.

    Creation of good documentation is a problem at all levels of design. In the code, the problem is probably more cultural and managerial than technical. For example, good mechanisms exist for documenting code, but they are often not used in practice.

    Documentation of the architectural level has the additional problem of having less well-developed concepts, notations, and tools for supporting the documentation. Architectural description languages is an area of current research.

    Instructor’s note: Part of the authors’ research deals with architecture description languages and their formal underpinnings.

  2. Construct large software pieces using orthogonal subcomponents.

    In most current systems, the architectural design assumptions are spread throughout the constituent modules. In general, it is very difficult to separate a system into pieces or change the way the components work together.

    The principle of information hiding seems just as important at the architectural level as it is at the code level. Architectural assumptions that might change should be hidden (encapsulated) within modules, so that a change in the assumptions would only affect a few modules of the system.

  3. Provide techniques for bridging mismatches.

    The authors suggest several techniques for alleviating the problems resulting from architectural mismatches.

  4. Develop sources of architectural guidance.

    Some progress is being made in this area. Various systems of design patterns are being recorded and disseminated in books and articles. Architecture- and application-specific software frameworks are being developed.

Acknowledgements

I wrote these notes to accompany the discussion of the Architectural Mismatch paper [Garlan 1995] in the first offering of my Software Architecture topics course in Spring 1998.

I subsequently revised it for use in later offerings of my Software Architecture and Software Families courses.

In Spring 2018 I reformatted these notes from HTML to Pandoc Markdown for possible use in my CSci 658 Software Language Engineering course.

I maintain these notes in the Pandoc dialect of Markdown using embedded LaTeX markup for and mathematical formulas, and then translate the notes to HTML, PDF, and other forms as needed.

References

[Garlan 1995]
David Garlan, Robert Allen, and John Ockerbloom. Architectural Mismatch: Why Reuse is So Hard, IEEE Software, Vol. 12, No. 6, November 1995.

Concepts

TODO