Advertisement

Introduction to Apache Synapse

Software Engineer at WSO2 Inc
Dec. 4, 2009
Advertisement

More Related Content

Viewers also liked(20)

Advertisement
Advertisement

Introduction to Apache Synapse

  1. Introduction to Apache  Synapse Hiranya Jayathilaka (hiranya@apache.org)
  2. What to Expect… • The problem and the solution – Integration problems in enterprise • Introducing Apache Synapse – Architecture and the functional components • Case Studies – Synapse in action • Finishing touches – Extension points and next steps
  3. The Problem & The Solution
  4. Software in Enterprise • Large enterprises have many software  systems – Enterprise resource planning applications – Management information systems – Decision support systems – Executive support applications • The systems are often independent • But they are all parts of a larger business  process
  5. Need for Enterprise Integration • Individual software systems cannot  achieve much • Systems should be integrated to work  together – Enables free data flow across the firm – Each application becomes aware of the ‘big  picture’ – Improves operational and management  efficiency
  6. Easier Said Than Done! • Integrating a multitude of complex  applications is no child’s play • Systems are diverse (way too diverse) – Different platforms (OS and program runtime) – Different programming languages – Different messaging standards and protocols – Different QoS requirements
  7. Is It Possible at All?
  8. ESB to the Rescue! • A software architecture construct that  provides fundamental services for complex  architectures – Message routing – Message transformation – Protocol switching – Adding QoS to message flows – And everything else integration architects  would ever need
  9. ESB Explained! • An architectural style or an piece of  software that resembles a physical data  bus • Applications communicate via the bus,  which acts as a message broker • Replaces direct contact between software  – Reduces coupling • Based on industry standards
  10. ESB Saves the Day!
  11. Introducing Apache  Synapse
  12. What is Apache Synapse? • A high performance ESB implementation – Fast – Lightweight – Low resource usage • Easy to configure and deploy • Developed as a middleware with many  extension points • Very mature and stable code base
  13. Key Features • Supports many messaging standards  – SOAP 1.1/1.2 and WS­* standards – REST/POX • A wide range of communication protocols – HTTP/S, JMS, Mail, VFS, FIX, AMQP • Load balancing and fail over support • Task scheduler and the eventing mode • JMX monitoring support
  14. Architecture • Non blocking HTTP transport – Network IO do not hog server worker threads – Based on Apache HTTP Core NIO • Multithreaded mediation engine • Streaming model – The byte stream coming over the wire is  ‘streamed’ through the mediation engine – Powered by Apache AXIOM
  15. Functional Components • Responsible for processing messages  inside the ESB and coordinating bus  activities • Can be combined, mixed and matched to  implement  complex message flows and  enterprise integration patterns • The task of configuring Synapse is most of  the time putting the right set of functional  components together
  16. Mediators • The simplest functional component • Takes an input message, performs some  action on it and outputs the processed  message
  17. Sequences • A cascading chain of mediators • Input messages are sent through all the  child mediators of the sequence • Resembles an industrial pipeline
  18. Endpoints • Defines an endpoint reference (EPR) to  which messages can be sent/forwarded  from Synapse • Various operational constraints can be  enforced on endpoints – Timeout configuration – Message format (SOAP 1.1/1.2, POX) – QoS expectations (WS­Security, WS­RM)
  19. Proxy Services • Acts like a virtual service that can accept  requests from clients • Received client requests are processed  and forwarded to an actual service  implementation  • Response from the backend service is  processed and routed back to the clients
  20. Other Components • Scheduled Tasks – Used to run a programmed activity periodically • Event sources – Enables Synapse to act as an event broker in an  event driven architecture • Local entries – Used to store small configuration/data items • Registry – A metadata store for your SOA
  21. Configuration Model • Synapse configuration language is used to  define, configure and combine functional  components • XML based • Very intuitive – Easy to learn, understand  and remember • Entire configuration goes into the  synapse.xml file
  22. Case Studies
  23. Case Study 01 • Problem: – How to expose an existing service over a  different schema? • Solution: – All the incoming requests should be transformed  into the format expected by the service – All the responses should be transformed to the  format expected by the client
  24. Solution Structure
  25. Demonstration
  26. Case Study 02 • Problem: – How to expose an existing HTTP service over  JMS? • Solution: – A new (virtual) service should be created to  accept messages over JMS – The virtual service should forward the  messages to the existing service over HTTP
  27. Solution Structure
  28. Demonstration
  29. Want to Try More? • Apache Synapse is shipped with a large  number of sample configurations that you  can try out of the box • Follow the samples guide included in the  distribution or refer the online version of it:  – http://synapse.apache.org/Synapse_Samples.html • Java and Apache ANT are required to try  out the samples
  30. Finishing Touches
  31. Extension Points • Custom mediators • Custom tasks • Script mediator • POJO command mediator • Spring mediator • Transport receivers and senders • Load balance algorithms • Message formatters and builders
  32. Feel Like Contributing? • Project website – http://synapse.apache.org • Code base – https://svn.apache.org/repos/asf/synapse • Mailing lists – http://synapse.apache.org/mail­lists.html • JIRA Issue tracker – http://issues.apache.org/jira/browse/SYNAPSE
  33. Questions?
  34. Thank You!
Advertisement