SlideShare a Scribd company logo
1 of 54
Enterprise Application Integration and
                                 Batch Processing in the Cloud
                                          Josh Long, Spring Developer Advocate
                                       josh.long@springsource.com @starbuxman




© 2012 SpringOne 2GX. All rights reserved. Do not distribute without permission.
Josh Long
Spring Developer Advocate
josh.long@springsource.com @starbuxman




  2
Worker processes on Cloud Foundry
Lots of Potential
 http://blog.springsource.org/2012/05/09/using-cloud-foundry-workers-with-spring/
 lots of use cases                             ---
                                                applications:
  • background jobs                               target/appassembler/:
  • headless applications                           name: integration-service
  • batch jobs                                      framework:
  • embedded web servers                              name: standalone
                                                   info:
                                                     mem: 64M
                                                     description: Standalone Application
                                                     exec:
                                                 runtime: java
                                                 command: bin/main
                                                 url:
                                                 mem: 512M
                                                 instances: 1
                                                 services:
                                                   stock_rabbitmq:
                                                     type: rabbitmq

   4
Easy to Package Multi-component Java applications
     <build>
            <plugins>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>appassembler-maven-plugin</artifactId>
                     <executions>
                          <execution>
                              <phase>package</phase>
                              <goals>
                                  <goal>assemble</goal>
                              </goals>
                              <configuration>
                                  <assembledirectory>target</assembledirectory>
                                  <programs>
                                       <program>
                                           <mainClass>org.cloudfoundry.workers.stocks.integration.service.Main</mainClass>
                                       </program>
                                  </programs>
                              </configuration>
                          </execution>
                     </executions>
                 </plugin>
            </plugins>
        </build>




 5
Cloud Scale Messaging with RabbitMQ
First, an Introduction to
   AMQP & RabbitMQ
Messaging Use Cases




                             Decoupling

                  producer                                       consumer



               shopping cart sending request CC merchant




                                        NOT CONFIDENTIAL -- TELL EVERYONE   8
Messaging Use Cases




                              Bidirectional Decoupling


                  producer                                            consumer



                 eg: remote procedure call




                                         NOT CONFIDENTIAL -- TELL EVERYONE       9
Messaging Use Cases




                        Bidirectional Decoupling


           producer                                       producer



           consumer


         eg: place order and wait for confirmation




                                             NOT CONFIDENTIAL -- TELL EVERYONE   10
Messaging Use Cases




                        Bidirectional Decoupling


           producer                                     consumer producer



           consumer


         eg: place order and wait for confirmation




                                             NOT CONFIDENTIAL -- TELL EVERYONE   11
Messaging Use Cases




                   work distribution and decoupling

                                                                      consumer

           producer                                                   consumer




         distribution can be duplicate or round-robin:
         - duplication for information (logging, auditing, etc)
         - round robin for scaling and load balancing




                                              NOT CONFIDENTIAL -- TELL EVERYONE   12
Messaging Use Cases

 Other Things a Message Broker Can Do
 • Store-and-forward of messages
 • Absorbing spikes of activity (again, decoupling)
 • Routing to different consumers based on message properties




                                                      NOT CONFIDENTIAL -- TELL EVERYONE   13
AMQP and JMS




               How does AMQP compare to JMS?
               When would I use one or the other?




                             NOT CONFIDENTIAL -- TELL EVERYONE   14
AMQP and JMS


  AMQP                                                   JMS
  Protocol                                               API
  No language                                            Java
  Industry committee, mainly finance                     JEE

  Interoperability from client libraries                 Interoperability from proprietary features

  Resources can be managed by clients                    Resources often centrally managed

  Not ubiquitous in enterprise                           Ubiquitous through JEE

  Flexible usage patterns, emphasise routing             Two basic producer patterns (Queue and Topic)


  Designed for large numbers of queues and exchanges     Hard to manage large numbers of Destinations




                                                  NOT CONFIDENTIAL -- TELL EVERYONE                      15
AMQP and JMS

 JMS
 • standard in the Java space
 • lots of open source options
 • provided with Java EE application servers
 • Spring JMS



                         Java producers          Message broker   Java consumers


                                                                      C
                             P                 queue

                                                                      C

                             P                 queue
                                                                      C


                                                                                   16
