2. Agenda The Enterprise Integration Problem Enterprise Integration Principles, Styles and Messaging Concepts Service-Oriented Design Approach Frameworks and Implementations References Conclusion
3. The Enterprise Integration Problem Enterprise integration requires a significant shift in corporate politics Integration efforts typically have far-reaching implications on the business The lack of widely implemented standards addressing core integration problems The concept and technology learning curve
4. Enterprise Integration Principles Integration is connecting computer systems, companies or people Enterprise integration is the task of making disparate applications work together to produce a unified set of functionality
5. Integration Types Information Portals Data Replication Shared Business Function Service-Oriented Architecture Distributed Business Process Business to Business Integration
7. Enterprise Integration TypesData Replication Application B Application A Data Access Data Access Data Store A Data Store B Data moves on the database tier Consistency is dependent on the DBMS implementation
8. Enterprise Integration TypesShared Business Function Application A Application B Logic A Logic B Shared Function Moves the control to the shared function logic Tightly couples all clients to the application interfaces
9. Enterprise Integration TypesService-Oriented Architecture Application Application Service Service A Service B Service C Service D Connects distributed applications and exposes services through a standard contract Complex to design and implement
10. Enterprise Integration TypesDistributed Business Process Business Process Function A Function B Function C Single point of invocation Requires other integration solutions to function
13. Enterprise Integration StylesFile Transfer Application A Application B Shared Data Export Import Simplest form of integration Lacks timeliness and scalability
14. Enterprise Integration StylesShared Database Application A Application B Application C Data Access Data Access Data Access Data Store Promotes consistency Lacks portability and scalability
15. Enterprise Integration StylesRemote Procedure Invocation Function Call Application A Application B Stub Skeleton Reply Provides more than data sharing Tightly couples integrated parties
16. Enterprise Integration StylesMessaging Application A Application A Application A Event Layer Message Bus Transfer packets of data immediately, reliably, and asynchronously, using customizable formats.
17. Tightly Coupled Interfaces Requires minimum n(n-1)/2 interfaces, where n is the number of integrated applications
18. Loosely Coupled Interfaces Requires exactly n interfaces, where n is the number of integrated applications
19. Enterprise Integration Using Messaging Construction Channels Endpoints Routing Transformation Management Messaging Models Transactions
20. Message Construction Message Receiver Sender A message is a formatted unit of data A message consists of a header, properties and a body A sender marshals the data to construct the message A receiver un-marshals the data into its own data model
21. Message ConstructionExample: Spring Integration Generic message body type Correlation ID Header support Pure Java object as a message body Simplest form of a modeled message Uses generics to specialize message body type No marshaling or un-marshaling needed
22. Message ConstructionExample: Java Business Integration Attachments support XML body Merged Properties and Header support Security support Body is XML based Supports attachments and security subject
25. Message ConstructionMessage Exchange This exchange pattern Actual Message Messages are encapsulated into a message exchange The pattern identifies what is encapsulated
27. Messaging Channels Message Channel Sender Application Receiver Application A channel is a gateway for transmitting messages from a sender to a receiver Sender and receiver do not know about each other Can be referred to as a pipe
29. Message ChannelExample: Java Business Integration Factory method pattern, creates message exchange factories Supports synchronous and asynchronous exchanges
30. Messaging Endpoints Data Data Endpoint Endpoint Channel Message Sender Application Receiver Application An endpoint is a client of a messaging application that is capable of sending and receiving messages The Message Endpoint encapsulates the messaging system from the rest of the application and customizes a general messaging API for a specific application and task
33. Message Processing Problem Exhausted at (n - y) messages Exhausted at (n - x) messages (n) messages Data Endpoint Channel Receiver Application Client sends (n) messages Channel’s capacity is (n-x) messages Receiver application exhausted at (n-y) messages
34. Message Processing ProblemSEDA: Staged Event-Driven Architecture The Event Queue accepts incoming events The Event Handler handles incoming events The Thread Pool provides threading capabilities to the event handler The Controller adjusts resources allocation and scheduling dynamically Event Handler Event Queue Thread Pool Controller SEDA Stage
35. Message Processing ProblemSEDA: Staged Event-Driven Architecture Outgoing Messages Stage A Incoming Messages Outgoing Messages Stage B Receiver Stage Outgoing Messages Stage C
36. Message Routing Receiver A Output Channel A Receiver B Input Channel Message Message Router Output Channel B A Message Router consumes a Message from one Message Channel and republishes it to a different Message Channel, depending on a set of conditions
38. Message Transformation Incoming Message Translated Message Translator A Message Translator is a filter that translates one data format to another
39. Message FlowExample: The VETRO Pattern All numbers and kinds of filters can be applied to a message before processing
40. System Management Message Flow Processor A Processor B Processor C Message X Message X’ Configuration Heartbeat Test Messages Control Bus Exceptions Statistics Live Console The Control Bus uses the same messaging mechanism used by the application data but uses separate channels to transmit data that is relevant to the management of components involved in the message flow
51. Service-Oriented Design Approach Example: Java Business Integration JBI runtime is based on the router messaging pattern All messages moving through the router are in XML format Components are installable artifacts Binding components make services available to JBI runtime clients using a service contract and through a protocol Service engines perform the actual service logic Service units activate service endpoints
52. Service-Oriented Design Approach Example: Java Business Integration Services are exposed on arbitrary supported protocols Messages are normalized and delivered to their channels Messages are routed through the normalized message router to the target service engine The service engine performs its task and replies to the component if appropriate
53. Frameworks and Implementations Spring Integrationhttp://www.springframework.org/spring-integration/ Apache ServiceMixhttp://servicemix.apache.org/ Apache Camelhttp://activemq.apache.org/camel/ Sun OpenESBhttps://open-esb.dev.java.net/ Mulehttp://mule.mulesource.org/
54. References Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions - Gregor Hohpe, Bobby Woolf Enterprise Service Bus – Dave Chappell SOA: Principles of Service Design - Thomas Erl SEDA: An Architecture for Well Conditioned, Scalable Internet Services - Matt Welsh, David Culler, and Eric Brewer Java™ Business Integration (JBI) 1.0 – JSR 208 Specification - Ron Ten-Hove, Peter Walker Thanks to Dave Chappell for granting permission to use hisdiagramming notation in this presentation
55. Conclusion Don’t reinvent the wheel Keep close to the standards Spend time understanding and evaluating your infrastructure Not all frameworks and design solutions are suitable for each environment Design to scale, but don’t over design Explore integration solutions and frameworks Practice service-oriented design and implementation