SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
Enterprise Integration Patterns
                         using
             Scala and Spring Integration

                                                          Oleg Zhurakousky
                                                        SpringSource/VMware

                                          Twitter: z_oleg
                                Email: ozhurakousky@vmware.com



Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit
Enterprise Integration
Patterns (EIP)




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   2
Messaging

   • Integration starts with Messaging




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   3
Why Messaging?

   • Logical Decoupling
   • Physical Decoupling
             – Producer and Consumer are not aware of one
               another
   • Easy to extend
   • Event-driven




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   4
Pipes and Filters

             – Endpoints (Filters) connected through
             – Channels (Pipes) exchanging
             – Message




   $> cat foo.txt | grep the | while read l; do echo $l ; done




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   5
Message

   • Payload can be any object
   • Header values are stored in a Map


                                                                                                                       Headers



                                                                                                                       Payload




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit             6
Message Channel

• Decouples Producers from Consumers
• Provides extension point for interceptors
• May be Point-to-Point




• Or Publish/Subscribe




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   7
Message Endpoint

   • Producers send Messages to a Message
     Channel
   • Depending on their type, Message Channels
     may have Polling Consumers




   • Or Event-Driven Consumers




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   8
Message Endpoint Types

   • Transformer
             – Convert payload or modify headers
   • Filter
             – Discard messages based on boolean evaluation
   • Router
             – Determine next channel based on content
   • Splitter
             – Generate multiple messages from one
   • Aggregator
             – Assemble a single message from multiple


Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   9
What is Spring Integration?

  • Framework is a reference implementation
    of Enterprise Integration Patterns

  • Built on top of Spring
             – Runs within any Spring ApplicationContext
             – All components are Spring-managed objects




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   10
The Big Picture




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   11
Spring Programming Model

  • Inversion of Control
             – Endpoints delegate to Spring-managed objects
             – Framework handles message reception and
               method invocation


  • Clean separation of Code and Configuration




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   12
Message Channel Types
        <channel id="sync-p2p"/>

        <channel id="async-p2p">
           <dispatcher task-executor="someThreadPool" />
        </channel>

        <channel id="async-buffering-p2p">
           <queue capacity="50" />
        </channel>

        <publish-subscribe-channel id="sync-pubsub" />

        <publish-subscribe-channel id="async-pubsub"
                                   task-executor="someThreadPool" />




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   13
Messaging Endpoints

       <int:gateway service-interface="foo.bar.MyGateway"
                     default-request-channel="inChannel" />

       <int:filter input-channel="inChannel"
                   expression="payload.equals('World')"
                    output-channel="transformingChannel" />

       <channel id="transformingChannel">
          <dispatcher task-executor="executor" />
       </channel>

       <int:transformer input-channel="transformingChannel"
                        expression="'Hello ' + payload"
                        output-channel="loggingChannel" />

       <int:service-activator input-channel="loggingChannel"
                expression="T(java.lang.System).out.println(payload)"/>



Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   14
Channel Adapters and
Messaging Gateways
   •       JMS                                                                        •       HTTP (REST)
   •       AMQP                                                                       •       RIA (Flex, AJAX)
   •       TCP/UDP                                                                    •       WS (SOAP/POX)
   •       File/Resource                                                              •       Mail (POP3/IMAP/SMTP)
   •       RMI                                                                        •       JDBC
   •       RSS/ATOM                                                                   •       XMPP
   •       FTP/FTPS/SFTP                                                              •       Twitter
   •       NoSQL(Mongo,                                                               •       Spring Events
           Redis)                                                                     •       BPMN 2.0 (Activiti)

Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   15
Tooling




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   16
Where does Scala fit in?




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit
Why Scala?

  • There are 2 types of people in this world
     – Like to say - "Don't like XML"
     – "Don't like XML" - but understand that its
       necessary evil. Appreciate alternatives but
       not overly concerned with the lack of.




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   18
Is XML or not to XML enough of an
                          argument?




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit
Why Scala? (cont. . .)

  • True Type Safety vs IDE-Specific support
  • Typos and misconfiguration
  • Adding value based on the language features




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   20
Welcome to SI Scala DSL


        val messageFlow =
                 filter.using{p:String => p.equals("Cool World")} -->
                 transform.using{p:String => "Goodbye " + p} -->
                 handle.using{p:String => println(p)}


        messageFlow.sendAndReceive[String]("Cool World")




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   21
Welcome to SI Scala DSL

  • Compile time validation vs initialization
    validation and type safety:
              filter.using{p:String => "Cool World"} - (filter can *only* return Boolean)
                  type mismatch; found : String => java.lang.String required: Function1[_, Boolean]


              transform.using{p:String => println} - (transformer *must* return non-Unit value)


              handle.using{p:String => println(p)} -->
              handle.using{p:String => println(p)}
              - value --> is not a member of o.s.i.d.SendingIntegrationComposition
              (the first handler returns Unit (nothing of value in Messaging terms therefore the flow
               can't continue)


  Etc. . .
Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   22
Relevant Info

  • Enterprise Integration Patterns - http://www.eaipatterns.com/
  • Spring Integration project home -
    http://www.springsource.org/spring-integration
  • Spring Integration Scala DSL home -
    https://github.com/SpringSource/spring-integration-scala/wiki
  • Spring Integration Scala DSL blog -
    http://blog.springsource.org/2012/03/05/introducing-spring-integration-




Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit   23

Mais conteúdo relacionado

Mais procurados

Introducing Scalate, the Scala Template Engine
Introducing Scalate, the Scala Template EngineIntroducing Scalate, the Scala Template Engine
Introducing Scalate, the Scala Template EngineJames Strachan
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
Websphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open SourceWebsphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open SourceIBM WebSphereIndia
 
CRX Best practices
CRX Best practicesCRX Best practices
CRX Best practiceslisui0807
 
02.egovFrame Development Environment workshop I
02.egovFrame  Development Environment workshop I02.egovFrame  Development Environment workshop I
02.egovFrame Development Environment workshop IChuong Nguyen
 
01.egovFrame Training Book II
01.egovFrame Training Book II01.egovFrame Training Book II
01.egovFrame Training Book IIChuong Nguyen
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015Pavel Bucek
 
How to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesHow to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesPavel Bucek
 
ApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache TuscanyApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache TuscanyJean-Sebastien Delfino
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishArun Gupta
 
Apache Harmony: An Open Innovation
Apache Harmony: An Open InnovationApache Harmony: An Open Innovation
Apache Harmony: An Open InnovationTim Ellison
 
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache TuscanyApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache TuscanyJean-Sebastien Delfino
 
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesJean-Sebastien Delfino
 
Single API for library services (poster)
Single API for library services (poster)Single API for library services (poster)
Single API for library services (poster)Milan Janíček
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training bookChuong Nguyen
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmersjphl
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceTim Ellison
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardCharles Moulliard
 

Mais procurados (20)

Introducing Scalate, the Scala Template Engine
Introducing Scalate, the Scala Template EngineIntroducing Scalate, the Scala Template Engine
Introducing Scalate, the Scala Template Engine
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
Websphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open SourceWebsphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open Source
 
CRX Best practices
CRX Best practicesCRX Best practices
CRX Best practices
 
02.egovFrame Development Environment workshop I
02.egovFrame  Development Environment workshop I02.egovFrame  Development Environment workshop I
02.egovFrame Development Environment workshop I
 
01.egovFrame Training Book II
01.egovFrame Training Book II01.egovFrame Training Book II
01.egovFrame Training Book II
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
 
How to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesHow to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based Microservices
 
Spring integration
Spring integrationSpring integration
Spring integration
 
ApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache TuscanyApacheCon NA 2010 - Building Apps with Apache Tuscany
ApacheCon NA 2010 - Building Apps with Apache Tuscany
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
 
Apache Harmony: An Open Innovation
Apache Harmony: An Open InnovationApache Harmony: An Open Innovation
Apache Harmony: An Open Innovation
 
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache TuscanyApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
ApacheCon NA 2010 - Developing Composite Apps for the Cloud with Apache Tuscany
 
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA RuntimesApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
ApacheCon NA 2010 - High Performance Cloud-enabled SCA Runtimes
 
Single API for library services (poster)
Single API for library services (poster)Single API for library services (poster)
Single API for library services (poster)
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training book
 
Maven
MavenMaven
Maven
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmers
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliard
 

Destaque

CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...Skills Matter Talks
 
K O N P E T E N T Z I A D I G I T A L A
K O N P E T E N T Z I A  D I G I T A L AK O N P E T E N T Z I A  D I G I T A L A
K O N P E T E N T Z I A D I G I T A L AJoakintxo
 
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSkills Matter Talks
 
Presentation
PresentationPresentation
Presentationnuttynico
 
Jordan west real workscalazfinal2
Jordan west   real workscalazfinal2Jordan west   real workscalazfinal2
Jordan west real workscalazfinal2Skills Matter Talks
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12mercetorrasgali
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12mercetorrasgali
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messagingSkills Matter Talks
 

Destaque (18)

CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
CukeUp! 2012: Michael Nacos on Just enough infrastructure for product develop...
 
Mindmap john
Mindmap johnMindmap john
Mindmap john
 
Marek pubsubhuddle realtime_web
Marek pubsubhuddle realtime_webMarek pubsubhuddle realtime_web
Marek pubsubhuddle realtime_web
 
Couch db skillsmatter-prognosql
Couch db skillsmatter-prognosqlCouch db skillsmatter-prognosql
Couch db skillsmatter-prognosql
 
;)
;);)
;)
 
