wiley series in software design patterns patterns and ... contents offline reporting other patterns...

15
Wiley Series in Software Design Patterns The WILEY SERIES IN SOFTWARE DESIGN PATTERNS is designed to meet the needs of today’s software architects, developers, programmers and managers interested in design patterns. Frank Buschmann, the Series Editor, as well as authors, shepherds and reviewers will work collaboratively within the patterns community to strive for high-quality, highly researched, thoroughly validated, classic Works which document accepted and acknowledged design experience. Priority will be given to those titles that catalog software patterns and pattern languages with a practical, applied approach in domains such as: Distributed systems Real time systems Databases Business information systems Telecommunications Organizations Concurrency Networking Books in the series will also cover conceptual areas of how to apply patterns, pattern language developments and architectural/component-based approaches to pattern-led software development. TITLES PUBLISHED PATTERN-ORIENTED SOFTWARE ARCHITECTURE, Volume 1 Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad and Michael Stal 0 471 95869 7 476pp 1996 Hardback PATTERN-ORIENTED SOFTWARE ARCHITECTURE, Volume 2 Douglas Schmidt, Michael Stal, Hans Rohnert and Frank Buschmann 0 471 60695 2 636pp 2000 Hardback A PATTERN APPROACH TO INTERACTION DESIGN Jan Borchers 0 471 49828 9 250pp 2001 Hardback SERVER COMPONENT PATTERNS Markus Volter, Alexander Shmid, Eberhard Wolff 0 471 84319 5 462pp 2002 Hardback ARCHITECTING ENTERPRISE SOLUTIONS Paul Dyson, Andy Longshaw 0 470 85612 2 384pp 2004 Hardback PATTERN ORIENTED SOFTWARE ARCHITECTURE, Volume 3 Michael Kircher, Prashant Jain 0 470 84525 2 264pp April 2004 Hardback

Upload: tranhanh

Post on 18-May-2018

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Wiley Series in Software Design Patterns

The WILEY SERIES IN SOFTWARE DESIGN PATTERNS is designed to meet the needsof today’s software architects, developers, programmers and managers interested in designpatterns. Frank Buschmann, the Series Editor, as well as authors, shepherds and reviewerswill work collaboratively within the patterns community to strive for high-quality, highlyresearched, thoroughly validated, classic Works which document accepted andacknowledged design experience. Priority will be given to those titles that catalog softwarepatterns and pattern languages with a practical, applied approach in domains such as:

• Distributed systems• Real time systems• Databases• Business information systems• Telecommunications• Organizations• Concurrency• Networking

Books in the series will also cover conceptual areas of how to apply patterns, patternlanguage developments and architectural/component-based approaches to pattern-ledsoftware development.

TITLES PUBLISHED

• PATTERN-ORIENTED SOFTWARE ARCHITECTURE, Volume 1Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad and Michael Stal0 471 95869 7 476pp 1996 Hardback

• PATTERN-ORIENTED SOFTWARE ARCHITECTURE, Volume 2Douglas Schmidt, Michael Stal, Hans Rohnert and Frank Buschmann0 471 60695 2 636pp 2000 Hardback

• A PATTERN APPROACH TO INTERACTION DESIGNJan Borchers0 471 49828 9 250pp 2001 Hardback

• SERVER COMPONENT PATTERNSMarkus Volter, Alexander Shmid, Eberhard Wolff0 471 84319 5 462pp 2002 Hardback

• ARCHITECTING ENTERPRISE SOLUTIONSPaul Dyson, Andy Longshaw0 470 85612 2 384pp 2004 Hardback

• PATTERN ORIENTED SOFTWARE ARCHITECTURE, Volume 3Michael Kircher, Prashant Jain0 470 84525 2 264pp April 2004 Hardback

Page 2: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology
Page 3: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

This page intentionally left blank

Page 4: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Architecting EnterpriseSolutions

Page 5: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

This page intentionally left blank

Page 6: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Architecting EnteiSol

Patterns for High-Ca

PaAndy L

John Wil

Page 7: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Copyright © 2004 John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester,West Sussex PO19 8SQ, England

Telephone (+44) 1243 779777

Email (for orders and customer service enquiries): [email protected] our Home Page on www.wileyeurope.com or www.wiley.com

All Rights Reserved. No part of this publication may be reproduced, stored in a retrieval system ortransmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning orotherwise, except under the terms of the Copyright, Designs and Patents Act 1988 or under the terms ofa licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London WIT 4LP,UK, without the permission in writing of the Publisher with the exception of any material suppliedspecifically for the purpose of being entered and executed on a computer system for exclusive use by thepurchase of the publication. Requests to the Publisher should be addressed to the PermissionsDepartment, John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ,England, or emailed to [email protected], or faxed to (+44) 1243 770620.

This publication is designed to provide accurate and authoritative information in regard to the subjectmatter covered. It is sold on the understanding that the Publisher is not engaged in renderingprofessional services. If professional advice or other expert assistance is required, the services of acompetent professional should be sought.

Other Wiley Editorial Offices

