Design patterns are generalized solutions to commonly occurring problems. That is, they are the abstractions of a set of solutions that solve the same problem in different contexts. The abstraction removes the specifics of the context so that you can reapply the solution in a new context. This allows you to reuse proven solutions as you approach new design tasks. This lets you leverage the experience of other designers. It's a win-win.
For example, consider a safety critical system which uses pressure and flow to perform closed loop control on the delivery of a drug in a medical infusion pump. That system needs to be safe and accurate. Is there a way to arrange design elements to achieve these goals in an optimal way?
Pattern: Protected single channel
- Organize the components into a series of control and data transformational steps. Add error and safety checks at component boundaries.
- Protects against faults in a cost-effect way.
- Organize the components into a series of transformational steps with lightweight redundancy to provide error and safety checks.
- Low-design cost, low-recurring cost, but not able to continue in the presence of a fault, so there must be a fail-safe state.
The base pattern looks like Figure 1. The components are connected as a series of transformational elements (Abstract Data Transforms), each of which may add validity and safety checks (Abstract Transformational Checker). The concrete versions elements are where the components in the model are substituted to apply the pattern in your design.
Figure 1. Single channel protected pattern
Figure 2 shows an application of this pattern. The pressure and flow sensor components feed in raw data which is passed through a moving average and band pass filter before it is used to calculate the updated position of the pump. Each of these transforms has an element to verify it;
- Pressure and flow are checked to ensure that they are within reasonable limits
- Calculated position is verified to ensure that the step taken from the last pump position isn't too large.
If errors are detected, alerts are sent to the alarm manager so that the attending physician can address the problem. In that event, the pump enters its fail-safe state (monitoring, but not delivering drugs).
Figure 2. Application of the single -channel protected pattern
The Harmony process identifies 5 key views of architecture (see Figure 3). They are:
- Subsystem and component view
- The large-scale pieces of the system, their responsibilities and interfaces.
- Concurrency and resource view
- The identification of the concurrency units and their scheduling properties, the allocation of software elements to those threads, strategies for task synchronization and policies for resource use.
- Deployment view
- The allocation of responsibilities across different engineering disciplines, such as mechanical, electronic, and software.
- Distribution view
- The decisions about the distribution intelligence across processing nodes and the technology and policies for communication and collaboration.
- Dependability view
- How system integrity ( safety, reliability, and security) is maintained during the execution of the system, including the identification, isolation, and run-time correction of faults and attacks.
The system architecture is, in an important sense, the sum of the design decisions and patterns in each of these critical areas.
Figure 3. Harmony 5 key view of architecture
You can see design patterns for these different architectural aspects in my books "Real-Time Design Patterns" (Addison-Wesley, 2003) and "Design Patterns for Embedded Systems in C" (Elsevier Press, 2011).
- Learn more about Rational System Architect:
- To learn more about the tool for collaborative, model-driven development for embedded systems, start with the Rational Rhapsody product line overview and the Rational Rhapsody page on IBM developerWorks. Also see the Rational Rhapsody 7.6 information center and the Changing the location of help content to get a local copy of the documentation.
- Explore the various versions, too: IBM Rational Rhapsody Architect for Software, a visual development environment for embedded systems and software
- IBM Rational Rhapsody Architect for Systems Engineers
- IBM Rational Rhapsody Designer for Systems Engineers
- IBM Rational Rhapsody Developer for collaborative, model-driven development of embedded systems. This edition is required for Eclipse users, and editions are available to create specialized projects in C, C++, Java, and Ada languages.
- To learn more about Rational Rhapsody design management capabilities, check out the IBM Rational Rhapsody Design Manager to see how to collaborate, share, review, and manage designs and models with the entire engineering team. Also see the Design Management page on Jazz.net.
- Explore the Rational software area on developerWorks for technical resources, best practices, and information about Rational collaborative and integrated solutions for software and systems delivery.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of them anywhere, anytime, and many of the Getting Started ones are free.
Get products and technologies
- Download a free, fully enabled trial version of Rational System Architect.
- Take an online tour of Rational Rhapsody with an online trial or download Rational Rhapsody or special editions to Evaluate, free of charge, for 30 days.
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, or use it in a cloud environment.
- Participate in the Enterprise Architecture and Business Architecture forum, where you can share information about methods, frameworks, and tool implementations. Discussions include tool-specific technical discussions about Rational System Architect.
- Join the discussion in the Rational Rhapsody forum.
- Get connected with your peers and keep up on the latest information in the Rational community.
- Rate or review Rational software. It's quick and easy.
- Share your knowledge and help others who use Rational software by writing a developerWorks article. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software on Facebook, Twitter (@ibmrational), and YouTube, and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.