Integration Patterns Integration Patterns
Total Page:16
File Type:pdf, Size:1020Kb
Integration Patterns Integration Patterns patterns & practices David Trowbridge, Microsoft Platform Architecture Guidance Ulrich Roxburgh, Microsoft Consulting Services (Australia) Gregor Hohpe, ThoughtWorks, Inc. Dragos Manolescu, ThoughtWorks, Inc. E.G. Nadhan, EDS ISBN 0-7356-1850-X Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. © 2004 Microsoft Corporation. All rights reserved. Microsoft, MS-DOS, Windows, Windows NT, Windows Server, Active Directory, BizTalk, InfoPath, Visio, Visual Basic, and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. List of Patterns Broker: Handles the communication between applica- a set of agreed-upon message schemas; a set of tions by locating services, forwarding requests, and common command messages, and a shared infrastruc- returning responses to clients. Clients access services ture for sending bus messages to recipients. by making service requests through the broker Message-Oriented Middleware Integration: Connects [Buschmann96]. systems by using asynchronous message queues that Data Integration: Integrates applications at the logical are based on proprietary message-oriented middleware. data layer. Uses a Shared Database, a File Transfer, or a The connected systems then communicate through Maintain Data Copies implementation. messages that contain small packets of data. See also Direct Broker: A specialized type of Broker that allows Messaging [Hohpe04]. direct communication between applications after initial Pipes and Filters: Implements transformations by using contact through the broker. a sequence of filter components, where each filter Distributed Object Integration: Uses object interfaces component receives an input message, applies a simple that can be consumed remotely by other systems. See transformation, and sends the transformed message to also Remote Procedure Invocation [Hohpe04]. the next component. Conducts messages through pipes [McIlroy64] that connect filter outputs and inputs, and Entity Aggregation: Introduces a layer that provides a that buffer the communication between the filters. logical representation of the entities at an enterprise level with physical connections that support the access Point-to-Point Connection: A direct connection used to and that update to their respective instances in back- integrate two systems. The sending system must end repositories. translate the message into a format that the receiving system understands. When you use point-to-point File Transfer: At regular intervals, each application connections, each system determines the address of produces files that contain the information that the all the other nodes that it communicates with. other applications must consume. After a file is created, the file is not maintained. See File Transfer Portal Integration: A portal application displays the [Hohpe04]. information that is retrieved from multiple applications Functional Integration: Integrates applications at the in a unified user interface. The user can then perform logical business layer through Distributed Object the required tasks based on the information that Integration, (proprietary) Message-Oriented Middle-ware appears in this portal. Integration, or Service-Oriented Integration. Presentation Integration: Accesses the application’s Gateway: Abstracts the access to an external resource functionality through the user interface by simulating a by presenting a single interface to the integrated user’s input and by reading data from the screen. applications while hiding the external resource inter- Process Integration: Uses a separate process manager face. In addition, the gateway encapsulates any component that can interpret multiple concurrent protocol translation that may be necessary to communi- instances of a business process model and that can cate with the external resource. interact with the existing applications to perform the Indirect Broker: A specialized type of Broker that does individual steps of the process. not allow direct contact between applications; applica- Publish/Subscribe: A communication infrastructure that tions communicate only with the broker. uses topics or dynamically inspects message content, Maintain Data Copies: Multiple applications access enables listening applications to subscribe to specific multiple copies of the same data. The system main- messages, and sends messages to all interested tains state integrity between copies. See Maintain Data subscribers. Three variations of Publish/Subscribe are Copies [Teale03]. List-Based Publish/Subscribe, Broadcast-Based Publish/ Subscribe, and Content-Based Publish/Subscribe. Message Broker: A specialized type of Direct Broker that handles message-based communication between Service-Oriented Integration: Uses Web services to applications. Instead of communicating with each other, expose interfaces that can be consumed remotely by applications communicate only with the message other systems. broker. Shared Database: Multiple applications store their data Message Bus: A logical component that specializes in in a single database. A schema handles the needs of transporting messages between applications. A all the relevant applications. See Shared Database message bus contains three key elements [Hohpe04]: [Hohpe04]. Contents Preface xi Who Should Read This Book . xi How This Book Is Organized. xii Documentation Conventions . xiv Community . xiv Feedback and Support . xv Contributors . xv About the Principal Authors . xvi Chapter 1 Integration and Patterns 1 The Problem of Integration. 2 Integration Architecture . 2 Applications . 3 The Global Bank Scenario . 4 Context. 4 Requirements . 4 Next Steps . 6 Patterns . 7 Patterns in Sports . 7 Patterns in Music . 9 Pattern Structure . 9 Pattern-Based Design . 10 Patterns at Global Bank. 11 Next Chapter. 17 Chapter 2 Using Patterns to Design the Baseline Architecture 19 Meeting the Requirements of Global Bank . 19 Using Patterns to Communicate Design Decisions . 20 The Role of a Baseline Architecture . 21 Designing the Global Bank Baseline Architecture . 21 View Scheduled Payments Use Case . 22 Adding a Message Broker for the Loan Systems . 29 Execute Scheduled Payment Use Case. 33 Designing for Execute Scheduled Payment and Receive Payment Response . 35 Accessing Account Services on the Mainframe . 44 The Portal Web Application . 46 Global Bank Portal Application . 49 Implementing the Global Bank Scenario . 50 Next Chapter. 53 Contents v Chapter 3 Integrating Layer 55 Level of Automation . 55 Level of Abstraction. 56 Maintaining State . 56 Coupling . 57 Semantic Dissonance . 57 Choosing an Integration Layer Type . 57 Portal Integration . 58 Entity Aggregation . 59 Process Integration . 59 Integrating Layer Patterns . 60 Entity Aggregation . 61 Context. 61 Problem . 61 Forces . 61 Solution . 62 Example . 72 Resulting Context . 73 Testing Considerations . 74 Security Considerations. 74 Operational Considerations . ..