John Wiley & Sons Inc., 1ll River Street, Hoboken, NJ 07030, USA

Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA

Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany

John Wiley & Sons Australia Ltd, 33 Park Road, Milton, Queensland 4064, Australia

John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809

John Wiley & Sons Canada Ltd, 22 Worcester Road, Etobicoke, Ontario, Canada M9W 1L1

Wiley also publishes its books in a variety of electronic formats. Some content that appearsin print may not be available in electronic books.

Library of Congress Cataloging-in-Publication Data

Dyson, Paul.Architecting enterprise solutions : patterns for high-capability

Internet-based systems / Paul Dyson, Andy Longshaw.p. cm.

Includes bibliographical references and index.ISBN 0-470-85612-2 (cloth : alk. paper)

1. Internet programming. 2. Computer architecture. 3. Computersystems.I. Longshaw, Andy. II. Title.

QA76.625.D97 2004

005.2'76--dc22 2004001727

British Library Cataloguing in Publication Data

A catalogue record for this book is available from the British Library

ISBN 0-470-85612-2

Typeset in 10/12pt Sabon by Laserwords Private Limited, Chennai, IndiaPrinted and bound in Great Britain by Biddies Ltd, King's LynnThis book is printed on acid-free paper responsibly manufactured from sustainable forestryin which at least two trees are planted for each one used for paper production.

Page 8: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Acknowledgements xi

An All-Too-Common Story xiiiIn the beginning ... xiiiIn the middle ... xivIn the end ... xiv

Chapter 1 Introduction 1What this Book is About 1What this Book is Not About 2Why Write this Book? 3Who Should Read this Book? 4

Architects 4Developers 5Project Managers 5Students and Trainees 5

The Structure of the Book 5Part 1 6Part 2 6Part 3 6

Reading the Book 7

PART 1 Architecture, Patterns and Internet Technology 9

Chapter 2 System Architecture 11Architecture, Design and 'Goodness of Fit' 11

Page 9: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

vi Contents

How does this Relate to System Architecture? 13A System View: Hardware and Software 13A System View: The Big Picture 14

What are the Non-functional Characteristics we Care About? 15Availability 15Performance 16Scalability 16Security 17Manageability 17Maintainability 17Flexibility 18Portability 18And the Rest 18

Balancing the Non-functional Characteristics 18System Performance 20System Control 21System Evolution 22Cost as a Non-functional Characteristic 22

Defining System Architectures 22Architectural Views 23Servers, Components and Elements 24

Why do we Care About System Architecture? 24Summary 26

Chapter 3 Internet Technology Systems 27Types of Internet Technology System 28

Style of an Internet Technology System 28Focus of an Internet Technology System 30Characteristics of Internet Technology Systems 32

Why do we Build Systems Using Internet Technology? 34Building Blocks of Internet Technology Systems 36

Isn't this Enough? 39Why is it Difficult? 39

A Sea of Troubles 40Internet System Horror Stories 41

Summary 44

Chapter 4 Architectural Patterns for Internet TechnologySystems 45Patterns, Languages and Internet Technology 45Why do we use Patterns? 46Patterns vs Principles 47Organization of the Patterns 48

Page 10: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Contents vii

Presentation of the PatternsPatterns in the Main ChaptersPatterns in the Appendix

Navigating the LanguageSummary

Chapter 5 The GlobalTech SystemThe Business CaseThe System Overview

Functional Requirements OverviewNon-functional Requirements Overview

Summary

PART 2 The Patterns

Chapter 6 Fundamental PatternsGetting the Shape RightAPPLICATION SERVER ARCHITECTUREPERIPHERAL SPECIALIST ELEMENTSWhat makes these Patterns Fundamental?Summary

Chapter 7 System Performance PatternsI Feel the Need, the Need for SpeedPrinciples

RedundancyFunctionally-Identical Elements

ACTIVE-REDUNDANT ELEMENTSLOAD-BALANCED ELEMENTSSESSION FAILOVERDEDICATED WEB AND APPLICATION SERVERSCOMMON PERSISTENT STOREWhy Tiers are not a Catastrophe

Seeds of the CatastropheThe Terminology TrapFrom Two-Tier to N-TierOne Size does not Fit All

DATA REPLICATIONHow many Servers do you Need?Costing the GlobalTech System

CONNECTION LIMITATIONRESOURCE POOLINGLOCAL CACHE

5151525254

555657576167

69

717171798687

89899192929397

103108113117117118119121122125129132135137

Page 11: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

viii Contents

OFFLINE REPORTINGOther Patterns

Chapter 8 System Control PatternsDangerous (adj.): Speed Without ControlTerminologyCONTINUAL STATUS REPORTINGOPERATIONAL MONITORING AND ALERTING3-CATEGORY LOGGINGSYSTEM OVERVIEWDYNAMICALLY-ADJUSTABLE CONFIGURATIONDEMILITARIZED ZONEINFORMATION OBSCURITYSECURE CHANNELSSecure Sockets Layer and SSL Acceleration

Secure Sockets LayerSSL Acceleration

KNOWN PARTNERSOther Patterns

Chapter 9 System Evolution PatternsPlus Ca ChangePrinciples