English
EnglishEnglish
English
 
K O N P E T E N T Z I A D I G I T A L A
K O N P E T E N T Z I A  D I G I T A L AK O N P E T E N T Z I A  D I G I T A L A
K O N P E T E N T Z I A D I G I T A L A
 
Pdhpe pp
Pdhpe ppPdhpe pp
Pdhpe pp
 
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in AngerSCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
SCALA DAYS 2012: Ben Parker on Interactivity - Anti-XML in Anger
 
Tmt predictions 2011
Tmt predictions 2011Tmt predictions 2011
Tmt predictions 2011
 
Presentation
PresentationPresentation
Presentation
 
Jordan west real workscalazfinal2
Jordan west   real workscalazfinal2Jordan west   real workscalazfinal2
Jordan west real workscalazfinal2
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12
 
12
1212
12
 
Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12Mesures deutors hipotecaris rdl 27 12
Mesures deutors hipotecaris rdl 27 12
 
Martin sustrik future_of_messaging
Martin sustrik future_of_messagingMartin sustrik future_of_messaging
Martin sustrik future_of_messaging
 
Audit toolkit
Audit toolkitAudit toolkit
Audit toolkit
 
Real World Scalaz
Real World ScalazReal World Scalaz
Real World Scalaz
 

Semelhante a (Oleg zhurakousky)spring integration-scala-intro

