Multiple-Context Systems: A New Frontier in Architecture
Summary: Multiple-context systems are those in which a single architecture and core assets must function well in several different environments. Examples include product-line architectures, as well as certain elements of enterprise architectures—especially those that have integration and infrastructure responsibilities. Unlike single-context systems, which resolve one set of forces, multiple-context systems must resolve the forces in each individual context.
A context is a collection of stakeholderswho share a similar set of perceptions,priorities, and desired outcomes and aresubjected to a similar set of conditions andforces.1 Marketing professionals call them “market segments” and use them to target advertising and other forms of marketing campaigns. Architects can use contexts to define and create effective solutions for a related set of deployment environments.2
Table 1 shows a simple example of contexts at work. Consider a Thinsulate ski parka, which is temperature-rated to –40°F. You would expect this parka to be as shown in Table 1.
Table 1. Context example
While these generalizations might not hold true over every context member who matches the criteria, it is reasonable to expect that they will hold true in a large percentage of cases. Well-defined contexts are powerful, because conditions and forces tend to be linked to perceptions and priorities, and the combination of these drives desired outcomes.
Real-World Examples of Multiple-Context Systems
Before exploring the proposed approach to multiple-context systems, let us first consider two real-world examples:
A third example, which is based on medical reporting, will be presented later and used to illustrate how to apply the multiple-context approach.
Transportation Routing and Scheduling
Several organizations coordinate a set of drivers who pick up and deliver shipments within a local geographical area. These organizations have several important commonalities:
Table 2 summarizes three common local-area-transportation contexts.
Table 2. Local-area-transportation contexts
Semiconductor fabrication is a process that creates hundreds of microprocessor or memory chips on a 300mm silicon wafer.
Complex circuits might require several hundred processing steps, using a variety of tools.
Each of these tools shares a set of important commonalities:
As Table 3 shows, there are four general classes of semiconductor-fabrication tools, and the drivers for each tool have important differences.
Table 3. Semiconductor-fabrication-tools contexts
On the surface, each of these examples appears to have enough commonality to motivate the creation of a single solution to span the domain. Yet, consider this advice, which was given a few years ago by an anonymous participant at a software-product-line conference session:
The primary motivation for companies to embark on product-line architecture is to gain ROI by exploiting commonalities among products. Unfortunately, the only way to reliably realize the increased ROI is by comprehending and managing the differences among the products.
Suppose that you are trying to raise several million dollars to design and build a general-purpose medical-reporting-system solution. You expect that the venture capitalists will want to know, “For which parts of the medicalindustry will your system be an effective solution?” (This is a fictionalized example that is based on the author’s prior experiences with medical-reporting challenges in healthcare institutions.)
The multiple-context approach provides a useful framework for addressing this question. Three high-level steps are required:
Anatomy of a Context
Before we drill into the medical-reporting example, let us take a few moments to explore the anatomy of a context. Figure 1 illustrates a general pattern that represents the goodness of fit between a context and solution.
Figure 1. Solution fit, with context (Click on the picture for a larger image)
As previously mentioned, members of the context share similar desired outcomes and face similar challenges. This is due to the fact that they share similar perceptions and priorities and are subject to similar environmental forces and conditions.
When challenges block desired outcomes, a gap is created between the current and future states. Painful or desirable gaps motivate solutions that overcome the gap’s unmet challenges. A solution is successful if the prioritized challenges of its contexts are addressed well by the features and capabilities of the solution architecture.
Step 1: Identify contexts and challenges.
Identifying contexts seems like a simple-enough proposition. However, doing this well relies heavily on systems-thinking skills, which provide the ability to abstract and understand arbitrary systems in context. Several authors (such as Ackoff,3Senge,4 Goldratt,5 Weinberg,6 and Taleb7) have written excellent texts that address various aspects of systems thinking.
For example, we might consider organizing contexts by institution size: physician practice, outpatient clinic, community hospital, urban medical center, and university hospital. However, this is not as useful a segmentation tool as it might appear. The boundaries do a useful job of organizing by size, but there is too much diversity within some contexts and too much overlap among them.
A better set of segmentation criteria can be found by examining behaviors around the intended function: medical reporting. Whenever a patient sees a clinician, a medical report must be created and stored in the patient’s file. These requirements apply from small physician practices up to large hospitals; methods vary from paper files to electronic records. Some common requirements for all contexts include:
One important insight is that there are some important patterns in the reasons that medical reports are created. These patterns identify clusters of behavior and form initial hypotheses for contexts, as summarized in Table 4.
Table 4. Medical-reporting contexts
Cross-context commonalities are often apparent, as the three preceding examples show. However, below the surface, important context-specific variations exist.
Step 2: Analyze contexts by using comparisons of challenges.
Our initial context descriptions in Table 4 are a useful start. However, in order to better understand their desired outcomes and challenges, we must pop-up a level. We must better understand how medical reporting fits into the overall scheme of healthcare institutions in each context.
A critical caution should be made here. Naïveté is the cause of a large percentage of poor architecture and design decisions.
Sometimes, the naïveté is about a poor understanding of contexts in which a system will be used; at other times, it is about constraints that are inherent in the solution technologies or how two technologies might interact. Subject-matter expertise is tightly coupled with systems thinking. The skill of recognizing central organizing principles and using them to reason about other areas can greatly increase the velocity of learning.
Additional research—such as interviews with industry experts or published market-research reports—is needed to increase the depth of our understanding. Table 5 shows an example output from this activity.
Table 5. Cross-context challenges for medical reporting
Two conclusions are readily apparent from this analysis:
Step 3: Synthesize compatible contexts.
The analysis of prioritized challenges is a litmus test. It is useful for making educated guesses to rule out obvious mismatches and identify affinity among other contexts. However, by itself, it usually is not precise enough to make definitive decisions.
To get more precise, we must consider important aspects of the solution architecture. In some cases, you begin with an existing architecture; at other times, you do not. For the medical-reporting example, we assume that we are starting with a clean slate. Figure 2 illustrates a way to approach this problem, which can be adapted to cases in which the solution architecture exists or is hypothetical.
Figure 2. Multiple-context assessment (Click on the picture for a larger image)
Figure 2 shows five aspects that are important for multiple-context analysis. Each of these is discussed in the following subsections. Space limitations do not permit an in-depth exploration of a multiple-context architecture of the medical-reporting example. However, examples from this problem will be used to embellish these aspects.
Step 2 of the process elaborated three contexts that are relevant to the medical-reporting problem. In Table 4, we identified these contexts and captured their drivers (for example, forces, conditions, and perceptions). In Table 5, we prioritized the challenges for each context.
An architectural approach is a small set of related decisions that are intended to attack one or two specific challenges8 .An ordered list of architectural approaches (plus the rationale for each) is the nucleus of an architectural strategy. Earlier architectural approaches tend to constrain later ones. For this reason, it is good practice for earlier architectural approaches to focus on the challenges of highest priority.
In the medical-reporting example, the Patient-centric context has a high-priority need to enable communication among clinicians. However, this is not a pressing priority for the Treatment-centric context. Assume that we want to preserve the opportunity to address both contexts with a single platform. To do so, we must find a suitable approach for this problem that minimizes the constraints that it imposed on other challenges.
One way to accomplish this might be to provide a message-based communication subsystem that:
In addition to attacking challenges, each architectural approach also offers a certain level of flexibility. In Figure 2, this is represented by a label that appears to the left of the approach. These labels can be extended, as needed. The following is one possible set:
An approach like the one that was previously described can be designed in a modular way. Runtime configuration and plug-in components can be used to customize the needs of different contexts. These features could be one of the following:
The Software Engineering Institute (SEI) wrote about a technique for assessing software-architecture suitability.10 In this approach, architectural decisions are scrutinized for how well they support quality-attribute scenarios. In our model, architectural approaches are equivalent to SEI architectural decisions, and quality-attribute scenarios are equivalent to desired outcomes and challenges in a context.
To assess the suitability of an approach, form a matrix that has challenges as the columns and approaches as the rows. The challenges might be from one specific context or might be blended from two or more. The list of approaches might be extracted from an existing architecture or might have been formulated as part of a hypothetical architecture.
Each cell in this matrix represents the impact of one approach on one challenge. Possible values include the following:
Another approach is to color the cell by using three shades of green to represent positive impacts and three shades of red to represent the negative impacts. The visual presentation helps identify trade-offs (negative impact) and coverage (limited or no approaches to a challenge).
In the medical-reporting example, suitability can be assessed in two ways:
A similar matrix, which is illustrated in Table 6, is useful for identifying the dependencies among approaches. This is critical for any analysis that attempts to reuse software across two contexts that are not highly compatible. Any software that is being reused must be loosely coupled to the things on which it depends.
Table 6. Types of inter-approach dependencies
Each cell in this matrix represents how the approach in the column depends on the approach in the row.11 There are several types of cross-dependencies that can be represented in each cell.
In the medical-reporting example, this analysis might highlight that the messaging approach depends on a special mechanism to deliver asynchronous notifications from the server to Web clients. The solution architectures for the Treatment-centric and Patient-centric contexts can already include such a mechanism, but the Order-centric architecture might not. This realization forces us to either:
Multiple-context systems occur when one solution seeks to resolve several sets of stakeholder needs and environmental forces. The approaches to architecting single-context and multiple-context systems, while similar, have some critical differences. The latter require you to discern the contexts, identify and prioritize the key challenges in each, and compare these lists to determine whether the challenges are compatible. As soon as this determination has been made, the compatible contexts must be prioritized according to business value, and their weighted challenges must be merged into a blended list. Then, the process of considering the challenges in order of descending priority and formulating effective approaches is essentially the same.
About the Author
Charlie Alfred ( email@example.com) has 30 years of experience in software development, including the last 10 years as a software architect. During this time, he has worked on several types of systems, including real-time control, transaction processing, optimization, and software-product lines. Charlie lives with his family in Nashua, NH.
Issue 23 Index
Goals and Aspects
In goal-oriented approaches:
When we use goal-oriented approaches, some of the goals repeat themselves all over the system. This implies that when the system is being modeled, the model will have the same goals spread all over the model. This, in turn, will boost the complexity of the model and will make the evolution of the model over time more difficult than necessary.
One way to overcome these problems is to use a hybrid approach, which means that goals are still used to model the system, and aspects are added to modularize scattered goals. Then, the goal (an aspect in reality) will be represented only once in the entire model; as such, the complexity of the model will be reduced, and the readability of it will be greatly improved. In the end, the evolution of the model over time will be easier.
In goal-oriented approaches, goals are always being refined; as such, one important question arises: “What is the timing at which we know that we should incorporate aspects into the model?” Actually, there is no fixed timing for it. It should be done as soon as we are happy with the overall model and the overall refinement of the existing goals.
To identify aspects, we should find crosscutting goals (and obstacles) and identify and reuse patterns. Doing this in parallel provides a new opportunity to find refinements on existing parts of the current model. When the aspects have been identified, the next step will be to build the aspects model and then compose them back into the original model. One other thing that is possible to incorporate into aspects
is relations (such as “at,” “before,” and “after”) to provide temporal feedback between aspects and goals.
Finally, to incorporate aspects into the model, we should use roles. Roles will enable us to perform pattern matching on our model, so as to switch some goals for our aspects.
When aspects have been put in place—and because we are using roles—we must bind them. This means that we have to instantiate roles to current model elements.
The big advantage of this approach is in identifying earlier in the development life cycle the parts of the system that should be made generic, as aspects are the scattered goals that we have on our system.
André Gil holds a degree in Computer Science and an MSc in Software Engineering. A developer who has many years of experience in .NET, he is currently involved in a project with Indra for the biggest telecommunications operator in Portugal. André can be reached at firstname.lastname@example.org.