JMS

     Sending JMS Messages
     • Inject an instance of Spring's JmsTemplate.
     • Provide the JMS ConnectionFactory in the JmsTemplate bean definition.

@Component
public class MessageSender {

    @Autowired
    private volatile JmsTemplate jmsTemplate;

    public void send(String message) {
      this.jmsTemplate.convertAndSend("example.queue", message);
    }

}                                        @Bean public ConnnectionFactory cf (){
                                            return new CachingConnectionFactory(...);
                                         }
                                         @Bean public JmsTemplate template(){
                                           return new JmsTemplate(this.cf()) ;
                                         }


                                                                                        17
AMQP and JMS

 AMQP
 • real standard
 • a product of the the companies with the most mission critical requirements
 • Spring AMQP


 AMQP producers                exchanges                  Message broker        AMQP consumers


                                                                                       C
                     P              X                queue

                                                                                       C

                     P               X               queue
                                                                                       C




                                                                                                 1
AMQP and JMS

 JMS Topic Explosion:
 • Messages with fine-grained routing, e.g.
   • Market data: region, country, exchange, ticker, …
   • Online gambling: sport, match, event-type, …
   • Message selectors are inefficient and fiddly to work with in the API
 • Exponential explosion of possible combinations of interesting subscriptions
 • Can implement as hierarchy of Topics
 • 1000s or 10000s of Destinations
 • Management nightmare
 • Sweet spot for AMQP




                                                         NOT CONFIDENTIAL -- TELL EVERYONE   19
AMQP

     Sending AMQP Messages
     • Use AmqpTemplate instead of JmsTemplate (accepts exchange and routingKey).
     • Nothing changes on the listener side (just a POJO).



@Component public class MessageSender {

    @Autowired
    private volatile AmqpTemplate amqpTemplate;

    public void send(String message) {
      this.amqpTemplate.convertAndSend(
              "myExchange", "some.routing.key", message);
    }

}




                                                                                    20
Spring AMQP
    Java and .NET
    AMQP core abstraction plus RabbitMQ implementation (built on rabbit client libraries)
    Higher level patterns for clients: admin, producers and consumers
        RabbitAdmin – declare exchanges, queues, bindings
        RabbitTemplate – convenience methods for send and receive
        MessageListenerContainer – POJO message handler, asynchronous
    Spring Integration support
 http://www.springsource.org/spring-amqp




                                                     NOT CONFIDENTIAL -- TELL EVERYONE       21
Spring AMQP: RabbitTemplate


public class MyComponent {
  private RabbitTemplate rabbitTemplate;

    public MyComponent(ConnectionFactory connectionFactory) {
      this.rabbitTemplate = new RabbitTemplate(connectionFactory);
    }

    public void read() throws Exception {
       ...
      String value = rabbitTemplate.receiveAndConvert("myQueueName");
      ...
    }

}
                                                                        Convenience methods




                                                         NOT CONFIDENTIAL -- TELL EVERYONE    22
Spring AMQP: SimpleMessageListenerContainer
    Asynchronous message receiver
    POJO handlers
    Handles re-connection and listener failure (rollback, redelivery)
    Message conversion and error handling strategies



             <listener-container connection-factory="connectionFactory">
              <listener ref="handler" method="handle" queue-names="my.queue">
             </listener-container>




                                                  NOT CONFIDENTIAL -- TELL EVERYONE   23
Messaging Use Cases

 Patterns:
 spatial decoupling (aka communication)
 temporal decoupling (aka buffering)
 logical decoupling (aka routing)
 Promote: flexibility, resilience, performance, and scale
 Conclusion: There is an enormous range of applications and problems to which messaging is
 an effective solution.




                                           NOT CONFIDENTIAL -- TELL EVERYONE                  24
Not confidential. Tell everyone.   25
Not confidential. Tell everyone.   26
Batch Processing in the Cloud




     Not confidential. Tell everyone.   27
First, an Introduction to Spring Batch




         Not confidential. Tell everyone.   28
Why we’re here...




                    Not confidential. Tell everyone.   29
...So, What’s the Problem?




    Not confidential. Tell everyone.   30
Job and Step




                   Job
                                        *                       Step
               *
                   JobInstance

                                                                       Step Scope
                          *
                         JobExecution
                                                                       * StepExecution



                                 Not confidential. Tell everyone.                        31
