SOA Design Patterns - Gbv.de

Transcription

SOA Design PatternsThomas Erl(with additional contributors)PRENTICE HALLUPPER SADDLE RIVER, NJ BOSTON INDIANAPOLIS SAN FRANCISCOENEW YORK TORONTO MONTREAL LONDON MUNICH PARIS MADRIDCAPETOWN SYDNEY TOKYO SINGAPORE MEXICO CITY

ContentsForewordCHAPTERxxxvii1 : Introduction11.1 Objectives of this Book41.2 Who this Book is For41.3 What this Book Does Not CoverTopics Covered by Other BooksWeb Service and REST Service Design PatternsSOA Standardization Efforts44551.4 Recommended Reading61.5 How this Book is OrganizedPart I: FundamentalsPart II: Service Inventory Design PatternsPart III: Service Design PatternsPart IV: Service Composition Design PatternsPart V: SupplementalPart VI: Appendices7888910101.6 Symbols, Figures, Style ConventionsSymbol LegendHow Color is UsedData Flow and Directionality ConventionsPattern Documentation Conventions11111111111.7 Additional InformationUpdates, Errata, and Resources (www.soabooks.com)Visio Stencil (www.soabooks.com)111112

xivContentsCommunity Patterns Site (www.soapatterns.org)Master Glossary (www.soaglossary.com)Supplementary Posters (www.soaposters.com)The SOA Magazine (www.soamag.com)Referenced Specifications (www.soaspecs.com)Notification ServiceContact the AuthorCHAPTER2 : C a s e Study Background12121212121313152.1 Case #1 Background: Cutit Saws LtdHistoryTechnical Infrastructure and Automation EnvironmentBusiness Goals and Obstacles171818182.2 Case #2 Background: Alleywood Lumber CompanyHistoryTechnical Infrastructure and Automation EnvironmentBusiness Goals and Obstacles191920202.3 Case #3 Background: Forestry RegulatoryCommission (FRC)HistoryTechnical Infrastructure and Automation EnvironmentBusiness Goals and Obstacles21212122PART I: F U N D A M E N T A L SCHAPTER3: Basic Terms and ConceptsPurpose of this Introductory Chapter3.1 Architecture FundamentalsA Classic Analogy for Architecture and InfrastructureTechnology ArchitectureTechnology InfrastructureSoftware ProgramRelationship to Design Framework2526262727303233

CHAPTER3.2 Service-Oriented Computing FundamentalsService-Oriented ComputingService-OrientationService-Oriented Architecture (SOA)ServiceService CapabilityService ConsumerService CompositionService InventoryService-Oriented AnalysisService Candidate35353637373838404243443.3 Service Implementation MediumsServices as ComponentsServices as Web ServicesREST Services444545464: T h e A r c h i t e c t u r e of S e r v i c e - O r i e n t a t i o nPurpose of this Introductory Chapter. . 47484.1 The Method of Service-OrientationPrinciples of Service-OrientationStrategic Goals of Service-Oriented Computing4848514.2 The Four Characteristics of Composition-Centric52535458594.3 The Four Common Types of SOAService Architecture6162Information HidingDesign StandardsService ContractsService AgentsService CapabilitiesService Composition ArchitectureNested CompositionsTask Services and Alternative CompositionsCompositions and Infrastructure646465676868727374

xviContentsService Inventory Architecture74Service-Oriented Enterprise Architecture76Architecture Types and Scope77Architecture Types and Inheritance77Other Forms of Service-Oriented ArchitectureInter-Business Service ArchitectureService-Oriented Community Architecture7878784.4 The End Result of Service-OrientationCHAPTER 5: Understanding SOA Design PatternsPurpose of this Introductory Chapter7985865.1 Fundamental Terminology86What's a Design Pattern?86What's a Compound Pattern?88What's a Design Pattern Language?88What's a Design Pattern Catalog?895.2 Historical InfluencesAlexander's Pattern Language8990Object-Oriented Patterns91Software Architecture Patterns92Enterprise Application Architecture Patterns93EAI Patterns93SOA Patterns945.3 Pattern Notation95Pattern Symbols95Pattern FiguresPattern Application Sequence FiguresPattern Relationship FiguresCompound Pattern Hierarchy Figures96969699Capitalization100Page Number References1005.4 Pattern 02Solution102