Leverage Enterprise Integration Patterns with Apache Camel and Twitter
Leverage Enterprise Integration Patterns with Apache Camel and TwitterLeverage Enterprise Integration Patterns with Apache Camel and Twitter
Leverage Enterprise Integration Patterns with Apache Camel and TwitterBruno Borges
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Charles Moulliard
 
Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACSSimon Haslam
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with SpringEberhard Wolff
 
01 overview-and-setup
01 overview-and-setup01 overview-and-setup
01 overview-and-setupsnopteck
 
Apache camel overview dec 2011
Apache camel overview dec 2011Apache camel overview dec 2011
Apache camel overview dec 2011Marcelo Jabali
 
Stratos Open PaaS OSCON 2011
Stratos Open PaaS OSCON 2011Stratos Open PaaS OSCON 2011
Stratos Open PaaS OSCON 2011Paul Fremantle
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20Phil Wilkins
 
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerProvisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerSimon Haslam
 
REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)Jeff Smith
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PROIDEA
 
Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy WSO2
 
Gaelyk - Paris GGUG 2011 - Guillaume Laforge
Gaelyk - Paris GGUG 2011 - Guillaume LaforgeGaelyk - Paris GGUG 2011 - Guillaume Laforge
Gaelyk - Paris GGUG 2011 - Guillaume LaforgeGuillaume Laforge
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010Adrian Trenaman
 