Getting Started




               Application
               Developer
                             implements                                                                ItemProcessor (optional)

                                                                                              input                               output (optional)
       configures
                                                                                   ItemReader                   ItemWriter




                                              Job

                                          *                                        StepExecutor concerns
                                              Step


                                                                            RepeatOperations               ExceptionHandler




                                                Not confidential. Tell everyone.                                                                      32
Spring Batch

 Supports Batch API...
 • Jobs have Steps
 • Steps have Readers, and optional Processors and Writers
  • Readers read data
  • Processors process data coming into them, optionally transforming it. Optional.
  • Writers write data out




                                             Not confidential. Tell everyone.         33
ItemReader




            public interface ItemReader<T> {

            	     T read() throws Exception,
                           UnexpectedInputException,
                           ParseException,
                           NonTransientResourceException;

            }
Returns null at end of dataset

                                                                       delegate Exception handling to framework




                                    Not confidential. Tell everyone.                                              34
ItemProcessor (Optional)




                   public interface ItemProcessor<I, O> {
                     O process(I item) throws Exception;
                   }




Delegate Exception handling to framework




                                           Not confidential. Tell everyone.   35
ItemWriter




           public interface ItemWriter<T> {

           	        void write(List<? extends T> items) throws Exception;

           }




expects a “chunk”

                                                                          delegate Exception handling to framework




                                       Not confidential. Tell everyone.                                              36
All Together...


        <job id="skipJob" incrementer="incrementer"
           xmlns="http://www.springframework.org/schema/batch">

            <step id="step1">
             <tasklet>

              <chunk reader="fileItemReader"
                      processor="tradeProcessor"
                      writer="tradeWriter"
                      commit-interval="3" skip-limit="10">
        	       </chunk>
        	      </tasklet>
        	      <next on="*" to="step2" />

        	     <next on="COMPLETED WITH SKIPS" to="errorPrint1" />

        	     <fail on="FAILED" exit-code="FAILED" />

            </step>

         ...
        </job>




                                               Not confidential. Tell everyone.   37
Partitioning Overview




                        Job


                        Step



                        Step



                        Step




                               Not confidential. Tell everyone.   38
Partitioning Overview




                         Job

                                                                    Slave
                        Step
                                                                    Slave

                                                                    Slave
                        Master
                                                                    Slave

                                                                    Slave
                        Step
                                                                    Slave




                                 Not confidential. Tell everyone.           39
Requests


We Have a Cloud, Let’s Scale!

 Spring Batch supports Remote Chunking over AMQP
 • http://labs.bsb.com/2011/11/remote-partitioning-with-spring-batch/
 • http://bit.ly/wrb8Ch
                               master



                                                              step execution results




                                                              RabbitMQ


                      Step Execution
                         Requests




                                                          slave 1                      slave 2   slave 3




                                              Not confidential. Tell everyone.                             40
Simple Strategy SPI for Distribution and Aggregation




                               Not confidential. Tell everyone.   41
Application Integration (in the Cloud)




         Not confidential. Tell everyone.   42
Integration's More Common Than You Think




                                     channel
                                    System A




        System A
        System A                                                System B


                             Not confidential. Tell everyone.              43
                                                                             6
Nobody Builds Systems in a Vacuum




                                                               do NOT reinvent
                                                               the Wheel!




                            Not confidential. Tell everyone.                     44
Don't over extend your architecture!
                    Not confidential. Tell everyone.   45
Rooted in Classic Patterns


 •   By Gregor Hohpe & Bobby Woolf
 •   Published 2003
 •   Collection of well-known patterns
 •   http://www.eaipatterns.com/eaipatterns.html
 •   Icon library provided




                                 Not confidential. Tell everyone.   46
What is Spring Integration?

• Light-weight messaging framework
• Provides an adapter-based platform

• Pipes and Filters at the core of Spring Integration’s architecture
  – Endpoint (Filter)
  – Channel (Pipe)
  – Message




                                 Not confidential. Tell everyone.      47
DEMO
• Spring Integration Primer




                              @starbuxman   slideshare.net/joshlong
