Spring Integration and EIP Introduction
Upcoming SlideShare
Loading in...5
×
 

Spring Integration and EIP Introduction

on

  • 6,388 views

Positions Spring Integration in a messaging architecture and compares with a few others. Also glances over some enterprise integration patterns....

Positions Spring Integration in a messaging architecture and compares with a few others. Also glances over some enterprise integration patterns.

With the presentation are a lot of live demo's, so it might not make sense in isolation.

Statistics

Views

Total Views
6,388
Views on SlideShare
6,355
Embed Views
33

Actions

Likes
9
Downloads
300
Comments
0

3 Embeds 33

http://www.slideshare.net 17
http://www.jugmilano.it 12
http://www.linkedin.com 4

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Spring Integration and EIP Introduction Spring Integration and EIP Introduction Presentation Transcript

  • Spring Integration Connecting Enterprise Applications Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session • Introduction to Spring Integration • Spring Integration Compared • Enterprise Integration Patterns • Examples and demos • Summary and questions 2 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • The synchronous breakdown • A customer orders a coffee – and waits • The waiter walks to the barista and passes the order – and waits • The barista walks to the coffee machine – and waits • How about the next customer? 3 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • What is Messaging? How can multiple agents work together?... ...without being in each others way. Waiter helps customer and cook to collaborate. 4 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Characteristics of Messaging Transport The waiter takes an order and moves it to the barista Asynchronous Different actors do different things in parallel Translation menu item => number => recipe Routing Orders arrive back at the proper table 5 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Why messaging (1/4) Loose coupling 6 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Why Messaging? (2/4) Performance 7 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Why Messaging? (3/4) Flexibility 8 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Why Messaging? (4/4) Interception and filtering 9 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Spring Integration 10 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Hello world <service-activator input-channel=quot;inputChannelquot; default-output-channel=quot;outputChannelquot; ref=quot;helloServicequot; method=quot;sayHelloquot;/> <beans:bean id=quot;helloServicequot; class=quot;...HelloServicequot;/> public class HelloService { public String sayHello(String name) { return quot;Hello quot; + name; } } 11 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Hello world inputChannel = context.getBean(quot;inputChannelquot;); outputChannel = context.getBean(quot;outputChannelquot;); inputChannel.send(new StringMessage(quot;Worldquot;)); System.out.println( outputChannel.receive().getPayload()); $ java HelloWorldDemo Hello World 12 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Channels <channel id=quot;incomingquot;/> <channel id=quot;orderedNotificationsquot;> <queue capacity=quot;10quot;/> </channel> 13 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Channels 14 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • MessageEndpoints MessageEndpoints are the knots that tie applications to the integration solution. MessageEndpoint Channel Sender Receiver Application Application 15 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Missing link Invoked by Sender Who is responsible? Channel Sender Receiver Application Application 16 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • The Poller A Message Bus enables separate applications to work together, but in a decoupled fashion such that applications can be easily added or removed without affecting the others. <poller default=quot;truequot;/> In Spring Integration: you don't need to worry about it 17 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session • Introduction to Spring Integration • Comparing Spring Integration to others • Enterprise Integration Patterns • Examples and demos • Summary and questions 18 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • What’s different about Spring Integration? • Can be used from within an existing application. • Lightweight (like any Spring application): – run from JUnit test – run within webapp • Focussed on messaging and integration • Not an ESB 19 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Others in general • Full blown ESB • It’s an application, not a framework – You need to install it – You need to run it • Typically a lot heavier • Focus on the deployment architecture not the actual integration. 20 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Mule • Integrates with Spring • Lots of integration options: – REST, SOAP – JMS • Embeddable • Distribution – 32Mb – 2Mb jar only (for embedding) 21 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • ServiceMix • Based on JBI – (Mediated Message Exchange Model) • Distribution: – 100mb • http://servicemix.apache.org/how-to-evaluate-an-esb.html 22 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Camel • Most direct competition for Spring Integration • Less consistent with Spring • Focus on routing • Fluent interface as an alternative to xml 23 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Considerations • Routing complexity – a bus can be useful for more complex routing problems • Comfort zone – what will the developers feel at home with • Keep it clean – don’t scatter the routing rules 24 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Basic Integration 25 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • With a bus 26 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session • Introduction to Spring Integration • Comparing Spring Integration to others • Enterprise Integration Patterns • Examples and demos • Summary and questions 27 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Message Router • Takes messages from a channel and forwards them to different channels 28 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Competing Consumers • Multiple consumers take messages from the channel • First come first serve 29 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Competing Consumers 30 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Selective Consumer • Select only relevant messages • Reduces the need for dedicated channels 31 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Selective Consumer 32 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Splitter 33 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Detour 34 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session • Introduction to Spring Integration • Comparing Spring Integration to others • Enterprise Integration Patterns • Examples and demos • Summary and questions 35 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Demo Time 36 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session • Introduction to Spring Integration • Comparing Spring Integration to others • Enterprise Integration Patterns • Examples and demos • Summary and questions 37 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Summary • Spring Integration – works from existing Spring applications – lightweight – decentralized (if you want) • Enterprise Integration Patterns – describe ways of plumbing the enterprise application landscape. 38 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Questions and Plugs • You can ask questions now while you ignore these shameless plugs • Thanks to Babiche Israel (cartoons) – http://babicheisrael.blogspot.com/ • Come to Java meetup May 23 – http://tinyurl.com/66hfnt or – Google for ‘java meetup q2 2008’ 39 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.