SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a Uvod u spring integration

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
 
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
 

Semelhante a 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...
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

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

Notas do Editor

  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...