Spring Integration @Gateway

 Gateways...
 • hide one system from the messaging semantics of another
 • Support all the message exchange patterns
  • Request
  • Request asynchronous (fire-n-forget)
  • Request/Reply
  • Request/Reply asynchronous (fire-n-forget)


  public class CustomerService {
   void addCustomer( Customer customer )
     throws CrmException;

  }




                                             Not confidential. Tell everyone.   49
Spring Integration @Gateway



  MessageChannel crmChannel = ...;

  MessagingOperations operations = .... ;

  operations.sendAndReceive( crmChannel ,
   MessageBuilder.withPayload(new Customer(..)).build() );




                              Not confidential. Tell everyone.   50
Spring Integration @Gateway




     public interface CustomerService {
      @Gateway
      void addCustomer( Customer customer )
        throws CrmException;

     }




                              Not confidential. Tell everyone.   51
DEMO
• using Spring Integration gateways




                                      @starbuxman   slideshare.net/joshlong
Summary

 RabbitMQ is readily available Messaging in the Cloud
 Spring Integration makes integration over AMQP easy
 Spring Batch Makes Batch Jobs Easy
 • Remote Chunking Makes Using AMQP as the Coordination Fabric Easy




                                      Not confidential. Tell everyone.   53
springsource.org | cloudfoundry.org




            Questions?
                Say hi!
       @starbuxman      slideshare.net/joshlong
@starbuxman josh.long@springsource.com

More Related Content

What's hot

Uber: Kafka Consumer Proxy
Uber: Kafka Consumer ProxyUber: Kafka Consumer Proxy
Uber: Kafka Consumer Proxyconfluent
 
Service messaging using Kafka
Service messaging using KafkaService messaging using Kafka
Service messaging using KafkaRobert Vadai
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Severalnines
 
Connecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBConnecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBJitendra Bafna
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseAdrian Gigante
 
What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?Nuxeo
 
Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Ben Stopford
 
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreKafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreStreamNative
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webC2B2 Consulting
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreShivji Kumar Jha
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centersMariaDB plc
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 ConferenceRoger Kitain
 
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsFunction Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsStreamNative
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master ReplicationMoshe Kaplan
 
Design and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative RebalancingDesign and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative Rebalancingconfluent
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cAjith Narayanan
 
Consumer offset management in Kafka
Consumer offset management in KafkaConsumer offset management in Kafka
Consumer offset management in KafkaJoel Koshy
 
Operationalizing Machine Learning: Serving ML Models
Operationalizing Machine Learning: Serving ML ModelsOperationalizing Machine Learning: Serving ML Models
Operationalizing Machine Learning: Serving ML ModelsLightbend
 
Stream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar FunctionsStream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar FunctionsStreamlio
 

What's hot (20)

Connection Pooling
Connection PoolingConnection Pooling
Connection Pooling
 
Uber: Kafka Consumer Proxy
Uber: Kafka Consumer ProxyUber: Kafka Consumer Proxy
Uber: Kafka Consumer Proxy
 
Service messaging using Kafka
Service messaging using KafkaService messaging using Kafka
Service messaging using Kafka
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
 
Connecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBConnecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESB
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?What’s new in Nuxeo 5.2?
What’s new in Nuxeo 5.2?
 
Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011
 
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreKafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event Store
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centers
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 Conference
 
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsFunction Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master Replication
 
Design and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative RebalancingDesign and Implementation of Incremental Cooperative Rebalancing
Design and Implementation of Incremental Cooperative Rebalancing
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12c
 
Consumer offset management in Kafka
Consumer offset management in KafkaConsumer offset management in Kafka
Consumer offset management in Kafka
 
Operationalizing Machine Learning: Serving ML Models
Operationalizing Machine Learning: Serving ML ModelsOperationalizing Machine Learning: Serving ML Models
Operationalizing Machine Learning: Serving ML Models
 
Stream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar FunctionsStream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar Functions
 

Similar to Integration and Batch Processing on Cloud Foundry

JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)Graeme_IBM
 
Tungsten University: Configure and provision Tungsten clusters
Tungsten University: Configure and provision Tungsten clustersTungsten University: Configure and provision Tungsten clusters
Tungsten University: Configure and provision Tungsten clustersContinuent
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsVMware vFabric
 
colony framework & omni platform
colony framework & omni platformcolony framework & omni platform
colony framework & omni platformHive Solutions
 