DBCC 2021 - FLiP Stack for Cloud Data Lakes
DBCC 2021 - FLiP Stack for Cloud Data LakesDBCC 2021 - FLiP Stack for Cloud Data Lakes
DBCC 2021 - FLiP Stack for Cloud Data LakesTimothy Spann
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 

Semelhante a (Oleg zhurakousky)spring integration-scala-intro (20)

Spring Integration Splunk
Spring Integration SplunkSpring Integration Splunk
Spring Integration Splunk
 
Leverage Enterprise Integration Patterns with Apache Camel and Twitter
Leverage Enterprise Integration Patterns with Apache Camel and TwitterLeverage Enterprise Integration Patterns with Apache Camel and Twitter
Leverage Enterprise Integration Patterns with Apache Camel and Twitter
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013
 
Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACS
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with Spring
 
01 overview-and-setup
01 overview-and-setup01 overview-and-setup
01 overview-and-setup
 
Apache camel overview dec 2011
Apache camel overview dec 2011Apache camel overview dec 2011
Apache camel overview dec 2011
 
02 basics
02 basics02 basics
02 basics
 
Stratos Open PaaS OSCON 2011
Stratos Open PaaS OSCON 2011Stratos Open PaaS OSCON 2011
Stratos Open PaaS OSCON 2011
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerProvisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack Manager
 
REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
Stackato
StackatoStackato
Stackato
 
Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy
 
Gaelyk - Paris GGUG 2011 - Guillaume Laforge
Gaelyk - Paris GGUG 2011 - Guillaume LaforgeGaelyk - Paris GGUG 2011 - Guillaume Laforge
Gaelyk - Paris GGUG 2011 - Guillaume Laforge
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
 
DBCC 2021 - FLiP Stack for Cloud Data Lakes
DBCC 2021 - FLiP Stack for Cloud Data LakesDBCC 2021 - FLiP Stack for Cloud Data Lakes
DBCC 2021 - FLiP Stack for Cloud Data Lakes
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 

Mais de Skills Matter Talks

Mais de Skills Matter Talks (7)

Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012Zaharia spark-scala-days-2012
Zaharia spark-scala-days-2012
 
Cnc scala-presentation
Cnc scala-presentationCnc scala-presentation
Cnc scala-presentation
 
Arvindsujeeth scaladays12
Arvindsujeeth scaladays12Arvindsujeeth scaladays12
Arvindsujeeth scaladays12
 
Scala days mizushima
Scala days mizushimaScala days mizushima
Scala days mizushima
 
Project kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scalaProject kepler compile time metaprogramming for scala
Project kepler compile time metaprogramming for scala
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
Prediction suretogowrong
Prediction suretogowrongPrediction suretogowrong
Prediction suretogowrong
 

Último

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
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 connectorsNanddeep Nachan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
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 businesspanagenda
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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...Miguel Araújo
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
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, ...apidays
 
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 DiscoveryTrustArc
 
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 Processorsdebabhi2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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 TerraformAndrey Devyatkin
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
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, ...
 
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
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

