SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Uvod u Spring
 Integration
Agenda
‱ Enterprise Application Integration &
  Enterprise Integration Patterns
‱ Uvod u Spring Integration
‱ Messaging
‱ Osnovni patterni
‱ Primjeri
‱ Zaključak
Enterprise Application Integration


             Aplikacije




 Protokoli                Tehnologije
Spring Integration
‱   Spring + EIP
‱   Lightweight
‱   Jednostavan (Spring-like)
‱   Nije ESB
‱   Mediation & Routing framework



                                Spring
                             Integration
Message(ing)


   Message
   Header

               Channel   Endpoint
   Payload
Enterprise Integration Patterns



 In ChAdap




             transformer   Out ChAdap
Channel Endpoints

       RMI



                TCP/UDP



JMS                       WS
             Stream
Primjer – twitter to gtalk
#mentions
Primjer - twitter to gtalk
<bean id="twitterTemplate"
        class="org.springframework.social.twitter.api.impl.TwitterTemplate">
    <constructor-arg value="${twitter.oauth.consumerKey}"/>
    <constructor-arg value="${twitter.oauth.consumerSecret}"/>
    <constructor-arg value="${twitter.oauth.accessToken}"/>
    <constructor-arg value="${twitter.oauth.accessTokenSecret}"/>
</bean>

<twitter:inbound-channel-adapter twitter-template="twitterTemplate"
        channel="inboundTwitterChannel">
    <int:poller fixed-rate="2000" max-messages-per-poll=“10"/>
</twitter:inbound-channel-adapter>

<twitter:search-inbound-channel-adapter query="#springintegration"
        twitter-template="twitterTemplate" channel=" inboundTwitterChannel">
     <int:poller fixed-rate=“5000" max-messages-per-poll=" 10 "/>
</twitter:search-inbound-channel-adapter>
Primjer - twitter to gtalk
<int:transformer input-channel="inboundTwitterChannel"
        output-channel="outputChannel"
expression="'[' + payload.getFromUser() + ']: '+ payload.getText() + ' '"/>

<int:bridge input-channel="outputChannel" output-channel="toUserChannel">
     <int:poller max-messages-per-poll="1" fixed-rate="3000"/>
</int:bridge>

<int-xmpp:xmpp-connection id="googleTalkConnection"
        user="${xmpp.login}" password="${xmpp.password}" host="${xmpp.host}"
        service-name="${xmpp.service}" port="${xmpp.port}"/>

<int-xmpp:header-enricher input-channel="toUserChannel"
        output-channel="imChannel">
    <int-xmpp:chat-to value="${send.to.user}"/>
</int-xmpp:header-enricher>

<int:channel id="toUserChannel"/>
<int-xmpp:outbound-channel-adapter channel="imChannel" xmpp-
connection="googleTalkConnection"/>
Primjer – database polling
<int-jdbc:inbound-channel-adapter
       query="select * from item where status=1"
       channel="inDbChannel" data-source="pollingDataSource"
       update="update item set status=10 where id in (:id)"
       task-executor="pool" >
    <int:poller fixed-rate="1000" >
        <int:transactional/>
    </int:poller>
</int-jdbc:inbound-channel-adapter>
Primjer – cafe
Spring Integration – zaključak
‱ Kada, Zaơto, Ơto Joơ?



‱ Hvala




‱ Pitanja?
Kontakt
‱ Samir Čauơ
  Software Developer

 gsm       +385 91 5720896
 mail      samir.caus@fiveminutes.eu
 skype      samircaus
 twitter   twitter.com/samircaus

 http://www.fiveminutes.eu

Weitere Àhnliche Inhalte

Ähnlich wie Uvod u spring integration

EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
Bruce Snyder
 
01 apache camel-intro
01 apache camel-intro01 apache camel-intro
01 apache camel-intro
RedpillLinpro
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
ikailan
 
ICML'16 Scaling ML System@Twitter
ICML'16 Scaling ML System@TwitterICML'16 Scaling ML System@Twitter
ICML'16 Scaling ML System@Twitter
Jack Xiaojiang Guo
 
Tsar tech talk
Tsar tech talkTsar tech talk
Tsar tech talk
Anirudh Todi
 
Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...
Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...
Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...
Spark Summit
 

Ähnlich wie Uvod u spring integration (20)

S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring Batch
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
01 apache camel-intro
01 apache camel-intro01 apache camel-intro
01 apache camel-intro
 
Oracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google AppsOracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google Apps
 
MuleSoft Manchester Meetup #3 slides 31st March 2020
MuleSoft Manchester Meetup #3 slides 31st March 2020MuleSoft Manchester Meetup #3 slides 31st March 2020
MuleSoft Manchester Meetup #3 slides 31st March 2020
 
Big Data Day LA 2017
Big Data Day LA 2017Big Data Day LA 2017
Big Data Day LA 2017
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
 
Spring integration
Spring integrationSpring integration
Spring integration
 
SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)
 
ICML'16 Scaling ML System@Twitter
ICML'16 Scaling ML System@TwitterICML'16 Scaling ML System@Twitter
ICML'16 Scaling ML System@Twitter
 
Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance Tuning
 
API Technical Writing
API Technical WritingAPI Technical Writing
API Technical Writing
 
Utilisation de MLflow pour le cycle de vie des projet Machine learning
Utilisation de MLflow pour le cycle de vie des projet Machine learningUtilisation de MLflow pour le cycle de vie des projet Machine learning
Utilisation de MLflow pour le cycle de vie des projet Machine learning
 
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
 
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
Maciej Treder "Server-side rendering with Angular—be faster and more SEO, CDN...
 
SAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesSAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based Services
 
TSAR (TimeSeries AggregatoR) Tech Talk
TSAR (TimeSeries AggregatoR) Tech TalkTSAR (TimeSeries AggregatoR) Tech Talk
TSAR (TimeSeries AggregatoR) Tech Talk
 
Tsar tech talk
Tsar tech talkTsar tech talk
Tsar tech talk
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018
 
Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...
Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...
Learnings Using Spark Streaming and DataFrames for Walmart Search: Spark Summ...
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

KĂŒrzlich hochgeladen (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Uvod u spring integration

  • 1. Uvod u Spring Integration
  • 2. Agenda ‱ Enterprise Application Integration & Enterprise Integration Patterns ‱ Uvod u Spring Integration ‱ Messaging ‱ Osnovni patterni ‱ Primjeri ‱ Zaključak
  • 3. Enterprise Application Integration Aplikacije Protokoli Tehnologije
  • 4. Spring Integration ‱ Spring + EIP ‱ Lightweight ‱ Jednostavan (Spring-like) ‱ Nije ESB ‱ Mediation & Routing framework Spring Integration
  • 5. Message(ing) Message Header Channel Endpoint Payload
  • 6. Enterprise Integration Patterns In ChAdap transformer Out ChAdap
  • 7. Channel Endpoints RMI TCP/UDP JMS WS Stream
  • 8. Primjer – twitter to gtalk #mentions
  • 9. Primjer - twitter to gtalk <bean id="twitterTemplate" class="org.springframework.social.twitter.api.impl.TwitterTemplate"> <constructor-arg value="${twitter.oauth.consumerKey}"/> <constructor-arg value="${twitter.oauth.consumerSecret}"/> <constructor-arg value="${twitter.oauth.accessToken}"/> <constructor-arg value="${twitter.oauth.accessTokenSecret}"/> </bean> <twitter:inbound-channel-adapter twitter-template="twitterTemplate" channel="inboundTwitterChannel"> <int:poller fixed-rate="2000" max-messages-per-poll=“10"/> </twitter:inbound-channel-adapter> <twitter:search-inbound-channel-adapter query="#springintegration" twitter-template="twitterTemplate" channel=" inboundTwitterChannel"> <int:poller fixed-rate=“5000" max-messages-per-poll=" 10 "/> </twitter:search-inbound-channel-adapter>
  • 10. Primjer - twitter to gtalk <int:transformer input-channel="inboundTwitterChannel" output-channel="outputChannel" expression="'[' + payload.getFromUser() + ']: '+ payload.getText() + ' '"/> <int:bridge input-channel="outputChannel" output-channel="toUserChannel"> <int:poller max-messages-per-poll="1" fixed-rate="3000"/> </int:bridge> <int-xmpp:xmpp-connection id="googleTalkConnection" user="${xmpp.login}" password="${xmpp.password}" host="${xmpp.host}" service-name="${xmpp.service}" port="${xmpp.port}"/> <int-xmpp:header-enricher input-channel="toUserChannel" output-channel="imChannel"> <int-xmpp:chat-to value="${send.to.user}"/> </int-xmpp:header-enricher> <int:channel id="toUserChannel"/> <int-xmpp:outbound-channel-adapter channel="imChannel" xmpp- connection="googleTalkConnection"/>
  • 11. Primjer – database polling <int-jdbc:inbound-channel-adapter query="select * from item where status=1" channel="inDbChannel" data-source="pollingDataSource" update="update item set status=10 where id in (:id)" task-executor="pool" > <int:poller fixed-rate="1000" > <int:transactional/> </int:poller> </int-jdbc:inbound-channel-adapter>
  • 13. Spring Integration – zaključak ‱ Kada, ZaĆĄto, Ć to JoĆĄ? ‱ Hvala ‱ Pitanja?
  • 14. Kontakt ‱ Samir ČauĆĄ Software Developer gsm +385 91 5720896 mail samir.caus@fiveminutes.eu skype samircaus twitter twitter.com/samircaus http://www.fiveminutes.eu

Hinweis der Redaktion

  1. Mnogo aplikacija, različite tehnologije, različiti protokoliApplication of technology defined as the integration of data and services between applications.Pattersinisuizumljeni, negoproizlazeizponavljanajakoriơtenja u praksiEAI, SOA, ESB, Messaging, Web service..
  2. Spring Building Blocks (jdbc, jms transaction etc.) + EIP = more focused framework for application integrationLightweight – run from Junit test – within webapp, but can be deployed within esb or part of message brokerJednostavanzakoriơtenje korisnicima Spring (app context configuration)application context is the bus!Not an ESB, rather mediation and routing framework – “mediating” - allows two different systems with different messages and protocols to talk with each otherESB – većina drugih (osim Apache Camela)... Esb je aplikacija ne framework – (poseban server, startanje etc.).. Pogodno za kompleksno rutanje
  3. Payload – any objectHeader –Id, expiration date, prority , return address 
Channel – point to point / publish-subscribeMessaging – transport, asinkrono, translation, routing, loose coupled, performanse, sklalabilnost, fleksibilnost, robustnost ,filtering, interception 

  4. Kada, Zaơto i Ơto joơ nismo spomenuli...Kada – kada vec koristimo Spring, ne trebamo full ESB, a trebamo integraciju s nekim od FTP, file, jms...JMS/SOA/Rest – sto ako trebamo integraciju s file-ftp ili nesto slicno?Modularna aplikacija, rad s vanjskimƠto joơ – transakcije, security, logging, error handling...