Book contents
- Frontmatter
- Contents
- List of Figures
- List of Tables
- Preface
- Acknowledgments
- Disclaimer
- PART I THE TAO OF SCIENTIFIC OOP
- PART II SOOP TO NUTS AND BOLTS
- 4 Design Patterns Basics
- 5 The Object Pattern
- 6 The Abstract Calculus Pattern
- 7 The Strategy and Surrogate Patterns
- 8 The Puppeteer Pattern
- 9 Factory Patterns
- PART III GUMBO SOOP
- Appendix A Mathematical Background
- Appendix B Unified Modeling Language Elements
- Bibliography
- Index
5 - The Object Pattern
from PART II - SOOP TO NUTS AND BOLTS
Published online by Cambridge University Press: 01 June 2011
- Frontmatter
- Contents
- List of Figures
- List of Tables
- Preface
- Acknowledgments
- Disclaimer
- PART I THE TAO OF SCIENTIFIC OOP
- PART II SOOP TO NUTS AND BOLTS
- 4 Design Patterns Basics
- 5 The Object Pattern
- 6 The Abstract Calculus Pattern
- 7 The Strategy and Surrogate Patterns
- 8 The Puppeteer Pattern
- 9 Factory Patterns
- PART III GUMBO SOOP
- Appendix A Mathematical Background
- Appendix B Unified Modeling Language Elements
- Bibliography
- Index
Summary
“Memory is a crazy woman [who] hoards colored rags and throws away food.”
Austin O'MalleyThe Problem
Large software development efforts typically require a degree of consistency across the project to ensure that each developer follows practices consistent with the critical goals of the project. In high-performance computing (HPC), for example, Amdahl's law (Chapter 1) suggests that scaling up to the tens or hundreds of thousands of processor cores available on leadership-class machines requires that every dusty corner of the code make efficient use of the available cores. Otherwise, whichever fraction of the code speeds up more slowly with increasing numbers of cores eventually determines the overall speedup of the code.
Another form of consistency proves useful when one desires some universal way to reference objects in a project. Doing so facilitates manipulating an object without knowledge of its identity. The manipulated object could equally well be an instance of any class in the project.
In HPC, communicating efficiently between local memories on distributed processors represents one of the most challenging problems. One might desire to ensure consistency in communication practices across the project. In these contexts, two broad requirements drive the desire to impose a degree of uniformity across a design: one stemming from a need for consistent functionality, and the other stemming from a need for consistent referencing.
Opposing these forces is the desire to avoid overconstraining the design. In the worst-case scenario, imposing too much uniformity stifles creativity and freezes counterproductive elements into the design.
- Type
- Chapter
- Information
- Scientific Software DesignThe Object-Oriented Way, pp. 107 - 128Publisher: Cambridge University PressPrint publication year: 2011