Hive solutions cloudviews 2010 presentation
Hive solutions cloudviews 2010 presentationHive solutions cloudviews 2010 presentation
Hive solutions cloudviews 2010 presentationEuroCloud
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloudPolyglotMeetups
 
Virtualization aware Java VM
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VMTim Ellison
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloudBilly Korando
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 
Architecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud ExpoArchitecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud Exposmw355
 
Why Cloud Management Makes Sense - Josh Fraser
Why Cloud Management Makes Sense - Josh FraserWhy Cloud Management Makes Sense - Josh Fraser
Why Cloud Management Makes Sense - Josh FraserAmazon Web Services
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsFederico Michele Facca
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with SpringJoshua Long
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design PatternsBilgin Ibryam
 
Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)
Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)
Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)VMware Tanzu
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 
Plugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 TaiwanPlugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 TaiwanRack Lin
 

Similar to Integration and Batch Processing on Cloud Foundry (20)

JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
 
Tungsten University: Configure and provision Tungsten clusters
Tungsten University: Configure and provision Tungsten clustersTungsten University: Configure and provision Tungsten clusters
Tungsten University: Configure and provision Tungsten clusters
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS Apps
 
colony framework & omni platform
colony framework & omni platformcolony framework & omni platform
colony framework & omni platform
 
Hive solutions cloudviews 2010 presentation
Hive solutions cloudviews 2010 presentationHive solutions cloudviews 2010 presentation
Hive solutions cloudviews 2010 presentation
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud Foundry
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
 
Virtualization aware Java VM
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VM
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
Architecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud ExpoArchitecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud Expo
 
Why Cloud Management Makes Sense - Josh Fraser
Why Cloud Management Makes Sense - Josh FraserWhy Cloud Management Makes Sense - Josh Fraser
Why Cloud Management Makes Sense - Josh Fraser
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with Spring
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design Patterns
 
Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)
Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)
Spring Boot & Spring Cloud on PAS- Nate Schutta (2/2)
 
Introducing CQ 5.1
Introducing CQ 5.1Introducing CQ 5.1
Introducing CQ 5.1
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Plugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 TaiwanPlugin-able POS Solutions by Javascript @HDM9 Taiwan
Plugin-able POS Solutions by Javascript @HDM9 Taiwan
 

More from Joshua Long

Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling SoftwareJoshua Long
 
Bootiful Code with Spring Boot
Bootiful Code with Spring BootBootiful Code with Spring Boot
Bootiful Code with Spring BootJoshua Long
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 
Have You Seen Spring Lately?
Have You Seen Spring Lately?Have You Seen Spring Lately?
Have You Seen Spring Lately?Joshua Long
 
Java Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJava Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJoshua Long
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013Joshua Long
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonJoshua Long
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 
Extending spring
Extending springExtending spring
Extending springJoshua Long
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update finalJoshua Long
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud FoundryJoshua Long
 
Spring in-the-cloud
Spring in-the-cloudSpring in-the-cloud
Spring in-the-cloudJoshua Long
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeJoshua Long
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the ScenesJoshua Long
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampJoshua Long
 

More from Joshua Long (20)

Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling Software
 
Bootiful Code with Spring Boot
Bootiful Code with Spring BootBootiful Code with Spring Boot
Bootiful Code with Spring Boot
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Boot It Up
Boot It UpBoot It Up
Boot It Up
 
Have You Seen Spring Lately?
Have You Seen Spring Lately?Have You Seen Spring Lately?
Have You Seen Spring Lately?
 
Java Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJava Configuration Deep Dive with Spring
Java Configuration Deep Dive with Spring
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Extending spring
Extending springExtending spring
Extending spring
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update final
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundry
 
Spring in-the-cloud
Spring in-the-cloudSpring in-the-cloud
Spring in-the-cloud
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 

