SlideShare une entreprise Scribd logo
1  sur  45
What Are Design Patterns? 


          A design pattern is a formal way of
          documenting a solution to a design
          problem in a particular field of expertise.
         (Wikipedia)




                                                       2
Got EIP?
Core Principles of EIP

>   Patterns using asynchronous messaging as a style
    of integration

>   Pros
    • Scaling
    • Decoupling
>   Cons
    • Latency vs. throughput
    • Decoupling not always appropriate
                                                       4
Pattern Overview




                   5
Identifying and Expressing Patterns




                                      6
Layers of Functionality




>   Not an either/or choice, combine layers as
    appropriate

                                                 7
Message Flow / Service Composition

>   Strengths and uses
    • De-coupling and re-using Services
        • Easier to evolve
    •   Scaling, Throughput
        • Asynchronous nature
    •   Message routing, processing, transformation
    •   Easy to mediate



                                                      8
Message Endpoints / Services

>   Message Endpoints / Services
    • Message based interface
    • Expose coarse grained services
    • Typically stateless
    • Anticipate re-use
    • Visibility scope examples
     •   Within application
     •   Within ESB
     •   Anyone with access to JMS server
     •   External
                                            9
Code Composition

>   Strengths and uses
    • Fine grained API access
    • Stateful, fine grained interactions
     •   Low latency


>   Challenge
    • Interface tighter coupled


                                           10
Implicit and Explicit Patterns

>   Some patterns inherent in technology / framework
    • Not every pattern a "keyword"
     •   e.g. JMS publish/subscribe ...
>   Patterns realized in user code 
     •   e.g. Scatter-Gather realized in Java
>   Platform has pre-built constructs
     •   e.g. Unix pipe symbol "|" : pipes-and-filters  
     •   Route in Camel or Fuji: pipes-and-filters



                                                          11
Visualizing EIPs




 • Stencils exist for Visio and OmniGraffle 
   •   http://www.eaipatterns.com/downloads.html  




                                                     12
Patterns in Practice




                       13
Gotcha - Flexibility vs. Productivity

>   Issue: Too little explicit support out-of-the-box
    • Too much roll your own
>   Issue: Explicit support out-of-the-box is too rigid
    • Does not exactly fit the use case
     •   Forced to work around or again roll your own


>   What you want is out-of-the-box productivity with
    explicit constructs AND flexibility to customize the
    constructs
                                                          14
Intro to Frameworks 

 • Apache Camel
   •   http://camel.apache.org/


 • Project Fuji / OpenESB v3
   •   http://fuji.dev.java.net/




                                   15
What is Apache Camel? 


                            A framework for simplifying integration
                            through the use of the 
                            Enterprise Integration Patterns for
                            message mediation, processing,
                            routing and transformation
 http://camel.apache.org/




                                                                      16
Apache Camel is Focused on EIP




                               =>




    http://camel.apache.org/        http://eaipatterns.com/

                                                              17
Message Routing




                  from("A").to("B");




                                       18
Slightly More Complex Routing




       from("file:///tmp/myFile.txt").
       to("bean:MyBean?method=handleMessage").
       to("jms:TEST.Q");




                                                 19
Multicast Routing




       from("file:///tmp/myFile.txt").
       choice().when().
         method("MyBean", "matches").
         to("Q").
       end().
       multicast("B", "C", "D");
                                         20
Pipeline Routing




       from("file:///tmp/myFile.txt").
       choice().when().
         method("MyBean", "matches").
         to("Q").
       end().
       pipeline("B", "C", "D");

                                         21
Camel Components

>    70+ components supported




                                22
What is Project Fuji? 
                                     http://fuji.dev.java.net/
>   Basis for OpenESB v3
>   Fuji Goals
    • Agility + Flexibility + Ease of Use = Productivity 
>   Service Platform to realize
    • Service Oriented Architecture (SOA)
    • Light weight SOA (aka Web Oriented Architecture)
    • Event Driven Architecture (EDA)
    • ... last but not least MOM style applications 
>   > 40 Components in OpenESB community today
                                                                 23