One-Way DependenciesStandard ProtocolsIsolating Layers and Adapters

DYNAMICALLY-DISCOVERABLE ELEMENTSEXPANDABLE HARDWAREVIRTUAL PLATFORMSWAPPABLE STAGING ENVIRONMENTSEPARATE SYSTEM-MANAGED DATAOther Patterns

PART 3 Application of the Patterns

Chapter 10 GlobalTech RevisitedReviewing the ArchitectureArchitecting for System Performance

Logical ArchitectureDeployment Architecture

Architecting for System ControlLogical ArchitectureDeployment Architecture

140143

145145146146154161166171178185194200200202203207

209209210211212213213216220225230235

237

239239239239241243243245

Page 12: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Contents ix

Architecting for System EvolutionLogical ArchitectureDeployment Architecture

Summary

Chapter 11 Applying the PatternsNot Quite the Simplest System that Could Work

RequirementsEntry-Level ArchitectureOther Patterns in the Entry-Level Architecture

Which Patterns to ApplyA Process for Applying the Patterns?Examples of Applying the Patterns

Building a Supply ChainCollaborating Around the World

Summary

Chapter 12 Moving on from HereTechnology

Open Source SoftwareWeb ServicesJ2EE.NET

Tool SupportTesting ToolsConfiguration Management ToolsBuild and Deployment Tools

Development ProcessAn Evolutionary Approach to ArchitectureConclusion

Appendix Reference Patterns

Bibliography

Glossary

Index

246246247249

251252252254259263264266266270273

275276276278279280282282284285287288289

291

351

353

359

Page 13: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

This page intentionally left blank

Page 14: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

Acknowledg

No book is ever purely the work of the authors alone. There are those that helpshape the ideas that form the core of the book, those that help the authors to actuallywrite the book, and those that support the authors through the writing process.We'd like to take the time to thank those people here.

The first public outing for some of the core ideas in the book came at a workshopat the OT2002 conference in Oxford, England. We'd like to thank Anthony Barnes,Andrew Broughton, Mark Campbell, Stephen Hutchinson, Clive Menhinick, VeraPeeters, Rajiv Tyagi, Louise Whelan, and Eoin Woods for their contributions at theconference. Following this we submitted two pattern language papers to consecutiveEuroPLoP conferences (in 2002 and 2003, both at Kloster Irsee) for peer review.There are too many reviewers to list individually here, but we would like to say a bigthank you to all the members of our writers' workshops: you know who you are.We would particularly like to thank Peter Sommerlad and Klaus Marquardt whoeach shepherded one of the papers.

We would also like to thank the people who have taken the time to review andcomment on this book through its various stages of development: Aaldert Hoffman,Arno Haase, Bobby Woolf, Kevlin Henney, Markus Volter, Michael Jackson, SteveBerczuk, and Wolfgang Keller. Klaus Marquardt deserves a special mention. Klaus,the time and effort you must have spent in all your reviews and the attention todetail of your comments, amazed us both. This book is certainly improved throughyour many contributions - cheers!

Finally, we'd both like to thank Michael Stal for shepherding this book and oureditor Gaynor Redvers-Mutton. You've both stuck with us from beginning to endand your help and support have been invaluable.

Paul Dyson would particularly like to thank James Spalding and Rod Williams ofe2x limited for their backing whilst writing this book. I would also like to thankBruce Anderson who got me started on all this 'architecture stuff and still challengesand guides a lot of my thinking, as well as being a good friend. Lastly, I can't really

XI

Page 15: Wiley Series in Software Design Patterns patterns and ... Contents OFFLINE REPORTING Other Patterns Chapter 8 System Control Patterns Dangerous (adj.): Speed Without Control Terminology

xii Acknowledgements

say how much the love and support of my wife Angela and my son Josh mean to me,despite the hours locked up in my study or sitting on the sofa with my laptop - thankyou both.

Oh, and Andy: it's been a pleasure working with you over the past year or so - I'velearned a lot and really enjoyed the experience. But I have to sing: 'Since City werethe champions, my true love gave to me: Eight Premiership titles, Seven FA Cupvictories, Six past the Arsenal, ..., and a treble winning season'.

Andy Longshaw's main thanks go to Sarah, Adam and Josh for putting up withthe extra work and late nights required to write this book, for their indulgence ofthe consequent grumpiness, and for the drawings and cups of tea delivered whilewriting. They are far too familiar with my working pattern and some day I mayactually stop doing it, balance my life and learn to appreciate them properly. I wouldalso like to thank Dave de Naeyer for allowing me to architect his system and writethis book in parallel and for his perceptive questioning. A vote of thanks is also inorder for the many people with whom I've had great discussions about architectureover the past two years including Eoin Woods, Kevlin Henney, Arno Schmidmeierand many more.

And finally to Paul, who has been a joy to work with -1 have learned a lot fromthis and I thank you for that. Also, I admire your fortitude in continuing withthis book in the face of '1 easy point' last season and I hope you appreciate thelevel of stick I could have given you for being a United fan who lives nowherenear Manchester.