Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-jbqgn Total loading time: 0 Render date: 2024-06-16T06:07:05.987Z Has data issue: false hasContentIssue false

8 - The Puppeteer Pattern

from PART II - SOOP TO NUTS AND BOLTS

Published online by Cambridge University Press:  01 June 2011

Damian Rouson
Affiliation:
Sandia National Laboratories
Jim Xia
Affiliation:
IBM Canada Lab in Markham
Xiaofeng Xu
Affiliation:
General Motors Corp.
Get access

Summary

“Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic.”

Miss Piggy

The Problem

While the abstract calculus and strategy patterns apply to the integration of a single physics abstraction, our chief concern lies in linking multiple abstractions. This poses at least two significant software design problems. The first involves how to facilitate interabstraction communication. The GoF addressed interabstraction communication with the mediator pattern. When N objects interact, a software architect can reduce the N(N−1)+ associations between the objects to 2N associations by employing a mediator.

The mediator association count stems from the requirements that the Mediator know each communicating party and those parties know the Mediator. For example, in a mediator implementation presented by Gamma et al. (1995), the sender passes a reference to itself to the mediator. The sender must be aware of the mediator in order to know where to send the message. Likewise, the mediator must be aware of the sender in order to invoke methods on the sender via the passed reference. Figure 8.1 illustrates the associations in an atmospheric boundary layer model, wherein the air, ground, and cloud ADTs might solve equation sets for the airflow, ground transpiration, and discrete droplet motion, respectively.

A second and conceptually more challenging problem concerns how one assembles quantities of an inherently global nature – that is, information that can only be determined with simultaneous knowledge of the implementation details of each of the single-physics abstractions.

Type
Chapter
Information
Scientific Software Design
The Object-Oriented Way
, pp. 167 - 201
Publisher: Cambridge University Press
Print publication year: 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×