ContentsxviiApplicationImpactsRelationshipsCase Study Example1031031031035.5 Patterns with Common CharacteristicsCanonical PatternsCentralization Patterns1041041055.6 Key Design Considerations"Enterprise" vs. "Enterprise-wide"Design Patterns and Design PrinciplesDesign Patterns and Design GranularityMeasures of Design Pattern Application106106106107108PART II: SERVICE I N V E N T O R Y DESIGNPATTERNSCHAPTER 6: Foundational Inventory PatternsHow Inventory Design Patterns Relate to SOA DesignCharacteristicsHow Foundational Inventory and Service Patterns RelateHow Case Studies are Used in this Chapter1111131141146.1 Inventory Boundary Patterns114Enterprise shipsCase Study Example116116117118120121122Domain shipsCase Study Example123123124125126127128

6.2 Inventory Structure Patterns130Service tionshipsCase Study Example131131132132133133135Logic ationshipsCase Study Example136136137137139140142Service psCase Study Example1431431441451471471486.3 Inventory Standardization Patterns149Canonical hipsCase Study Example150151152153155155157Canonical psCase Study Example158158159159159160161

CHAPTER7: Logical Inventory Layer P a t t e r n sCombining LayersBusiness Logic and Utility LogicAgnostic Logic and Non-Agnostic LogicService Layers and Logic TypesCHAPTER163164166166167Utility onshipsCase Study Example168168169170171171173Entity ionshipsCase Study Example175175176176178178180Process onshipsCase Study Example1821821831841851851878: Inventory C e n t r a l i z a t i o n P a t t e r n sProcess ationshipsCase Study Example191193193194195196197198

XXContentsCHAPTERSchema ationshipsCase Study Example200200201202202203203Policy lationshipsCase Study Example207207208209210211213Rules ationshipsCase Study Example2162162172172182192229 : Inventory I m p l e m e n t a t i o n P a t t e r n sDual ionshipsCase Study ExampleCanonical 8228233234235'.237238238239239

RelationshipsCase Study ExampleState n244Impacts244Relationships244Case Study Example246Stateful cts250Relationships250Case Study Example251Service 57Relationships258Case Study Example259Inventory cts263Relationships263Case Study Example265Cross-Domain Utility 269Relationships270Case Study Example270

XXÜContentsCHAPTER 1 0 : Inventory Governance Patterns273Canonical nshipsCase Study Example275275275276277278279Metadata ationshipsCase Study Example280280281282283283284Canonical nshipsCase Study Example286286287287288288290PART I I I : SERVICE D E S I G N PATTERNSCHAPTER 1 1 : Foundational Service Patterns295Case Study Background29711.1 Service Identification Patterns299Functional tionshipsCase Study Example300300301302302303303

с-CHAPTERService tionshipsCase Study Example30530530630730930931011.2 Service Definition Patterns311Agnostic ipsCase Study Example312313314315315316317Non-Agnostic ipsCase Study Example319319320321322322323Agnostic nshipsCase Study Example32432432532632732732812: Service Implementation PatternsService FacadeProblemSolutionApplication331333333334335

XXivContentsImpactsRelationshipsCase Study ExampleRedundant licationImpactsRelationshipsCase Study Example346347348349Service Data onshipsCase Study Example350350352353353353354Partial State hipsCase Study Example356356357358359359360Partial nshipsCase Study Example362362363364364364365Ul MediatorProblemSolutionApplication366366367368

ImpactsRelationshipsCase Study ExampleCHAPTER3693703701 3 : S e r v i c e Security P a t t e r n sCase Study background373'374Exception shipsCase Study Example376376377378379379380Message shipsCase Study Example381381382382384385385Trusted shipsCase Study Example387387388388391391392Service Perimeter sCase Study Example394394395395396396397

XXViContentsC H A P T E R 1 4 : S e r v i c e C o n t r a c t Design P a t t e r n s. . . . . 399Decoupled hipsCase Study Example401401402403405405407Contract ationshipsCase Study Example409409410410411411413Contract lationshipsCase Study Example414414415416417417418Concurrent shipsCase Study Example421421422423425425426Validation onshipsCase Study Example429429430431432432433

C h a p t e r 15: Legacy Encapsulation P a t t e r n sLegacy ipsCase Study Example441441442443444444446Multi-Channel hipsCase Study Example451451452453454454456iFile ipsCase Study ExampleCHAPTER43916: Service Governance Patterns. . . . . . . . .457457458458459460461463Compatible psCase Study Example465465466466469469470Version 73