Recently uploaded

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Integration and Batch Processing on Cloud Foundry

  • 1. Enterprise Application Integration and Batch Processing in the Cloud Josh Long, Spring Developer Advocate josh.long@springsource.com @starbuxman © 2012 SpringOne 2GX. All rights reserved. Do not distribute without permission.
  • 2. Josh Long Spring Developer Advocate josh.long@springsource.com @starbuxman 2
  • 3. Worker processes on Cloud Foundry
  • 4. Lots of Potential  http://blog.springsource.org/2012/05/09/using-cloud-foundry-workers-with-spring/  lots of use cases --- applications: • background jobs target/appassembler/: • headless applications name: integration-service • batch jobs framework: • embedded web servers name: standalone info: mem: 64M description: Standalone Application exec: runtime: java command: bin/main url: mem: 512M instances: 1 services: stock_rabbitmq: type: rabbitmq 4
  • 5. Easy to Package Multi-component Java applications <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>appassembler-maven-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>assemble</goal> </goals> <configuration> <assembledirectory>target</assembledirectory> <programs> <program> <mainClass>org.cloudfoundry.workers.stocks.integration.service.Main</mainClass> </program> </programs> </configuration> </execution> </executions> </plugin> </plugins> </build> 5
  • 6. Cloud Scale Messaging with RabbitMQ
  • 7. First, an Introduction to AMQP & RabbitMQ
  • 8. Messaging Use Cases Decoupling producer consumer shopping cart sending request CC merchant NOT CONFIDENTIAL -- TELL EVERYONE 8
  • 9. Messaging Use Cases Bidirectional Decoupling producer consumer eg: remote procedure call NOT CONFIDENTIAL -- TELL EVERYONE 9
  • 10. Messaging Use Cases Bidirectional Decoupling producer producer consumer eg: place order and wait for confirmation NOT CONFIDENTIAL -- TELL EVERYONE 10
  • 11. Messaging Use Cases Bidirectional Decoupling producer consumer producer consumer eg: place order and wait for confirmation NOT CONFIDENTIAL -- TELL EVERYONE 11
  • 12. Messaging Use Cases work distribution and decoupling consumer producer consumer distribution can be duplicate or round-robin: - duplication for information (logging, auditing, etc) - round robin for scaling and load balancing NOT CONFIDENTIAL -- TELL EVERYONE 12
  • 13. Messaging Use Cases  Other Things a Message Broker Can Do • Store-and-forward of messages • Absorbing spikes of activity (again, decoupling) • Routing to different consumers based on message properties NOT CONFIDENTIAL -- TELL EVERYONE 13
  • 14. AMQP and JMS How does AMQP compare to JMS? When would I use one or the other? NOT CONFIDENTIAL -- TELL EVERYONE 14
  • 15. AMQP and JMS AMQP JMS Protocol API No language Java Industry committee, mainly finance JEE Interoperability from client libraries Interoperability from proprietary features Resources can be managed by clients Resources often centrally managed Not ubiquitous in enterprise Ubiquitous through JEE Flexible usage patterns, emphasise routing Two basic producer patterns (Queue and Topic) Designed for large numbers of queues and exchanges Hard to manage large numbers of Destinations NOT CONFIDENTIAL -- TELL EVERYONE 15
  • 16. AMQP and JMS  JMS • standard in the Java space • lots of open source options • provided with Java EE application servers • Spring JMS Java producers Message broker Java consumers C P queue C P queue C 16
  • 17. JMS  Sending JMS Messages • Inject an instance of Spring's JmsTemplate. • Provide the JMS ConnectionFactory in the JmsTemplate bean definition. @Component public class MessageSender { @Autowired private volatile JmsTemplate jmsTemplate; public void send(String message) { this.jmsTemplate.convertAndSend("example.queue", message); } } @Bean public ConnnectionFactory cf (){ return new CachingConnectionFactory(...); } @Bean public JmsTemplate template(){ return new JmsTemplate(this.cf()) ; } 17
  • 18. AMQP and JMS  AMQP • real standard • a product of the the companies with the most mission critical requirements • Spring AMQP AMQP producers exchanges Message broker AMQP consumers C P X queue C P X queue C 1
  • 19. AMQP and JMS  JMS Topic Explosion: • Messages with fine-grained routing, e.g. • Market data: region, country, exchange, ticker, … • Online gambling: sport, match, event-type, … • Message selectors are inefficient and fiddly to work with in the API • Exponential explosion of possible combinations of interesting subscriptions • Can implement as hierarchy of Topics • 1000s or 10000s of Destinations • Management nightmare • Sweet spot for AMQP NOT CONFIDENTIAL -- TELL EVERYONE 19
  • 20. AMQP  Sending AMQP Messages • Use AmqpTemplate instead of JmsTemplate (accepts exchange and routingKey). • Nothing changes on the listener side (just a POJO). @Component public class MessageSender { @Autowired private volatile AmqpTemplate amqpTemplate; public void send(String message) { this.amqpTemplate.convertAndSend( "myExchange", "some.routing.key", message); } } 20
  • 21. Spring AMQP  Java and .NET  AMQP core abstraction plus RabbitMQ implementation (built on rabbit client libraries)  Higher level patterns for clients: admin, producers and consumers  RabbitAdmin – declare exchanges, queues, bindings  RabbitTemplate – convenience methods for send and receive  MessageListenerContainer – POJO message handler, asynchronous  Spring Integration support http://www.springsource.org/spring-amqp NOT CONFIDENTIAL -- TELL EVERYONE 21
  • 22. Spring AMQP: RabbitTemplate public class MyComponent { private RabbitTemplate rabbitTemplate; public MyComponent(ConnectionFactory connectionFactory) { this.rabbitTemplate = new RabbitTemplate(connectionFactory); } public void read() throws Exception { ... String value = rabbitTemplate.receiveAndConvert("myQueueName"); ... } } Convenience methods NOT CONFIDENTIAL -- TELL EVERYONE 22
  • 23. Spring AMQP: SimpleMessageListenerContainer  Asynchronous message receiver  POJO handlers  Handles re-connection and listener failure (rollback, redelivery)  Message conversion and error handling strategies <listener-container connection-factory="connectionFactory"> <listener ref="handler" method="handle" queue-names="my.queue"> </listener-container> NOT CONFIDENTIAL -- TELL EVERYONE 23
  • 24. Messaging Use Cases  Patterns:  spatial decoupling (aka communication)  temporal decoupling (aka buffering)  logical decoupling (aka routing)  Promote: flexibility, resilience, performance, and scale  Conclusion: There is an enormous range of applications and problems to which messaging is an effective solution. NOT CONFIDENTIAL -- TELL EVERYONE 24
  • 25. Not confidential. Tell everyone. 25
  • 26. Not confidential. Tell everyone. 26
  • 27. Batch Processing in the Cloud Not confidential. Tell everyone. 27
  • 28. First, an Introduction to Spring Batch Not confidential. Tell everyone. 28
  • 29. Why we’re here... Not confidential. Tell everyone. 29
  • 30. ...So, What’s the Problem? Not confidential. Tell everyone. 30
  • 31. Job and Step Job * Step * JobInstance Step Scope * JobExecution * StepExecution Not confidential. Tell everyone. 31
  • 32. Getting Started Application Developer implements ItemProcessor (optional) input output (optional) configures ItemReader ItemWriter Job * StepExecutor concerns Step RepeatOperations ExceptionHandler Not confidential. Tell everyone. 32
  • 33. Spring Batch  Supports Batch API... • Jobs have Steps • Steps have Readers, and optional Processors and Writers • Readers read data • Processors process data coming into them, optionally transforming it. Optional. • Writers write data out Not confidential. Tell everyone. 33
  • 34. ItemReader public interface ItemReader<T> { T read() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException; } Returns null at end of dataset delegate Exception handling to framework Not confidential. Tell everyone. 34
  • 35. ItemProcessor (Optional) public interface ItemProcessor<I, O> { O process(I item) throws Exception; } Delegate Exception handling to framework Not confidential. Tell everyone. 35
  • 36. ItemWriter public interface ItemWriter<T> { void write(List<? extends T> items) throws Exception; } expects a “chunk” delegate Exception handling to framework Not confidential. Tell everyone. 36
  • 37. All Together... <job id="skipJob" incrementer="incrementer" xmlns="http://www.springframework.org/schema/batch"> <step id="step1"> <tasklet> <chunk reader="fileItemReader" processor="tradeProcessor" writer="tradeWriter" commit-interval="3" skip-limit="10"> </chunk> </tasklet> <next on="*" to="step2" /> <next on="COMPLETED WITH SKIPS" to="errorPrint1" /> <fail on="FAILED" exit-code="FAILED" /> </step> ... </job> Not confidential. Tell everyone. 37
  • 38. Partitioning Overview Job Step Step Step Not confidential. Tell everyone. 38
  • 39. Partitioning Overview Job Slave Step Slave Slave Master Slave Slave Step Slave Not confidential. Tell everyone. 39
  • 40. Requests We Have a Cloud, Let’s Scale!  Spring Batch supports Remote Chunking over AMQP • http://labs.bsb.com/2011/11/remote-partitioning-with-spring-batch/ • http://bit.ly/wrb8Ch master step execution results RabbitMQ Step Execution Requests slave 1 slave 2 slave 3 Not confidential. Tell everyone. 40
  • 41. Simple Strategy SPI for Distribution and Aggregation Not confidential. Tell everyone. 41
  • 42. Application Integration (in the Cloud) Not confidential. Tell everyone. 42
  • 43. Integration's More Common Than You Think channel System A System A System A System B Not confidential. Tell everyone. 43 6
  • 44. Nobody Builds Systems in a Vacuum do NOT reinvent the Wheel! Not confidential. Tell everyone. 44
  • 45. Don't over extend your architecture! Not confidential. Tell everyone. 45
  • 46. Rooted in Classic Patterns • By Gregor Hohpe & Bobby Woolf • Published 2003 • Collection of well-known patterns • http://www.eaipatterns.com/eaipatterns.html • Icon library provided Not confidential. Tell everyone. 46
  • 47. What is Spring Integration? • Light-weight messaging framework • Provides an adapter-based platform • Pipes and Filters at the core of Spring Integration’s architecture – Endpoint (Filter) – Channel (Pipe) – Message Not confidential. Tell everyone. 47
  • 48. DEMO • Spring Integration Primer @starbuxman slideshare.net/joshlong
  • 49. Spring Integration @Gateway  Gateways... • hide one system from the messaging semantics of another • Support all the message exchange patterns • Request • Request asynchronous (fire-n-forget) • Request/Reply • Request/Reply asynchronous (fire-n-forget) public class CustomerService { void addCustomer( Customer customer ) throws CrmException; } Not confidential. Tell everyone. 49
  • 50. Spring Integration @Gateway MessageChannel crmChannel = ...; MessagingOperations operations = .... ; operations.sendAndReceive( crmChannel , MessageBuilder.withPayload(new Customer(..)).build() ); Not confidential. Tell everyone. 50
  • 51. Spring Integration @Gateway public interface CustomerService { @Gateway void addCustomer( Customer customer ) throws CrmException; } Not confidential. Tell everyone. 51
  • 52. DEMO • using Spring Integration gateways @starbuxman slideshare.net/joshlong
  • 53. Summary  RabbitMQ is readily available Messaging in the Cloud  Spring Integration makes integration over AMQP easy  Spring Batch Makes Batch Jobs Easy • Remote Chunking Makes Using AMQP as the Coordination Fabric Easy Not confidential. Tell everyone. 53
  • 54. springsource.org | cloudfoundry.org Questions? Say hi! @starbuxman slideshare.net/joshlong @starbuxman josh.long@springsource.com

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. the toolchain is STS, java compiler (no startup scripts required!) \nintroduce Spring Roo\nintroduce the Appcontexts\nintroduce the various Di configuration types \n\n
  17. \n
  18. the toolchain is STS, java compiler (no startup scripts required!) \nintroduce Spring Roo\nintroduce the Appcontexts\nintroduce the various Di configuration types \n\n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. A better approach is decompose the war into a set of services.\nYou can do that either by nouns or by verbs.\n\n
  28. A better approach is decompose the war into a set of services.\nYou can do that either by nouns or by verbs.\n\n
  29. Example of what can happen if you run processes more than correct number of times.\n
  30. A better approach is decompose the war into a set of services.\nYou can do that either by nouns or by verbs.\n\n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. A better approach is decompose the war into a set of services.\nYou can do that either by nouns or by verbs.\n\n
  43. A better approach is decompose the war into a set of services.\nYou can do that either by nouns or by verbs.\n\n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&amp;#x2019;re going to build ourselves a file system poller to notify us of when something&amp;#x2019;s happened on the file system\n\n
  50. \n
  51. \n
  52. \n
  53. talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&amp;#x2019;re going to build ourselves a file system poller to notify us of when something&amp;#x2019;s happened on the file system\n\n
  54. \n
  55. \n