Interesting Properties of Fuji 

 • Convention, Configuration, Code... in that order
 • Light weight, OSGi based
 • Not JMS centric but Service Centric
   •   In-VM service composition option
   •   Choice of transport when going across VMs
       •   E.g. load balancing via http or federating using JXTA

 • Visual and textual (DSL) editing for EIPs
   •   Camel component is another option 




                                                                   24
Web Tooling Option
Service Composition with EIPs in a Browser




                                             25
Web UI Gives the User...

 • All-in-one interface for service composition
     • Service Definition
     • Routing, EIPs
     • Configuration
     • Deployment
 •   Layered on textual representation (DSL)
     • Check out from version control, edit in IDE
 •   Tooling option for different preferences and skills
     • e.g. casual technologist vs, Developer
 •   Extensible
                                                           26
Composition in an IDE / Text Editor
A textual representation of EIPs
>   Goals                                                     "Hello World 1" - 
                                                               simple routing
    • Simple, concise syntax
        • Easy to type and read
    •   Top-down design
        • Generate service templates 
    • Concept
        •   used to declare and configure services, routing
            •   Sets up services and routing at deployment time;
                NOT interpreted on the fly at runtime



                                                                                   27
Basic Concepts of the DSL
Integration Flow Language

                    "Hello World 2" - 
                     pipes-and-filters




Output of one filter/stage flows to input of next
stage similar to Unix Pipes
                                                  28
Basic Concepts of the DSL
Explicit EIP Constructs
                   "Hello World 3" - 
                 adding EIP constructs




                                         29
Example Pattern Implementations 




                                   30
Message Routing: Content-Based Router



     RouteBuilder builder = new RouteBuilder() {
         public void configure() {
           from("activemq:NewOrders").
           choice().
               when(header("product").
                   isEqualTo("widget")).
                   to("http://remotehost:8888/someApp/").
                   to("activemq:Orders.Widgets").
               when(header("product").
                   isEqualTo("gadget")).
                   to("ftp://bsnyder@remotehost/private/reports/").
                   to("activemq:Orders.Gadgets").
               otherwise().
                   to("activemq:ERRORS");
         }
         };
     }


                                                                      Apache Camel Java DSL
                                                                                         31
Message Routing: Content-Based Router



     <route>
      <from uri="activemq:NewOrders"/>
      <choice>
        <when>
         <xpath>/order/product = 'widget'</xpath>
         <to uri="activemq:Orders.Widgets"/>
        </when>
        <when>
         <xpath>/order/product = 'gadget'</xpath>
         <to uri="activemq:Orders.Gadgets"/>
        </when>
        <otherwise>
         <to uri="activemq:ERRORS"/>
        </otherwise>
      </choice>
     </route>


                                                    Apache Camel Spring DSL
                                                                         32
Message Channels: Dead Letter Channel 




      RouteBuilder builder = new RouteBuilder() {
          public void configure() {
              errorHandler(deadLetterChannel("activemq:ERRORS.QUEUE"));


              from("file:///tmp/MyFile.txt?delay=2000").
              to("activemq:TEST.Q");
          }
          };
      }

                                                                      Apache Camel Java DSL
                                                                                         33
Message Channels: Dead Letter Channel 




   <bean id="errorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder"
     p:deadLetterUri="smtp://mail.springsource.com:25" />
   <camelContext id="camel" errorHandlerRef="errorHandler" 
     xmlns="http://camel.apache.org/schema/spring">
     <route>
       <from uri="seda:a" />
       <to uri="seda:b" />
     </route>
   </camelContext>




                                                                             Apache Camel Spring DSL
                                                                                                  34
Message Transformation: Content Filter




     RouteBuilder builder = new RouteBuilder() {
         public void configure() {
             from("activemq:THIS.QUEUE").
                 process(new Processor() {
                     public void process(Exchange e) {
                         Message in = exchange.getIn();
                         in.setBody(in.getBody(String.class) + " Ride the Camel!");
             }
                 }).
             to("activemq:THAT.QUEUE");
         }
         };
     }


                                                                                      Apache Camel Java DSL
                                                                                                         35
Message Transformation: Content Filter




    <bean id="transformerBean" class="com.mycompany.orders.transform.MyTransformerBean" />
    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
      <from uri="activemq:THIS.QUEUE" />
      <bean ref="transformerBean" method="transformMessage" />
      <to uri="activemq:THAT.QUEUE" />
    </camelContext>




                                                                               Apache Camel Spring DSL
                                                                                                    36
