Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mule soa


Published on

Mule soa

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Mule soa

  1. 1. SOA in Mule
  2. 2. Agenda  1. Business context and problems faced 2. The idea of a service-oriented online architecture 3. How and why we selected Mule 4. Overview and examples of Mule use cases 5. Best practices and learnings 2
  3. 3. ■ We did not Google „open source ESB“ to select Mule … ■ Instead we did a qualitative and quantitative comparison of major open source ESB products using different criteria: ■ Primary: professional maintenance, commercial support with SLAs, licensing, performance, operations by IT department possible ■ Secondary: documentation, code quality, activity and size of community, Spring support, sync and async communication, supported standards, app server integration, development tools ■ Mule quickly emerged as the favored ESB product, followed by Fuse ESB and WSO2 ■ Static analysis of the Mule sources (Sonar, Structure101) showed acceptable quality ■ Modularization and project structure looks well- thought-out and enables light-weight deployment ■ Good code quality, in spite of found violations and partially low documentation ■ Test coverage is reasonably high to ensure correct function in case of changes How and why we selected Mulearchitecture scenarios we could identify the requirements on the ESB product 3
  4. 4. ■ Different load scenarios with constant and increasing parallel requests (Apache JMeter) ■ Measurement of performance relevant metrics using Software-EKG ■ Live profiling of system behavior (JProfiler) ■ All findings have been reported to MuleSoft ■ Together with MuleSoft we were able to solve all the found issues: ■ MuleSoft supplied a working patch for the Registry synchronization issue within 2 days ■ Other issues could simply be addressed using the optimized configuration parameters (thread pool settings, …) supplied to us ■ This was decisive for the confidence and the final decision for Mule ESB How and why we selected MuleIntensive performance tests uncovered several findings (with Mule 3.1.1) … 4
  5. 5. Agenda 1. Business context and problems faced 2. The idea of a service-oriented online architecture 3. How and why we selected Mule  4. Overview and examples of Mule use cases  5. Best practices and learnings 5
  6. 6. ESB as a web application for scalability and high availability ■Requirement: Mule ESB had to be deployed as a Java web application to be operated by the IT department ■Embedding Mule into a web app is pretty  straight forward using the a context listener ■Custom listener implementation required 6 Overview and examples of Mule use cases
  7. 7. Overview and examples of Mule use casesaccess details user from heterogeneous data sources 7 ■ Access to the endpoint is controlled using a Spring security filter ■ Each data source has specific POJO implementation or private flow ■ Choice is based on payload using a Groovy evaluator
  8. 8. ■ Only minor Java code required ■ Web service interface and types ■ Custom transformers ■ Choice uses CXF operation header ■ XSLT to transform XML/RPC to JAXB XML structure Overview and examples of Mule use casesservice adapter to access the BZST service for simple and qualified VAT checks 8
  9. 9. ■ Web service interface and types defined as POJI and POJOs with JAX-WS annotations ■ The service component only performs validation and preprocessing of request Overview and examples of Mule use casesadapter to send support requests to a ticketing backend system 9 ■ The actual sending using an SMTP connector is performed asynchronous ■ Custom transformer uses Velocity to convert request object to email body
  10. 10. Agenda 1. Business context and problems faced 2. The idea of a service-oriented online architecture 3. How and why we selected Mule 4. Overview and examples of Mule use cases  5. Best practices and learnings 10
  11. 11. ■ Mule provides several built-in components to test Mule XML and flow definitions ■ The MuleFunctionalTest allowed us to test our flows within the IDE ■ No deployment to a standalone instance required, thus reducing turn-around times ■ The MuleClient is not really intuitive to use ■ Smart combination of SoapUI test cases together with mock services allowed 100% local and off-site development ■ Learning: develop as much as possible as POJOs and use „traditional“ unit testing ■ Learning: take the time to write a good mock for the service you are integrating Best practices and learningsTest driven development using MuleFunctionalTests, SoapUI tests and mock services 11
  12. 12. ■ „The Leanest, Meanest ESB: Mule ESB is the world's most efficient Enterprise Service Bus” ( ■ We went well below the mentioned figures by building a custom Mule distribution tuned and optimized for our specific use cases ■ Based on the default distribution assembly XML found in the Mule community sources, we 1. got rid of everything not required in production, mainly docs and examples, but also not required Tanuki EXE wrapper binaries, etc.pp.; 2. selected only the required Mule modules and transports our uses cases really required, this reduced the amount of 3rd party libs significantly; 3. used Maven dependency management to have full control of all used 3rd party libraries, used more recent versions where possible (e.g. Spring, CXF, Saxon) 4. added our Mule apps and their dependencies, then repackaged ■ Thorough load tests lead to optimized JVM parameters and high performance: -Xmx=128m -Xms=128m -XX:MaxPermSize=64m -XX:NewRatio=2 -XX:SurvivorRatio=12 -XX:+UseParallelGC -XX:+UseParallelOldGC Best practices and learningsdistribution for 100% control of all dependencies and optimal performance 12 96 MB 30 MB 37 MB
  13. 13. ■ A migration of the whole infrastructure in one go would have been impossible; the system needs to be available around the clock ■ Instead a staged migration of the infrastructure components and applications has been used: ■ Phase 1: Migration of all online servers, application by application, introduction of the primary ESB with first required services ■ Phase 2: Integration of a new online portal, operated in parallel to the old portal infrastructure ■ Phase 3: Migration of all „legacy“ portals to access the new online infrastructure components ■ After each phase the behavior of the new components was monitored closely to detect any problems in production ■ The services and backend systems integrated by the primary ESB instance constantly grew (I might still be growing in next phases) Best practices and learnings No big bang: start small and migrate in several phases 13