SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
This is the presentation I did at Apache Asia Roadshow 2009 held at Colombo, Sri Lanka. My talk was titled "Introduction to Apache Synapse". In this presentation, I attempt to address areas like enterprise integration problems, ESB pattern, Synapse architecture, features and the configuration model.
This is the presentation I did at Apache Asia Roadshow 2009 held at Colombo, Sri Lanka. My talk was titled "Introduction to Apache Synapse". In this presentation, I attempt to address areas like enterprise integration problems, ESB pattern, Synapse architecture, features and the configuration model.
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
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
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
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 (WSSecurity, WSRM)
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
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
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
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