Camel Pattern: Throttler

>   Limit the number of messages to be sent in a given
    time window

      public class MyRouteBuilder extends RouteBuilder {
          public void configure() {
            from("activemq:TEST.QUEUE”).
              throttler(3).timePeriodMillis(10000).
              to("http://remotehost:8888/meticProcessingService");
        }
      }




>   (only send three messages every 10 seconds)

                                                                     Apache Camel Java DSL
                                                                                        37
Camel Pattern: Delayer

>   Impose a simple delay on messages before being
    sent along 

      public class MyRouteBuilder extends RouteBuilder {
          public void configure() {
            from("activemq:TEST.QUEUE").
              delayer(header("JMSTimestamp", 3000).
              to("http://remotehost:8888/meticProcessingService");
        }
      }




>   (delay messages for a duration of JMSTimestamp
    value plus three seconds)
                                                                     Apache Camel Java DSL
                                                                                        38
Message Routing: Scatter-Gather ("all")




                          Fuji - DSL and Web UI
                                                  39
Message Routing: Scatter-Gather ("best")




                         Fuji - DSL and Web UI
                                                 40
Message Routing: Content-Based Router




                       Fuji - DSL and Web UI
                                               41
Message Routing: Content-Based Router (dynamic)




 • CBR rules configured at deployment/runtime

                          Fuji - DSL and Web UI
                                                  42
Message Routing: Composed Message Processor




                      Fuji - DSL and Web UI
                                              43
EIP Product Demo 

 • Apache Camel
 • Project Fuji




                    44
Andreas Egloff
andreas.egloff@sun.com


Bruce Snyder
bruce.snyder@springsource.com

Contenu connexe

Tendances

Introduction to Java Cloud Service
Introduction to Java Cloud ServiceIntroduction to Java Cloud Service
Introduction to Java Cloud ServicePerficient, Inc.
 
Microservices in the Enterprise: A Research Study and Reference Architecture
Microservices in the Enterprise: A Research Study and Reference ArchitectureMicroservices in the Enterprise: A Research Study and Reference Architecture
Microservices in the Enterprise: A Research Study and Reference ArchitectureJesus Rodriguez
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration TechnologiesPeter R. Egli
 
Enterprise Use Case - Selecting an Enterprise Service Bus
Enterprise Use Case - Selecting an Enterprise Service Bus Enterprise Use Case - Selecting an Enterprise Service Bus
Enterprise Use Case - Selecting an Enterprise Service Bus WSO2
 
Differentiating between web APIs, SOA, & integration …and why it matters
Differentiating between web APIs, SOA, & integration…and why it mattersDifferentiating between web APIs, SOA, & integration…and why it matters
Differentiating between web APIs, SOA, & integration …and why it mattersKim Clark
 
Microservices and the Cloud-Based Future of Integration
Microservices and the Cloud-Based Future of IntegrationMicroservices and the Cloud-Based Future of Integration
Microservices and the Cloud-Based Future of IntegrationBizTalk360
 
WSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa introSonic leigh
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft MicroservicesChase Aucoin
 
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using BallerinaWSO2
 
Keynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessKeynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessWSO2
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureKim Clark
 
Moving E Government to the Cloud
Moving E Government to the CloudMoving E Government to the Cloud
Moving E Government to the CloudWSO2
 
Modern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale ComputingModern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale ComputingGiragadurai Vallirajan
 
The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co...
 The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co... The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co...
The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co...Lucas Jellema
 
Using a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise developmentUsing a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise developmentWSO2
 
BizTalk Mapping Patterns and Best Practices
BizTalk Mapping Patterns and Best PracticesBizTalk Mapping Patterns and Best Practices
BizTalk Mapping Patterns and Best PracticesBizTalk360
 
Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB WSO2
 
Exchange online real world migration challenges
Exchange online real world migration challengesExchange online real world migration challenges
Exchange online real world migration challengesSteve Goodman
 
Migration to Microsoft Online Services from Exchange and Non-Microsoft Platforms
Migration to Microsoft Online Services from Exchange and Non-Microsoft PlatformsMigration to Microsoft Online Services from Exchange and Non-Microsoft Platforms
Migration to Microsoft Online Services from Exchange and Non-Microsoft PlatformsBitTitan
 

Tendances (20)

Introduction to Java Cloud Service
Introduction to Java Cloud ServiceIntroduction to Java Cloud Service
Introduction to Java Cloud Service
 
Microservices in the Enterprise: A Research Study and Reference Architecture
Microservices in the Enterprise: A Research Study and Reference ArchitectureMicroservices in the Enterprise: A Research Study and Reference Architecture
Microservices in the Enterprise: A Research Study and Reference Architecture
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration Technologies
 
Enterprise Use Case - Selecting an Enterprise Service Bus
Enterprise Use Case - Selecting an Enterprise Service Bus Enterprise Use Case - Selecting an Enterprise Service Bus
Enterprise Use Case - Selecting an Enterprise Service Bus
 
Differentiating between web APIs, SOA, & integration …and why it matters
Differentiating between web APIs, SOA, & integration…and why it mattersDifferentiating between web APIs, SOA, & integration…and why it matters
Differentiating between web APIs, SOA, & integration …and why it matters
 
Microservices and the Cloud-Based Future of Integration
Microservices and the Cloud-Based Future of IntegrationMicroservices and the Cloud-Based Future of Integration
Microservices and the Cloud-Based Future of Integration
 
WSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happen
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft Microservices
 
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
 
Keynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessKeynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your business
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration Architecture
 
Moving E Government to the Cloud
Moving E Government to the CloudMoving E Government to the Cloud
Moving E Government to the Cloud
 
Modern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale ComputingModern Software Architecture - Cloud Scale Computing
Modern Software Architecture - Cloud Scale Computing
 
The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co...
 The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co... The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co...
The mobilization of SOA Suite - the rise of REST (ADF Enterprise Mobility Co...
 
Using a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise developmentUsing a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise development
 
BizTalk Mapping Patterns and Best Practices
BizTalk Mapping Patterns and Best PracticesBizTalk Mapping Patterns and Best Practices
BizTalk Mapping Patterns and Best Practices
 
Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB Enterprise Integration with the WSO2 ESB
Enterprise Integration with the WSO2 ESB
 
Exchange online real world migration challenges
Exchange online real world migration challengesExchange online real world migration challenges
Exchange online real world migration challenges
 
Migration to Microsoft Online Services from Exchange and Non-Microsoft Platforms
Migration to Microsoft Online Services from Exchange and Non-Microsoft PlatformsMigration to Microsoft Online Services from Exchange and Non-Microsoft Platforms
Migration to Microsoft Online Services from Exchange and Non-Microsoft Platforms
 

Similaire à TS 4839 - Enterprise Integration Patterns in Practice

Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache CamelChristian Posta
 
One daytalk hbraun_oct2011
One daytalk hbraun_oct2011One daytalk hbraun_oct2011
One daytalk hbraun_oct2011hbraun
 
Integration in the age of DevOps
Integration in the age of DevOpsIntegration in the age of DevOps
Integration in the age of DevOpsAlbert Wong
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftChristian Posta
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftChristian Posta
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSLightbend
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseAdrian Gigante
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
USP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL ConferenceUSP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL Conferencechoreos
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC vipin kumar
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)My own sweet home!
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Nilesh Panchal
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with DockerMariaDB plc
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSSteve Wong
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stackJohan Edstrom
 

Similaire à TS 4839 - Enterprise Integration Patterns in Practice (20)

EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
One daytalk hbraun_oct2011
One daytalk hbraun_oct2011One daytalk hbraun_oct2011
One daytalk hbraun_oct2011
 
Integration in the age of DevOps
Integration in the age of DevOpsIntegration in the age of DevOps
Integration in the age of DevOps
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 
Think evo and use evo
Think evo and use evoThink evo and use evo
Think evo and use evo
 
USP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL ConferenceUSP presentation of CHOReOS @ FISL Conference
USP presentation of CHOReOS @ FISL Conference
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OS
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
 

Dernier

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Dernier (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

TS 4839 - Enterprise Integration Patterns in Practice

  • 1.
  • 2. What Are Design Patterns?  A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. (Wikipedia) 2
  • 4. Core Principles of EIP > Patterns using asynchronous messaging as a style of integration > Pros • Scaling • Decoupling > Cons • Latency vs. throughput • Decoupling not always appropriate 4
  • 7. Layers of Functionality > Not an either/or choice, combine layers as appropriate 7
  • 8. Message Flow / Service Composition > Strengths and uses • De-coupling and re-using Services • Easier to evolve • Scaling, Throughput • Asynchronous nature • Message routing, processing, transformation • Easy to mediate 8
  • 9. Message Endpoints / Services > Message Endpoints / Services • Message based interface • Expose coarse grained services • Typically stateless • Anticipate re-use • Visibility scope examples • Within application • Within ESB • Anyone with access to JMS server • External 9
  • 10. Code Composition > Strengths and uses • Fine grained API access • Stateful, fine grained interactions • Low latency > Challenge • Interface tighter coupled 10
  • 11. Implicit and Explicit Patterns > Some patterns inherent in technology / framework • Not every pattern a "keyword" • e.g. JMS publish/subscribe ... > Patterns realized in user code  • e.g. Scatter-Gather realized in Java > Platform has pre-built constructs • e.g. Unix pipe symbol "|" : pipes-and-filters   • Route in Camel or Fuji: pipes-and-filters 11
  • 12. Visualizing EIPs • Stencils exist for Visio and OmniGraffle  • http://www.eaipatterns.com/downloads.html   12
  • 14. Gotcha - Flexibility vs. Productivity > Issue: Too little explicit support out-of-the-box • Too much roll your own > Issue: Explicit support out-of-the-box is too rigid • Does not exactly fit the use case • Forced to work around or again roll your own > What you want is out-of-the-box productivity with explicit constructs AND flexibility to customize the constructs 14
  • 15. Intro to Frameworks  • Apache Camel • http://camel.apache.org/ • Project Fuji / OpenESB v3 • http://fuji.dev.java.net/ 15
  • 16. What is Apache Camel?  A framework for simplifying integration through the use of the  Enterprise Integration Patterns for message mediation, processing, routing and transformation http://camel.apache.org/ 16
  • 17. Apache Camel is Focused on EIP => http://camel.apache.org/ http://eaipatterns.com/ 17
  • 18. Message Routing from("A").to("B"); 18
  • 19. Slightly More Complex Routing from("file:///tmp/myFile.txt"). to("bean:MyBean?method=handleMessage"). to("jms:TEST.Q"); 19
  • 20. Multicast Routing from("file:///tmp/myFile.txt"). choice().when(). method("MyBean", "matches"). to("Q"). end(). multicast("B", "C", "D"); 20
  • 21. Pipeline Routing from("file:///tmp/myFile.txt"). choice().when(). method("MyBean", "matches"). to("Q"). end(). pipeline("B", "C", "D"); 21
  • 22. Camel Components >  70+ components supported 22
  • 23. What is Project Fuji?  http://fuji.dev.java.net/ > Basis for OpenESB v3 > Fuji Goals • Agility + Flexibility + Ease of Use = Productivity  > Service Platform to realize • Service Oriented Architecture (SOA) • Light weight SOA (aka Web Oriented Architecture) • Event Driven Architecture (EDA) • ... last but not least MOM style applications  > > 40 Components in OpenESB community today 23
  • 24. Interesting Properties of Fuji  • Convention, Configuration, Code... in that order • Light weight, OSGi based • Not JMS centric but Service Centric • In-VM service composition option • Choice of transport when going across VMs • E.g. load balancing via http or federating using JXTA • Visual and textual (DSL) editing for EIPs • Camel component is another option  24
  • 25. Web Tooling Option Service Composition with EIPs in a Browser 25
  • 26. Web UI Gives the User... • All-in-one interface for service composition • Service Definition • Routing, EIPs • Configuration • Deployment • Layered on textual representation (DSL) • Check out from version control, edit in IDE • Tooling option for different preferences and skills • e.g. casual technologist vs, Developer • Extensible 26
  • 27. Composition in an IDE / Text Editor A textual representation of EIPs > Goals "Hello World 1" -  simple routing • Simple, concise syntax • Easy to type and read • Top-down design • Generate service templates  • Concept • used to declare and configure services, routing • Sets up services and routing at deployment time; NOT interpreted on the fly at runtime 27
  • 28. Basic Concepts of the DSL Integration Flow Language "Hello World 2" -  pipes-and-filters Output of one filter/stage flows to input of next stage similar to Unix Pipes 28
  • 29. Basic Concepts of the DSL Explicit EIP Constructs "Hello World 3" -  adding EIP constructs 29
  • 31. Message Routing: Content-Based Router RouteBuilder builder = new RouteBuilder() {     public void configure() {       from("activemq:NewOrders").       choice().           when(header("product").               isEqualTo("widget")).               to("http://remotehost:8888/someApp/").               to("activemq:Orders.Widgets").           when(header("product").               isEqualTo("gadget")).               to("ftp://bsnyder@remotehost/private/reports/").               to("activemq:Orders.Gadgets").           otherwise().               to("activemq:ERRORS");     }     }; } Apache Camel Java DSL 31
  • 32. Message Routing: Content-Based Router <route> <from uri="activemq:NewOrders"/> <choice> <when> <xpath>/order/product = 'widget'</xpath> <to uri="activemq:Orders.Widgets"/> </when> <when> <xpath>/order/product = 'gadget'</xpath> <to uri="activemq:Orders.Gadgets"/> </when> <otherwise> <to uri="activemq:ERRORS"/> </otherwise> </choice> </route> Apache Camel Spring DSL 32
  • 33. Message Channels: Dead Letter Channel  RouteBuilder builder = new RouteBuilder() {     public void configure() {         errorHandler(deadLetterChannel("activemq:ERRORS.QUEUE"));         from("file:///tmp/MyFile.txt?delay=2000").         to("activemq:TEST.Q");     }     }; } Apache Camel Java DSL 33
  • 34. Message Channels: Dead Letter Channel  <bean id="errorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder"   p:deadLetterUri="smtp://mail.springsource.com:25" /> <camelContext id="camel" errorHandlerRef="errorHandler"    xmlns="http://camel.apache.org/schema/spring">   <route>     <from uri="seda:a" />     <to uri="seda:b" />   </route> </camelContext> Apache Camel Spring DSL 34
  • 35. Message Transformation: Content Filter RouteBuilder builder = new RouteBuilder() {     public void configure() {         from("activemq:THIS.QUEUE").             process(new Processor() {                 public void process(Exchange e) {                     Message in = exchange.getIn();                     in.setBody(in.getBody(String.class) + " Ride the Camel!");         }             }).         to("activemq:THAT.QUEUE");     }     }; } Apache Camel Java DSL 35
  • 36. Message Transformation: Content Filter <bean id="transformerBean" class="com.mycompany.orders.transform.MyTransformerBean" /> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">   <from uri="activemq:THIS.QUEUE" />   <bean ref="transformerBean" method="transformMessage" />   <to uri="activemq:THAT.QUEUE" /> </camelContext> Apache Camel Spring DSL 36
  • 37. Camel Pattern: Throttler > Limit the number of messages to be sent in a given time window public class MyRouteBuilder extends RouteBuilder {     public void configure() {       from("activemq:TEST.QUEUE”).         throttler(3).timePeriodMillis(10000).         to("http://remotehost:8888/meticProcessingService");   } } > (only send three messages every 10 seconds) Apache Camel Java DSL 37
  • 38. Camel Pattern: Delayer > Impose a simple delay on messages before being sent along  public class MyRouteBuilder extends RouteBuilder {     public void configure() {       from("activemq:TEST.QUEUE").         delayer(header("JMSTimestamp", 3000).         to("http://remotehost:8888/meticProcessingService");   } } > (delay messages for a duration of JMSTimestamp value plus three seconds) Apache Camel Java DSL 38
  • 39. Message Routing: Scatter-Gather ("all") Fuji - DSL and Web UI 39
  • 40. Message Routing: Scatter-Gather ("best") Fuji - DSL and Web UI 40
  • 41. Message Routing: Content-Based Router Fuji - DSL and Web UI 41
  • 42. Message Routing: Content-Based Router (dynamic) • CBR rules configured at deployment/runtime Fuji - DSL and Web UI 42
  • 43. Message Routing: Composed Message Processor Fuji - DSL and Web UI 43
  • 44. EIP Product Demo  • Apache Camel • Project Fuji 44