• Save
Os Gi+Spring Integration
Upcoming SlideShare
Loading in...5
×
 

Os Gi+Spring Integration

on

  • 4,487 views

 

Statistics

Views

Total Views
4,487
Views on SlideShare
4,171
Embed Views
316

Actions

Likes
7
Downloads
0
Comments
0

4 Embeds 316

http://blog.springsource.com 278
http://blog.springsource.org 26
https://intranet.xebia.com 6
http://www.slideshare.net 6

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

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
  • Next up: Introduction to Spring integration which covers: - How and why Spring Integration came into existence
  • Next up: Introduction to Spring integration which covers: - How and why Spring Integration came into existence
  • Next up: Introduction to Spring integration which covers: - How and why Spring Integration came into existence
  • Next up: Introduction to Spring integration which covers: - How and why Spring Integration came into existence
  • Next up: Introduction to Spring integration which covers: - How and why Spring Integration came into existence
  • Spring Integration was created by Mark Fisher of SpringSource. - It is an implementation of the patterns described in Enterprise Integration Patterns by Hohpe and Woolf. - The book itself doesn’t give concrete usable components, Spring Integration does this: non invasive declarative
  • Endpoints connect application code to the integration framework.
  • There is quite some code in the slide. Go over it slowly and promise another look during the demo. TODO enlarge code samples -> two slides
  • Channels are buffers that hold messages, responsible for transporting the messages from sender to receiver(s) Mention equivalence with JMS Queues
  • Download the SI distribution or check out the project from svn, import the sample projects into STS. Show at least the CafeDemo xml variant. If there is time you can show some of the following: - Tweaking for performance (add a thread-pool-task-executor to the poller, play with the trigger) - Other demos - add a JMX based detour (router with @ManagedAttribute outputChannel) to the deliveredOrders

Os Gi+Spring Integration Os Gi+Spring Integration Presentation Transcript

  • OSGi and Messaging Building large applications that don't break down Iwein Fuld - SpringSource Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session
    • How things break
      • Code supernova
      • Single threaded breakdown
      • Synchronous breakdown
    • How to fix
      • Modularity
      • Multi threading
      • Messaging
    • Sounds good, let's do it
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • What is performance?
    • Performance
      • Response time (Classic performance)
      • Throughput (Concurrent processing)
      • Utilization (Map – Reduce)
    • Scalability
      • Related to second two types of performance
    • Reliability
      • Reduced by scalability improvements
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Code supernova
    • Assuming nothing is perfect
    • Code bases shall grow
    • Therefore teams shall grow
    • Therefore code bases shall grow faster
    • Until they are infinite UNLESS:
      • they collapse into a black hole
      • someone pulls the plug
      • we modularize and evolve
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • The single thread breakdown
    • One thread can only occupy a single core
    • In ten years systems with less than 10 cores will be rare
    • Web servers work with thread pools
    BUT
    • What if a single request takes a lot of effort?
    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
    • Is this efficient?
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Topics in this session
    • How things break
      • Code supernova
      • Single threaded breakdown
      • Synchronous breakdown
    • How to fix
      • Modularity
      • Multi threading
      • Messaging
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • OSGi
    • Fix Supernova problem by adding modularity without adding extra latency
    • Distribute development, colocate at runtime.
    • Some other really nice things that I don't need to tell you about
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • The other problems
    • Synchronous breakdown and single thread breakdown share common solution
    • Messaging enables:
      • Asynchronous handoff
      • Concurrent processing
      • Map reduce
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • What is Messaging? Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited. How can multiple agents work together?... ...without being in each others way. Waiter helps customer and cook to collaborate.
  • Characteristics of Messaging Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Transport The waiter takes an order and moves it to the barista Asynchronous Different actors can do different things in parallel Translation menu item => number => recipe Routing Orders arrive back at the proper table
  • Spring Integration Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Pipes and Filters Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Sender Application Receiver Application Channel MessageEndpoint
  • Hello world Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited. <service-activator input-channel = &quot;inputChannel&quot; default-output-channel = &quot;outputChannel&quot; ref = &quot;helloService&quot; method = &quot;sayHello&quot; /> < beans:bean id = &quot;helloService&quot; class = &quot;...HelloService&quot; /> public class HelloService { public String sayHello(String name) { return &quot;Hello &quot; + name; } }
  • Channels Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited. < channel id = &quot;incoming&quot; /> < channel id = &quot;orderedNotifications&quot; > <queue capacity = &quot;10&quot;/ > </channel>
  • 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
    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.
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Basic Integration Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • With a bus Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Demo Time Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Summary
    • With OSGi + Messaging you fix
      • Code supernova
      • Synchronous and single thread breakdown
    • Spring Integration
      • lightweight
      • decentralized (if you want)
    • Good to know:
      • Hohpe and Woolf + Goetz
      • STS, dm Server
    Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • Questions and Plugs Ask now... or visit our booth... or google “Iwein Fuld” Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.