• No results found

Enterprise Integration Patterns

N/A
N/A
Protected

Academic year: 2021

Share "Enterprise Integration Patterns"

Copied!
18
0
0

Loading.... (view fulltext now)

Full text

(1)

Enterprise Integration

Patterns

Pavlo Petrenko

[email protected]

Seminar Web Engineering for Master Students Distributed and Self-organizing Systems Group

Computer Science Department 10 December 2012

(2)

EAI: Introduction

What were initial problems?

• Applications rarely live in isolation

• Creating a single, big application to run a complete

business is next to impossible

• Spreading business functions across multiple

applications provides the business with the flexibility to select the “best” packages for particular purposes

Integrated Applications are independent programs that can each run by themselves, yet that function by coordinating with each other in a loosely coupled way.

EAI is the unrestricted sharing of data and business

processes among any connected applications and data sources in the enterprise.

• Why does the area of EAI exist at all? - Heterogeneity of

enterprises

Introduction Messaging Conversation Conclusion

(3)

When to apply EAP and why

Introduction Messaging Conversation Conclusion

○●○ ○○○○○○ ○○○○○○ ○

Information Portal Data Replication Shared Business Function

Service-Oriented Architecture Distributed Business Process Business-to-Business Integration

(4)

Enterprise Integration Styles

Introduction Messaging Conversation Conclusion

○○● ○○○○○○ ○○○○○○ ○

Shared Database

File Transfer

(5)

Messaging Systems

Channel: a communication medium, where one

application writes information to the channel and the other one reads that information from the channel.

Message: a data record that the messaging system can transmit through a Message Channel.

Message Router: a special filter, which consumes a

Message from one Message Channel and republishes it to a different Message Channel, depending on a set of conditions.

Message Translator: a special filter between other filters or applications to translate one data format into another.

Introduction Messaging Conversation Conclusion

(6)

EAI Messaging Patterns

Normalizer

Introduction Messaging Conversation Conclusion

(7)

Messaging Channels & Construction

Patterns

Publish-Subscribe Channel: delivers a copy of a particular event to each receiver.

Return Address: indicates where to send the reply message.

Correlation Identifier: a unique identifier that indicates which request message this reply is for.

Introduction Messaging Conversation Conclusion

(8)

Message Routing & Transformation

Patterns

Aggregator: a stateful filter to collect and store individual messages until it receives a complete set of related

messages. Then, the Aggregator publishes a single message distilled from the individual messages.

Recipient List: inspects an incoming message, determines the list of desired recipients, and forwards the message to all channels associated with the recipients in the list.

Introduction Messaging Conversation Conclusion

○○○ ○○○●○○ ○○○○○○ ○

Content Enricher: a specialized transformer, used to to access an external data source in order to augment a message with missing information.

Normalizer: routes each message type through a custom Message Translator so that the resulting messages match a common format.

(9)

Loan Broker Problem

• When shopping for a loan, a customer usually calls several

banks to find the deal with the best possible interest rate.

• Each bank asks the customer for his or her social security

number, the amount of the loan, and the desired term (i.e., the number of months until the loan has to be paid off).

• Each bank then investigates the customer’s credit

background.

• Because contacting multiple banks with a loan quote

request is a tedious task, loan brokers offer this service to consumers.

Introduction Messaging Conversation Conclusion

(10)

Demo

Introduction Messaging Conversation Conclusion

(11)

Big Picture of EAP

Enterprise Integration

Messaging Conversation Processes Events

Introduction Messaging Conversation Conclusion

(12)

Conversation

Conversation = Series of Related Messages

Order Invoice Payment

Drinks

• Conversations can span seconds, hours, days

• Multiple conversation instances at the same time

• Messages belonging to one conversation are correlated

(typically through identifier)

Introduction Messaging Conversation Conclusion

(13)

Conversation Patterns

Chronological order of an interaction between services

• Discovery (Dynamic Discovery, Consult Directory, Referral)

• Establishing a Conversation (Three-way Handshake, Acquire

Token First, Rotate Tokens, Address Verification)