ImpactsRelationshipsCase Study Example474474475Termination ionshipsCase Study Example478478479480480481481Service onshipsCase Study Example484484485485486486488Service tionshipsCase Study Example489489491492492494495Proxy nshipsCase Study Example497497498498500500501Decomposed 06507507

xxixContentsRelationshipsCase Study Example508508Distributed nshipsCase Study Example510510511512513513514PART I V : S E R V I C E C O M P O S I T I O N D E S I G NPATTERNSCHAPTER 1 7 : Capability Composition Patterns519Capability onshipsCase Study Example521521521523523523524Capability tionshipsCase Study Example526526527527527529530CHAPTER 1 8 : Service Messaging PatternsService 3533534534

XXXContentsRelationshipsCase Study Example535536Messaging hipsCase Study Example538538538539540541542Service sCase Study Example543543544544546546548Intermediate ipsCase Study Example549549551552553553556State shipsCase Study Example557557558560561561562Service 568570

CHAPTERRelationshipsCase Study Example570571Service Instance ipsCase Study Example574574576576578578579Asynchronous ipsCase Study Example582582584584587588589Reliable shipsCase Study Example592592593593594595596Event-Driven shipsCase Study Example5995996006026026026041 9 : Composition I m p l e m e n t a t i o n P a t t e r n s . . 6 0 5Agnostic Sub-ControllerProblemSolution607607608

xxxiiContentsApplicationImpactsRelationshipsCase Study ExampleCHAPTER610610610612Composition hipsCase Study Example616616618619619620620Atomic Service onshipsCase Study Example623623624626626628629Compensating Service onshipsCase Study Example63163163363363563563620: Service Interaction Security Patterns . . 6 3 9Data lationshipsCase Study Example641641643643644645646

CHAPTERData Origin ationshipsCase Study Example649649650651652653653Direct ationshipsCase Study Example656656657657658659660Brokered ationshipsCase Study Example6616616626636656656662 1 : Transformation P a t t e r n sData Model ationshipsCase Study ExampleData Format 72673674674677681681681683

XXXivContentsImpactsRelationshipsCase Study Example683683685Protocol hipsCase Study Example687687688688690690692PART V: SUPPLEMENTALCHAPTERCHAPTER22: Common Compound Design Patterns . . . 697"Compound" vs. "Composite"698Compound Patterns and Pattern Relationships698Joint Application vs. Coexistent Application699Compound Patterns and Pattern Granularity700Orchestration701Enterprise Service Bus704Service Broker707Canonical Schema Bus709Official Endpoint711Federated Endpoint Layer713Three-Layer Inventory71523: Strategic Architecture Considerations. . 717Increased Federation718Increased Intrinsic Interoperability721Increased Vendor Diversification Options723

ContentsXXXVIncreased Business and Technology Alignment725Increased ROI727Increased Organizational Agility728Reduced IT Burden7292 4 : Principles and P a t t e r n s a t t h eU.S. D e p a r t m e n t of D e f e n s e .CHAPTER731The Business Operating Environment (ВОЕ)733Principles, Patterns, and the ВОЕIncorporation of Information Assurance (IA)Adherence to StandardsData Visibility, Accessibility, and Understandability toSupport Decision MakersLoosely Coupled ServicesAuthoritative Sources of Trusted DataMetadata-Driven Framework for Separation fromTechnical DetailsSupport Use of Open Source SoftwareEmphasize Use of Service-Enabled CommercialOff-the-Shelf (COTS) SoftwareParticipation in the DoD EnterpriseSupport Mobility — Users & DevicesThe Future of SOA and the 39PART V I : A P P E N D I C E SAPPENDIXA: C a s e Study Conclusion743Cutit Saws Ltd744Alleywood Lumber Company744Forestry Regulatory Commission (FRC)745

xxxviContentsAPPENDIXB: Candidate Patterns747APPENDIXC: Principles of Service-Orientation749Standardized Service Contract751Service Loose Coupling753Service Abstraction755Service Reusability756Service Autonomy758Service Statelessness760Service Discoverability762Service Composability764APPENDIX D: Patterns and PrinciplesCross-Reference767APPENDIX E: Patterns and Architecture TypesCross-Reference775About the Author783About the Contributors784Index of Patterns791Index795

Web Service and REST Service Design Patterns 5 SOA Standardization Efforts 5 1.4 Recommended Reading 6 1.5 How this Book is Organized 7 Part I: Fundamentals 8 Part II: Service Inventory Design Patterns 8 Part III: Service Design Patterns 8 Part IV: Service Composition Design Patterns