(Oleg zhurakousky)spring integration-scala-intro

  • 1. Enterprise Integration Patterns using Scala and Spring Integration Oleg Zhurakousky SpringSource/VMware Twitter: z_oleg Email: ozhurakousky@vmware.com Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit
  • 2. Enterprise Integration Patterns (EIP) Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 2
  • 3. Messaging • Integration starts with Messaging Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 3
  • 4. Why Messaging? • Logical Decoupling • Physical Decoupling – Producer and Consumer are not aware of one another • Easy to extend • Event-driven Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 4
  • 5. Pipes and Filters – Endpoints (Filters) connected through – Channels (Pipes) exchanging – Message $> cat foo.txt | grep the | while read l; do echo $l ; done Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 5
  • 6. Message • Payload can be any object • Header values are stored in a Map Headers Payload Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 6
  • 7. Message Channel • Decouples Producers from Consumers • Provides extension point for interceptors • May be Point-to-Point • Or Publish/Subscribe Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 7
  • 8. Message Endpoint • Producers send Messages to a Message Channel • Depending on their type, Message Channels may have Polling Consumers • Or Event-Driven Consumers Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 8
  • 9. Message Endpoint Types • Transformer – Convert payload or modify headers • Filter – Discard messages based on boolean evaluation • Router – Determine next channel based on content • Splitter – Generate multiple messages from one • Aggregator – Assemble a single message from multiple Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 9
  • 10. What is Spring Integration? • Framework is a reference implementation of Enterprise Integration Patterns • Built on top of Spring – Runs within any Spring ApplicationContext – All components are Spring-managed objects Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 10
  • 11. The Big Picture Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 11
  • 12. Spring Programming Model • Inversion of Control – Endpoints delegate to Spring-managed objects – Framework handles message reception and method invocation • Clean separation of Code and Configuration Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 12
  • 13. Message Channel Types <channel id="sync-p2p"/> <channel id="async-p2p"> <dispatcher task-executor="someThreadPool" /> </channel> <channel id="async-buffering-p2p"> <queue capacity="50" /> </channel> <publish-subscribe-channel id="sync-pubsub" /> <publish-subscribe-channel id="async-pubsub" task-executor="someThreadPool" /> Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 13
  • 14. Messaging Endpoints <int:gateway service-interface="foo.bar.MyGateway" default-request-channel="inChannel" /> <int:filter input-channel="inChannel" expression="payload.equals('World')" output-channel="transformingChannel" /> <channel id="transformingChannel"> <dispatcher task-executor="executor" /> </channel> <int:transformer input-channel="transformingChannel" expression="'Hello ' + payload" output-channel="loggingChannel" /> <int:service-activator input-channel="loggingChannel" expression="T(java.lang.System).out.println(payload)"/> Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 14
  • 15. Channel Adapters and Messaging Gateways • JMS • HTTP (REST) • AMQP • RIA (Flex, AJAX) • TCP/UDP • WS (SOAP/POX) • File/Resource • Mail (POP3/IMAP/SMTP) • RMI • JDBC • RSS/ATOM • XMPP • FTP/FTPS/SFTP • Twitter • NoSQL(Mongo, • Spring Events Redis) • BPMN 2.0 (Activiti) Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 15
  • 16. Tooling Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 16
  • 17. Where does Scala fit in? Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit
  • 18. Why Scala? • There are 2 types of people in this world – Like to say - "Don't like XML" – "Don't like XML" - but understand that its necessary evil. Appreciate alternatives but not overly concerned with the lack of. Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 18
  • 19. Is XML or not to XML enough of an argument? Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit
  • 20. Why Scala? (cont. . .) • True Type Safety vs IDE-Specific support • Typos and misconfiguration • Adding value based on the language features Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 20
  • 21. Welcome to SI Scala DSL val messageFlow = filter.using{p:String => p.equals("Cool World")} --> transform.using{p:String => "Goodbye " + p} --> handle.using{p:String => println(p)} messageFlow.sendAndReceive[String]("Cool World") Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 21
  • 22. Welcome to SI Scala DSL • Compile time validation vs initialization validation and type safety: filter.using{p:String => "Cool World"} - (filter can *only* return Boolean) type mismatch; found : String => java.lang.String required: Function1[_, Boolean] transform.using{p:String => println} - (transformer *must* return non-Unit value) handle.using{p:String => println(p)} --> handle.using{p:String => println(p)} - value --> is not a member of o.s.i.d.SendingIntegrationComposition (the first handler returns Unit (nothing of value in Messaging terms therefore the flow can't continue) Etc. . . Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 22
  • 23. Relevant Info • Enterprise Integration Patterns - http://www.eaipatterns.com/ • Spring Integration project home - http://www.springsource.org/spring-integration • Spring Integration Scala DSL home - https://github.com/SpringSource/spring-integration-scala/wiki • Spring Integration Scala DSL blog - http://blog.springsource.org/2012/03/05/introducing-spring-integration- Copyright 2005-2010 SpringSource. Copying, publishing or distributing without express written permission is prohibit 23