• Basic Conversations (Fire-and-Forget, Request-Response,

Request-Response with Retry, Polling, Subscribe-Notify, Quick Acknowledgment)

• Multi-Party Conversations (Proxy, Contingent Requests,

Reaching Agreement, Leader Election)

• Reaching Agreement (Receiver Cancels, Sender Cancels, Binding

Request, Binding Offer)

• Terminating Conversations (Lease, Renewal Reminder,

Heartbeat)

• Error Handling (Do Nothing, Retry, Compensating Action)

Introduction Messaging Conversation Conclusion

(14)

Establishing a Conversation

Three-way Handshake: the requestor initiates a

conversation, followed by an acknowledgment by the service provider, which is turn is followed by an

acknowledgment (Ack-Ack) from the initiator.

Acquire Token First: Have the initiator acquire a

reference token first. This token has to be included in subsequent requests.

Address Verification: The service provider sends a message with unique data to the consumer supplied address. The consumer has to pass the unique data back to service provider to complete the

authentication.

Introduction Messaging Conversation Conclusion

(15)

Basic Conversations

Request-Response with Retry: Have the consumer retry the request the request if it does not receive a response within a certain time interval.

Polling: Have the originating service poll, i.e., inquire whether the results are ready, multiple times if

necessary.

Quick Acknowledgment: Send an acknowledgment message quickly, followed by the actual results later.

Introduction Messaging Conversation Conclusion

(16)

Multi-Party Conversations

Proxy: a service that forwards messages between two services.

Contingent Requests: Have the initiator issue a request to a service. If it does not receive a

response within a certain timeframe, send a request to another service, and so on.

Reaching Agreement: Have a separate coordinator. The coordinator collects responses from each

participant, determines the outcome, and informs each participant of the outcome.

Introduction Messaging Conversation Conclusion

(17)

Conclusions

• Messaging is the most preferable integration style

nowadays.

• Messaging is loosely coupled, composable, elegant,

scalable, and asynchronous.

• 65 messaging patterns, 35 conversation patterns so far.

• Ample field for research: the rest of the EAI patterns

(processes, events, etc.) are still under development.

• Relevance to current trends in IT – Hybrid Clouds, Windows

Azure Service Bus EAI.

• Implementing some of EAI patterns instead of buying

proprietary solutions can save you a lot of money.

Introduction Messaging Conversation Conclusion

(18)

References

• Books

• Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. Gregor Hohpe; Bobby Woolf; Addison-Wesley Professional 2003, ISBN-13: 978-0-321-20068-6

• Integration Patterns: Patterns & Practices. David Trowbridge, Ulrich Roxburgh et al. Microsoft Corporation 2004, ISBN 0-7356-1850-X

• Enterprise Application Integration. David S. Linthicum; Addison-Wesley Professional 1999, ISBN-13: 978-0-201-61583-8

• Articles

• Enterprise Integration Patterns. Gregor Hohpe; 2002.

• Conversation Patterns:Interactions between Loosely Coupled Services. Gregor Hohpe; 2007 http://eaipatterns.com.

References

Related documents

The selection of Induction heating setup is very important in hot turning methodology, the induction heating setup generally includes, the heating coil, ZVS module (Zero

Masih terdapatnya impurities pada produk yang dihasilkan seperti pada sampel 1 dan 2 yang berupa iron oxide hydroxide (FeOOH) baik dalam fasa akaganeite (β-FeOOH),

Dairy products like yogurt should focus on low or no fat, high fibre, low/no sugar, high vit/min and no additives.. Priorities when buying

The purpose of this study is to investigate the effects of VRLE on nursing students’ learning outcomes while studying human anatomy through case studies. Literature is

As  one  travels  south  on  Boulevard  the  grade  drops  significantly  and bottoms  out  at  Englewood  Avenue  before  rising  again.    To  the  north 

Land Management and Natural Hazards Unit WOCAT/LADA Seminar 16/02/2010 2 WORLD ATLAS OF DESERTIFICATION Ne w Edi tio n Ne w Edi tio n.. Research on adapted methods for

If the roll is equal to or higher then the model's shooting skill then it hits and wounds as described in close combat.. If the roll was lower then the model's shooting skill then