SlideShare una empresa de Scribd logo
1 de 91
Descargar para leer sin conexión
Decomposing applications for
deployability and scalability
  Chris Richardson


  Author of POJOs in Action
  Founder of the original CloudFoundry.com


   @crichardson
  chris.richardson@springsource.com
  http://plainoldobjects.com




                                             @crichardson
Presentation goal
How decomposing applications
  improves deployability and
         scalability
            and
   How Cloud Foundry helps
                             @crichardson
About Chris




              @crichardson
(About Chris)




                @crichardson
About Chris()




                @crichardson
About Chris




              @crichardson
About Chris




   http://www.theregister.co.uk/2009/08/19/springsource_cloud_foundry/




                                                                    @crichardson
vmc push About-Chris

         Developer Advocate




 Signup at http://cloudfoundry.com


                                 @crichardson
Agenda

The (sometimes evil) monolith
Decomposing applications into services
How do services communicate?
Presentation layer design
How Cloud Foundry helps



                                         @crichardson
Let’s imagine you are building
an e-commerce application



                           @crichardson
Traditional web application
architecture                 WAR



                       StoreFrontUI


                       Accounting
                        Service         MySQL
Browser       Apache
                                       Database
                        Inventory
                         Service

                        Shipping
                        Service


Simple to
    develop               Tomcat

      test
    deploy
     scale
                                      @crichardson
But there are problems with
 a monolithic architecture



                         @crichardson
Users expect a rich, dynamic
and interactive experience
                                                              h
                                                           oug
                                                     d   en
                                                  goo
                    HTTP Request
                                           is n’t
                                       e
                                ec tur            Java Web
                          hit
    Browser
                    HTML/Javascript               Application
                        I arc
              ty le U
          s
      Old



      Real-time web ≅ NodeJS

                                                                  @crichardson
Intimidates developers




                         @crichardson
Obstacle to frequent
deployments
 Need to redeploy everything to change one component
 Interrupts long running background (e.g. Quartz) jobs
 Increases risk of failure




                                  Fear of change




 Updates will happen less often
 e.g. Makes A/B testing UI really difficult
                                                         @crichardson
Overloads your IDE and
container




     Slows down development
                              @crichardson
Obstacle to scaling
development

      Accounting
                      E-commerce
      Engineering
                       application


      Shipping team




                                     @crichardson
Obstacle to scaling
development
                            WAR




        UI team        StoreFrontUI

       Accounting       Accounting

     Inventory team   InventoryService

      Shipping team       Shipping




                                         @crichardson
Obstacle to scaling
development                         But
           I want        the backend is not working
      to update the UI              yet!




   Lots of coordination and
    communication required                            @crichardson
Requires long-term commitment
to a technology stack




                          @crichardson
Agenda

The (sometimes evil) monolith
Decomposing applications into services
How do services communicate?
Presentation layer design
How Cloud Foundry helps



                                         @crichardson
@crichardson
The scale cube

   Y axis -
  functional
decomposition

    Scale by




                                                                      sim ing
    splitting




                                                                              r
                                                                            n
                                                                          ila
                                                                litt rtitio
different things




                                                                     a
                                                             ng ing
                                                        by ta p

                                                                s
                                                              da
                                                             sp
                                                  Sc is -


                                                         thi
                                              ax
                                                    ale
                                              Z



                           X axis
                   - horizontal duplication                                       @crichardson
Y-axis scaling - application level

                       WAR




                    StoreFrontUI

                    Accounting
                     Service

                      Inventory
                       Service

                      Shipping
                      Service




                                     @crichardson
Y-axis scaling - application level
                                            accounting web application


                                                  Accounting
                                                   Service




     Store front web application              inventory web application



        StoreFrontUI                                 Inventory
                                                      Service




                                             shipping web application



                                                     Shipping
                                                     Service




  Apply X axis cloning and/or Z axis partitioning to each service
                                                                          @crichardson
Partitioning strategies...

 Partition by verb, e.g. shipping service
 Partition by noun, e.g. inventory service
 Single Responsibility Principle
 Unix utilities - do one focussed thing well




                                               @crichardson
...Partitioning strategies
 Too few
   Drawbacks of the monolithic architecture
 Too many - a.k.a. Nano-service anti-pattern
   Runtime overhead
   Potential risk of excessive network hops
   Potentially difficult to understand system

   Something of an art
                                               @crichardson
Example micro-service
require 'sinatra'

post '/' do
  phone_number = params[:From]
  registration_url = "#{ENV['REGISTRATION_URL']}?phoneNumber=#{URI.encode(phone_number, "+")}"
  <<-eof
	     <Response>
	     	      <Sms>To complete registration please go to #{registration_url}</Sms>
	     </Response>
eof
end




          For more on micro-services see
                   @fgeorge52
                                                                                      @crichardson
Service deployment options
                      Isolation, manageability

VM
Linux Container/LXC
JVM
JAR/WAR/OSGI bundle/...


                         Density/efficiency
                                                 @crichardson
Real world examples
             http://techblog.netflix.com/



             http://highscalability.com/amazon-architecture




             http://www.addsimplicity.com/downloads/
             eBaySDForum2006-11-29.pdf

             http://queue.acm.org/detail.cfm?id=1394128




                                                   @crichardson
There are drawbacks



                      @crichardson
Complexity

See Steve Yegge’s Google Platforms Rant re
              Amazon.com


                                        @crichardson
Multiple databases
            &
Transaction management


                   @crichardson
Implementing features that
  span multiple services



                        @crichardson
When to use it?
  In the beginning:
 •You don’t need it
 •It will slow you down




                           Later on:
                          •You need it
                          •Refactoring is painful
                                             @crichardson
But there are many benefits
Scales development: develop, deploy and scale each service
independently
Update UI independently
Improves fault isolation
Eliminates long-term commitment to a single technology stack




     Modular, polyglot, multi-
     framework applications
                                                        @crichardson
Two levels of architecture
                       System-level

                             Services
Inter-service glue: interfaces and communication mechanisms
                          Slow changing


                       Service-level

            Internal architecture of each service
     Each service could use a different technology stack
                Pick the best tool for the job
                       Rapidly evolving

                                                           @crichardson
If services are small...

 Regularly rewrite using a better technology stack
 Adapt system to changing requirements and better
 technology without a total rewrite
 Pick the best developers rather than best <pick a
 language> developers polyglot culture




                                                     @crichardson
The human body as a system




                             @crichardson
50 to 70 billion of your cells die
           each day




                                @crichardson
Yet you (the system) remain you




                                  @crichardson
Can we build software systems
  with these characteristics?

                    http://dreamsongs.com/Files/
                DesignBeyondHumanAbilitiesSimp.pdf



             http://dreamsongs.com/Files/WhitherSoftware.pdf




                                                     @crichardson
Agenda

The (sometimes evil) monolith
Decomposing applications into services
How do services communicate?
Presentation layer design
How Cloud Foundry helps



                                         @crichardson
Inter-service communication
options
 Synchronous HTTP        asynchronous AMQP

 Formats: JSON, XML, Protocol Buffers, Thrift, ...
 Even via the database


      Asynchronous is preferred
JSON is fashionable but binary format
           is more efficient
                                                     @crichardson
Asynchronous message-based communication
                               wgrus-billing.war

                                Accounting
                                 Service




 wgrus-store.war              wgrus-inventory.war

                   RabbitMQ
 StoreFrontUI      (Message   InventoryService        MySQL
                    Broker)



                              wgrus-shipping.war


                              ShippingService




                                                    @crichardson
Benefits

Decouples caller from server
Caller unaware of server’s coordinates (URL)
Message broker buffers message when server is down/
slow
Supports a variety of communication patterns, e.g. point-
to-point, pub-sub, ...



                                                    @crichardson
Drawbacks


Additional complexity of message broker
Request/reply-style communication is more complex




                                               @crichardson
Writing code that calls
       services



                          @crichardson
The need for parallelism
                                  Service B
               b = serviceB()


                                              Call in parallel
                 c = serviceC()
Service A                         Service C



            d = serviceD(b, c)
                                  Service D


                                                      @crichardson
Java Futures are a great
concurrency abstraction

    http://en.wikipedia.org/wiki/
       Futures_and_promises
                                    @crichardson
Using Java Futures
public class Client {

    private ExecutorService executorService;
    private RemoteServiceProxy remoteServiceProxy;        Eventually contains result

    public void doSomething() throws ... {
        Future<Integer> result =
            executorService.submit(new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                return remoteServiceProxy.invokeRemoteService();
            }
        });

         /// Do other things
                                                              When needed wait for result
        int r = result.get(500, TimeUnit.MILLISECONDS);

        System.out.println(r);

    }
}                                                                                 @crichardson
Better future implementations



 Guava ListenableFutures = better
 Scala’s composable Futures = really good
 Java 8 CompletableFuture = great




                                            @crichardson
Composable Futures
val f1 = Future {    ... ; 1 }
val f2 = Future {    ... ; 2 }
                                            Transforms Future

val f4 = f2.map(_ * 2)
assertEquals(4, Await.result(f4, 1 second))

                                      Combines two futures
val fzip = f1 zip f2
assertEquals((1, 2), Await.result(fzip, 1 second))




 http://doc.akka.io/docs/akka/2.0.1/scala/futures.html

                                                                @crichardson
Using Scala futures
def callB() : Future[...] = ...
def callC() : Future[...] = ...
def callD() : Future[...] = ...                           Two calls execute in parallel


val future = for {
  (b, c) <- callB() zip callC();
  d <- callD(b, c)
 } yield d                                                      And then invokes D



val result = Await.result(future, 1 second)


  http://doc.akka.io/docs/akka/2.0.1/scala/futures.html            Get the result of D

                                                                                @crichardson
Spring Integration
Provides the building blocks for a pipes
and filters architecture
Enables development of application
components that are
  loosely coupled
  insulated from messaging infrastructure
Messaging defined declaratively




                                            @crichardson
Handling partial failures
                                    Down?
                                    Slow?

    Service A           Service B



                Down?
                Slow?




                                    @crichardson
About Netflix
           > 1B API calls/day
  1 API call   average 6 service calls

      Fault tolerance is essential



               http://techblog.netflix.com/2012/02/fault-tolerance-in-high-volume.html


                                                                          @crichardson
How to run out of threads


HTTP Request      X
                  X
                   X
                Thread 1

               Thread 2
               Thread 3
                  X
               Thread n
               Execute thread
                                     Service A


                                                         X
                                                         Service B




                   pool         Eventually all threads     If service B is
                                                         down then thread
                Tomcat             will be blocked        will be blocked




                                                               @crichardson
Their approach
  Network timeouts and retries
  Invoke remote services via a bounded thread pool
  Use the Circuit Breaker pattern
  On failure:
    return default/cached data
    return error to caller
  https://github.com/Netflix/Hystrix

See my talk tomorrow for more details
                                @crichardson
Agenda

The (sometimes evil) monolith
Decomposing applications into services
How do services communicate?
Presentation layer design
How Cloud Foundry helps



                                         @crichardson
Presentation layer evolution....

                         WAR

                           StoreFrontUI



           HTML / HTTP         View         Controller
 Browser


                                          Model




                                                         @crichardson
...Presentation layer evolution
Browser                              Web application


                                                Static
  View      Controller                         content

                         JSON-REST
                                              RESTful
          Model                              Endpoints

      HTML 5 -            Events               Event
      JavaScript                              publisher

No elaborate, server-side web framework
                 required           @crichardson
How to publish events to
       browser?



                       @crichardson
NodeJS is the fashionable
technology




                            @crichardson
Why NodeJS?
Familiar Javascript
High-performance, scalable event-driven, non-blocking I/O
model
Compact runtime
Over 17,000 modules developed by the community
Simple event publishing using socket.io or SockJS




                                                     @crichardson
Why not NodeJS?




             a.k.a. callback hell


                               @crichardson
A modern web application
  Browser
                             Node JS
             RESTful WS                  Service 1
HTML 5/
                            Server
 Java
                          application    Service 2
 Script        Events
                             Socket.io
 Socket.io
  client
                              server
                                         Service 3




                                               @crichardson
NodeJS - using RESTful WS
  and AMQP
                       REST
                               Service
 REST
Requests




           Node JS


 Events
           socket.io
                       AMQP              AMQP
                              RabbitMQ          Service




                                                 @crichardson
Socket.io server-side
 var express = require('express')
   , http = require('http')
   , amqp = require(‘amqp’)
   ....;
                                                          Handle
 server.listen(8081);                                    socket.io
 ...
 var amqpCon = amqp.createConnection(...);
                                                        connection

 io.sockets.on('connection', function (socket) {

   function amqpMessageHandler(message, headers, deliveryInfo) {
       var m = JSON.parse(message.data.toString());
                                                                  Republish
       socket.emit(‘tick’, m);                                   as socket.io
    };
    amqpCon.queue(“”, {},
                                                                    event
        function(queue) {
          queue.bind(“myExchange”, “”);
          queue.subscribe(amqpMessageHandler);
    });                                                      Subscribe to
 });                                                         AMQP queue
 https://github.com/cer/nodejs-clock                              @crichardson
Socket.io - client side
<html>
<body>

The event is <span data-bind="text: ticker"></span>

<script src="/socket.io/socket.io.js"></script>
<script src="/knockout-2.0.0.js"></script>
<script src="/clock.js"></script>
                           Bind to model              Connect to
</body>
</html>
                                                       socket.io
           clock.js
var socket = io.connect(location.hostname);

function ClockModel() {
  self.ticker = ko.observable(1);                      Subscribe
  socket.on('tick', function (data) {
   self.ticker(data);
                                                      to tick event
 });
};                                                       Update
ko.applyBindings(new ClockModel());                      model
                                                                   @crichardson
Agenda

The (sometimes evil) monolith
Decomposing applications into services
How do services communicate?
Presentation layer design
How Cloud Foundry helps



                                         @crichardson
Original architecture
                         WAR




                    StoreFrontUI

                     Accounting
                      Service
                                        MySQL
Browser   Apache
                                       Database
                   InventoryService


                      Shipping




                      Tomcat



                                      @crichardson
Modern architecture




                                                        p,
                                                     lo
                                            Native Mobile                HTML5 mobile
            Desktop Browser                                               application
                                             application




                                                  ve
                  StoreUI                        StoreUI                     StoreUI




                                          st de
                                               NodeJS




                                                ?
Asynchronous,                                                                          Javascript




                                              is
   scalable
communication                                    StoreUI


                                        te e

                                           th
                                           w
                                              RabbitMQ




                                        oy
                            do

 Spring/Scala                         pl                                                             Standalone
web application                 Inventory                          Shipping
                                                                                                      “headless”
            ow



                                 Service                           Service
                                   de
                                                                                                     Spring/Java
                                                                                                     applications
           H


                                      d


                                       MySQL
                                an



              Billing Service         Customer             Redis Inventory             Mongo Order
                                      Database               Database                   Database
                                                                                                     @crichardson
Traditional tools: monolithic
applications




                            @crichardson
Developing modular apps is
more difficult
Many more moving parts to manage
  Platform services: SQL, NoSQL, RabbitMQ
  Application services: your code
Who is going to setup the environments:
  the developer sandbox?
  ...

But Cloud Foundry helps...
                                            @crichardson
Easy polyglot application deployment and
service provisioning

                                                        OSS community
       Ap
          p   lica
                 'o


    vFabric
   Postgres                                                Private	
  
                      n	
  S



                                                           Clouds	
  
              Data Services
                              erv



         vFabric                                        Public
                                 i
                                ce



                                Msg
       RabbitMQTM
                                                        Clouds
                               Services
                                  	
  In




                                                     Micro
                                        ter




                                           Other
                                          Services
                                                     Clouds
                                           fac




                    Additional partners
                                              e




                       services …




                                                                         @crichardson
Creating a platform service
 instance
$ vmc create-service mysql mysql1
Creating Service: OK

$ vmc services
......

=========== Provisioned Services ============

+-------------+---------+
| Name        | Service |
+-------------+---------+
| mysql1      | mysql   |
+-------------+---------+


                                                @crichardson
Multi-application manifest -
part 1
 ---
 applications:
  inventory/target:                    Path to application
       name: inventory
       url: cer-inventory.chrisr.cloudfoundry.me
       framework:
        name: spring
        info:
         mem: 512M
         description: Java SpringSource Spring Application
         exec:
       mem: 512M
       instances: 1
       services:                             Required platform services
        si-rabbit:
         type: :rabbitmq
        si-mongo:
         type: :mongodb
        si-redis:
         type: :redis
                                                                          @crichardson
Multi-application manifest -
part 2
store/target:
                                                    Path to application
 name: store
 url: cer-store.chrisr.cloudfoundry.me
 framework:
  name: spring
  info:
   mem: 512M
   description: Java SpringSource Spring Application
   exec:
 mem: 512M
 instances: 1                            Required platform services
 services:
  si-mongo:
   type: :mongodb
  si-rabbit:
   type: :rabbitmq


                                                                          @crichardson
One command to create platform
services and deploy application
 $ vmc push
 Would you like to deploy from the current directory? [Yn]:
 Pushing application 'inventory'...
 Creating Application: OK
 Creating Service [si-rabbit]: OK
 Binding Service [si-rabbit]: OK
 Creating Service [si-mongo]: OK            vmc push:
 Binding Service [si-mongo]: OK
                                            •Reads the manifest file
                                            •Creates the required platform services
 Creating Service [si-redis]: OK
 Binding Service [si-redis]: OK
 Uploading Application:
  Checking for available resources: OK
                                            •Deploys all the applications
  Processing resources: OK
  Packing application: OK
  Uploading (12K): OK
 Push Status: OK
 Staging Application 'inventory': OK
 Starting Application 'inventory': OK
 Pushing application 'store'...

                                                                               @crichardson
Micro Cloud Foundry: new developer sandbox


         App Instances                                 Services




     Open source Platform as a Service project




                                                            10.04



   A PaaS packaged as a VMware Virtual Machine

                                                 Use as a developer sandbox
                             • Use the services from Junit integration tests
                             • Deploy your application for functional testing
                             • Remote debugging from STS                        @crichardson
Using Caldecott to tunnel
into your services




                            @crichardson
Caldecott = TCP over HTTP

           native
          protocol                                             native
                                         HTTP
Service                      Caldecott          Caldecott     protocol
                                                                         Service
 client              Port      gem              application
                     NNN




             Your computer                               Cloud Foundry




                                                                           @crichardson
Using Caldecott…
$ vmc tunnel
1: mysql-135e0
2: mysql1
Which service to tunnel to?: 2
Password: ********
Stopping Application: OK
Redeploying tunnel application 'caldecott'.
Uploading Application:
  Checking for available resources: OK
  Packing application: OK
  Uploading (1K): OK
Push Status: OK
Binding Service [mysql1]: OK
Staging Application: OK
Starting Application: OK
Getting tunnel connection info: OK

Service connection info:
  username : uMe6Apgw00AhS
  password : pKcD76PcZR7GZ
  name     : d7cb8afb52f084f3d9bdc269e7d99ab50

Starting tunnel to mysql1 on port 10000.
1: none
2: mysql
Which client would you like to start?: 2




                                                 @crichardson
…Using Caldecott
Launching 'mysql --protocol=TCP --host=localhost --port=10000 --
    user=uMe6Apgw00AhS --password=pKcD76PcZR7GZ
    d7cb8afb52f084f3d9bdc269e7d99ab50'

Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 10944342
Server version: 5.1.54-rel12.5 Percona Server with XtraDB (GPL), Release 12.5,
    Revision 188

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>




                                                                       @crichardson
Running JUnit test with
Caldecott
  Configure your test code to use port + connection info




                                                          @crichardson
Summary



          @crichardson
Monolithic applications are
simple to develop and deploy

    BUT have significant
       drawbacks
                           @crichardson
Apply the scale cube

               Modular, polyglot, and
               scalable applications
               Services developed,
               deployed and scaled
               independently



                                @crichardson
Cloud Foundry helps
                                                            .js
                      Ap
                         p




                                                                                    e
                          lica



                                                                                        Private	
  




                                                                                 fac
  Data Services
                              'o




                                                                              ter
                                                                                        Clouds	
  
                                 n	
  S




                                                                       r	
  In
                                   erv




                                                                    ide
                                                                              Public
                                      i




                                                                  ov
                                       ce




                  Msg Services
                                         	
  In




                                                            	
  Pr
                                                                              Clouds
                                               ter




                                                          ud
                                                         Cl o
                                                  fac




                                                                  Micro
                                                     e




                                  Other
                                 Services
                                                                  Clouds




                                                                                                      @crichardson
@crichardson chris.richardson@springsource.com
           http://plainoldobjects.com




                Questions?

 www.cloudfoundry.com                        @crichardson

Más contenido relacionado

La actualidad más candente

Building microservices with Scala, functional domain models and Spring Boot
Building microservices with Scala, functional domain models and Spring BootBuilding microservices with Scala, functional domain models and Spring Boot
Building microservices with Scala, functional domain models and Spring BootChris Richardson
 
Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...
Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...
Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...Chris Richardson
 
Making of a Successful Cloud Business
Making of a Successful Cloud BusinessMaking of a Successful Cloud Business
Making of a Successful Cloud BusinessACMBangalore
 
Mastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesMastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesJosh Evans
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service OverviewEric Nelson
 
Тестирование производительности Ajax приложений с помощью JMeter
Тестирование производительности Ajax приложений с помощью JMeterТестирование производительности Ajax приложений с помощью JMeter
Тестирование производительности Ajax приложений с помощью JMeterautomated-testing.info
 

La actualidad más candente (10)

Building microservices with Scala, functional domain models and Spring Boot
Building microservices with Scala, functional domain models and Spring BootBuilding microservices with Scala, functional domain models and Spring Boot
Building microservices with Scala, functional domain models and Spring Boot
 
Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...
Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...
Map, Flatmap and Reduce are Your New Best Friends: Simpler Collections, Concu...
 
Making of a Successful Cloud Business
Making of a Successful Cloud BusinessMaking of a Successful Cloud Business
Making of a Successful Cloud Business
 
CR Unlocking the Power of AWS
CR Unlocking the Power of AWSCR Unlocking the Power of AWS
CR Unlocking the Power of AWS
 
Jeff barr Seattle_interactive_2011_q4
Jeff barr Seattle_interactive_2011_q4Jeff barr Seattle_interactive_2011_q4
Jeff barr Seattle_interactive_2011_q4
 
Microsoft's Cloud OS Launch, Revisited
Microsoft's Cloud OS Launch, RevisitedMicrosoft's Cloud OS Launch, Revisited
Microsoft's Cloud OS Launch, Revisited
 
Mastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to MicroservicesMastering Chaos - A Netflix Guide to Microservices
Mastering Chaos - A Netflix Guide to Microservices
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service Overview
 
Тестирование производительности Ajax приложений с помощью JMeter
Тестирование производительности Ajax приложений с помощью JMeterТестирование производительности Ajax приложений с помощью JMeter
Тестирование производительности Ajax приложений с помощью JMeter
 

Destacado

Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Chris Richardson
 
Developing applications with Cloud Services (Devnexus 2013)
Developing applications with Cloud Services (Devnexus 2013)Developing applications with Cloud Services (Devnexus 2013)
Developing applications with Cloud Services (Devnexus 2013)Chris Richardson
 
Polygot persistence for Java Developers - August 2011 / @Oakjug
Polygot persistence for Java Developers - August 2011 / @OakjugPolygot persistence for Java Developers - August 2011 / @Oakjug
Polygot persistence for Java Developers - August 2011 / @OakjugChris Richardson
 
Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...Chris Richardson
 
Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)Chris Richardson
 
Developing applications with Cloud Services #javaone 2012
Developing applications with Cloud Services  #javaone 2012Developing applications with Cloud Services  #javaone 2012
Developing applications with Cloud Services #javaone 2012Chris Richardson
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Chris Richardson
 
Developing polyglot persistence applications #javaone 2012
Developing polyglot persistence applications  #javaone 2012Developing polyglot persistence applications  #javaone 2012
Developing polyglot persistence applications #javaone 2012Chris Richardson
 
Decomposing applications for scalability and deployability - svcc sv_code_ca...
Decomposing applications for scalability and deployability  - svcc sv_code_ca...Decomposing applications for scalability and deployability  - svcc sv_code_ca...
Decomposing applications for scalability and deployability - svcc sv_code_ca...Chris Richardson
 
Developing polyglot persistence applications (SpringOne India 2012)
Developing polyglot persistence applications (SpringOne India 2012)Developing polyglot persistence applications (SpringOne India 2012)
Developing polyglot persistence applications (SpringOne India 2012)Chris Richardson
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Chris Richardson
 
Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)Chris Richardson
 
Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)Chris Richardson
 
NodeJS: the good parts? A skeptic’s view (jax jax2013)
NodeJS: the good parts? A skeptic’s view (jax jax2013)NodeJS: the good parts? A skeptic’s view (jax jax2013)
NodeJS: the good parts? A skeptic’s view (jax jax2013)Chris Richardson
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Chris Richardson
 
Adventures with Microservices
Adventures with MicroservicesAdventures with Microservices
Adventures with MicroservicesAnand Agrawal
 
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...Chris Richardson
 
Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...Chris Richardson
 
API Microservices with Node.js and Docker
API Microservices with Node.js and DockerAPI Microservices with Node.js and Docker
API Microservices with Node.js and DockerApigee | Google Cloud
 
Microservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraJorge Bay Gondra
 

Destacado (20)

Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
 
Developing applications with Cloud Services (Devnexus 2013)
Developing applications with Cloud Services (Devnexus 2013)Developing applications with Cloud Services (Devnexus 2013)
Developing applications with Cloud Services (Devnexus 2013)
 
Polygot persistence for Java Developers - August 2011 / @Oakjug
Polygot persistence for Java Developers - August 2011 / @OakjugPolygot persistence for Java Developers - August 2011 / @Oakjug
Polygot persistence for Java Developers - August 2011 / @Oakjug
 
Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...Decomposing applications for deployability and scalability (SpringOne China 2...
Decomposing applications for deployability and scalability (SpringOne China 2...
 
Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)Developing polyglot persistence applications (devnexus 2013)
Developing polyglot persistence applications (devnexus 2013)
 
Developing applications with Cloud Services #javaone 2012
Developing applications with Cloud Services  #javaone 2012Developing applications with Cloud Services  #javaone 2012
Developing applications with Cloud Services #javaone 2012
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)Developing polyglot applications on Cloud Foundry (#oredev 2012)
Developing polyglot applications on Cloud Foundry (#oredev 2012)
 
Developing polyglot persistence applications #javaone 2012
Developing polyglot persistence applications  #javaone 2012Developing polyglot persistence applications  #javaone 2012
Developing polyglot persistence applications #javaone 2012
 
Decomposing applications for scalability and deployability - svcc sv_code_ca...
Decomposing applications for scalability and deployability  - svcc sv_code_ca...Decomposing applications for scalability and deployability  - svcc sv_code_ca...
Decomposing applications for scalability and deployability - svcc sv_code_ca...
 
Developing polyglot persistence applications (SpringOne India 2012)
Developing polyglot persistence applications (SpringOne India 2012)Developing polyglot persistence applications (SpringOne India 2012)
Developing polyglot persistence applications (SpringOne India 2012)
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)
 
Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)Improving application design with a rich domain model (springone 2007)
Improving application design with a rich domain model (springone 2007)
 
Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)Developing polyglot persistence applications (SpringOne China 2012)
Developing polyglot persistence applications (SpringOne China 2012)
 
NodeJS: the good parts? A skeptic’s view (jax jax2013)
NodeJS: the good parts? A skeptic’s view (jax jax2013)NodeJS: the good parts? A skeptic’s view (jax jax2013)
NodeJS: the good parts? A skeptic’s view (jax jax2013)
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)
 
Adventures with Microservices
Adventures with MicroservicesAdventures with Microservices
Adventures with Microservices
 
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
Developing and Deploying Java applications on the Amazon Elastic Compute Clou...
 
Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...
 
API Microservices with Node.js and Docker
API Microservices with Node.js and DockerAPI Microservices with Node.js and Docker
API Microservices with Node.js and Docker
 
Microservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache Cassandra
 

Similar a Decomposing applications for scalability and deployability (devnexus 2013)

Decomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxDecomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxChris Richardson
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampJoshua Long
 
Spring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptSpring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptChris Richardson
 
Evolving big microservice architectures
Evolving big microservice architecturesEvolving big microservice architectures
Evolving big microservice architecturesNikolay Stoitsev
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architectureChris Richardson
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonJAXLondon2014
 
Flex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIGFlex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIGChris Richardson
 
CommunityOneEast 09 - Running Java On Amazon EC2
CommunityOneEast 09 - Running Java On Amazon EC2CommunityOneEast 09 - Running Java On Amazon EC2
CommunityOneEast 09 - Running Java On Amazon EC2Chris Richardson
 
Cloud Computing through FCAPS Managed Services in a Virtualized Data Center
Cloud Computing through FCAPS Managed Services in a Virtualized Data CenterCloud Computing through FCAPS Managed Services in a Virtualized Data Center
Cloud Computing through FCAPS Managed Services in a Virtualized Data Centervsarathy
 
SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2Chris Richardson
 
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)Chris Richardson
 
Building tomorrow's web with today's tools
Building tomorrow's web with today's toolsBuilding tomorrow's web with today's tools
Building tomorrow's web with today's toolsJames Pearce
 
Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...
Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...
Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...eCommConf
 
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...Shreeraj Shah
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Chris Richardson
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Chris Richardson
 
Path to Event Sourcing/CQRS - Derya SEZEN
Path to Event Sourcing/CQRS - Derya SEZENPath to Event Sourcing/CQRS - Derya SEZEN
Path to Event Sourcing/CQRS - Derya SEZENkloia
 
GeeCON Microservices 2015 scaling micro services at gilt
GeeCON Microservices 2015   scaling micro services at giltGeeCON Microservices 2015   scaling micro services at gilt
GeeCON Microservices 2015 scaling micro services at giltAdrian Trenaman
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architecturessgleadow
 

Similar a Decomposing applications for scalability and deployability (devnexus 2013) (20)

Decomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gxDecomposing applications for deployability and scalability #springone2gx #s12gx
Decomposing applications for deployability and scalability #springone2gx #s12gx
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
Spring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, EgyptSpring into the Cloud - JDC2012 Cairo, Egypt
Spring into the Cloud - JDC2012 Cairo, Egypt
 
Evolving big microservice architectures
Evolving big microservice architecturesEvolving big microservice architectures
Evolving big microservice architectures
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Flex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIGFlex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIG
 
CommunityOneEast 09 - Running Java On Amazon EC2
CommunityOneEast 09 - Running Java On Amazon EC2CommunityOneEast 09 - Running Java On Amazon EC2
CommunityOneEast 09 - Running Java On Amazon EC2
 
Cloud Computing through FCAPS Managed Services in a Virtualized Data Center
Cloud Computing through FCAPS Managed Services in a Virtualized Data CenterCloud Computing through FCAPS Managed Services in a Virtualized Data Center
Cloud Computing through FCAPS Managed Services in a Virtualized Data Center
 
SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2SD Forum Java SIG - Running Java Applications On Amazon EC2
SD Forum Java SIG - Running Java Applications On Amazon EC2
 
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
Decompose that WAR? A pattern language for microservices (@QCON @QCONSP)
 
Building tomorrow's web with today's tools
Building tomorrow's web with today's toolsBuilding tomorrow's web with today's tools
Building tomorrow's web with today's tools
 
Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...
Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...
Randy Bias - Presentation at Emerging Communications Conference & Awards (eCo...
 
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
[Infosecworld 08 Orlando] New Defenses for .NET Web Apps: IHttpModule in Prac...
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
Path to Event Sourcing/CQRS - Derya SEZEN
Path to Event Sourcing/CQRS - Derya SEZENPath to Event Sourcing/CQRS - Derya SEZEN
Path to Event Sourcing/CQRS - Derya SEZEN
 
Final_Presentation
Final_PresentationFinal_Presentation
Final_Presentation
 
GeeCON Microservices 2015 scaling micro services at gilt
GeeCON Microservices 2015   scaling micro services at giltGeeCON Microservices 2015   scaling micro services at gilt
GeeCON Microservices 2015 scaling micro services at gilt
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
 

Más de Chris Richardson

The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?Chris Richardson
 
More the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternChris Richardson
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...Chris Richardson
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Chris Richardson
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsChris Richardson
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfChris Richardson
 
Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Chris Richardson
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...Chris Richardson
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Chris Richardson
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 Chris Richardson
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureChris Richardson
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Chris Richardson
 
Designing loosely coupled services
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled servicesChris Richardson
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Chris Richardson
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...Chris Richardson
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Chris Richardson
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...Chris Richardson
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationChris Richardson
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate PlatformChris Richardson
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolithChris Richardson
 

Más de Chris Richardson (20)

The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?
 
More the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-pattern
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patterns
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
 
Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
 
Designing loosely coupled services
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled services
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders application
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate Platform
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith
 

Último

"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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"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
 
"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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

"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...
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"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
 
"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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Decomposing applications for scalability and deployability (devnexus 2013)

  • 1. Decomposing applications for deployability and scalability Chris Richardson Author of POJOs in Action Founder of the original CloudFoundry.com @crichardson chris.richardson@springsource.com http://plainoldobjects.com @crichardson
  • 2. Presentation goal How decomposing applications improves deployability and scalability and How Cloud Foundry helps @crichardson
  • 3. About Chris @crichardson
  • 4. (About Chris) @crichardson
  • 5. About Chris() @crichardson
  • 6. About Chris @crichardson
  • 7. About Chris http://www.theregister.co.uk/2009/08/19/springsource_cloud_foundry/ @crichardson
  • 8. vmc push About-Chris Developer Advocate Signup at http://cloudfoundry.com @crichardson
  • 9. Agenda The (sometimes evil) monolith Decomposing applications into services How do services communicate? Presentation layer design How Cloud Foundry helps @crichardson
  • 10. Let’s imagine you are building an e-commerce application @crichardson
  • 11. Traditional web application architecture WAR StoreFrontUI Accounting Service MySQL Browser Apache Database Inventory Service Shipping Service Simple to develop Tomcat test deploy scale @crichardson
  • 12. But there are problems with a monolithic architecture @crichardson
  • 13. Users expect a rich, dynamic and interactive experience h oug d en goo HTTP Request is n’t e ec tur Java Web hit Browser HTML/Javascript Application I arc ty le U s Old Real-time web ≅ NodeJS @crichardson
  • 14. Intimidates developers @crichardson
  • 15. Obstacle to frequent deployments Need to redeploy everything to change one component Interrupts long running background (e.g. Quartz) jobs Increases risk of failure Fear of change Updates will happen less often e.g. Makes A/B testing UI really difficult @crichardson
  • 16. Overloads your IDE and container Slows down development @crichardson
  • 17. Obstacle to scaling development Accounting E-commerce Engineering application Shipping team @crichardson
  • 18. Obstacle to scaling development WAR UI team StoreFrontUI Accounting Accounting Inventory team InventoryService Shipping team Shipping @crichardson
  • 19. Obstacle to scaling development But I want the backend is not working to update the UI yet! Lots of coordination and communication required @crichardson
  • 20. Requires long-term commitment to a technology stack @crichardson
  • 21. Agenda The (sometimes evil) monolith Decomposing applications into services How do services communicate? Presentation layer design How Cloud Foundry helps @crichardson
  • 23. The scale cube Y axis - functional decomposition Scale by sim ing splitting r n ila litt rtitio different things a ng ing by ta p s da sp Sc is - thi ax ale Z X axis - horizontal duplication @crichardson
  • 24. Y-axis scaling - application level WAR StoreFrontUI Accounting Service Inventory Service Shipping Service @crichardson
  • 25. Y-axis scaling - application level accounting web application Accounting Service Store front web application inventory web application StoreFrontUI Inventory Service shipping web application Shipping Service Apply X axis cloning and/or Z axis partitioning to each service @crichardson
  • 26. Partitioning strategies... Partition by verb, e.g. shipping service Partition by noun, e.g. inventory service Single Responsibility Principle Unix utilities - do one focussed thing well @crichardson
  • 27. ...Partitioning strategies Too few Drawbacks of the monolithic architecture Too many - a.k.a. Nano-service anti-pattern Runtime overhead Potential risk of excessive network hops Potentially difficult to understand system Something of an art @crichardson
  • 28. Example micro-service require 'sinatra' post '/' do phone_number = params[:From] registration_url = "#{ENV['REGISTRATION_URL']}?phoneNumber=#{URI.encode(phone_number, "+")}" <<-eof <Response> <Sms>To complete registration please go to #{registration_url}</Sms> </Response> eof end For more on micro-services see @fgeorge52 @crichardson
  • 29. Service deployment options Isolation, manageability VM Linux Container/LXC JVM JAR/WAR/OSGI bundle/... Density/efficiency @crichardson
  • 30. Real world examples http://techblog.netflix.com/ http://highscalability.com/amazon-architecture http://www.addsimplicity.com/downloads/ eBaySDForum2006-11-29.pdf http://queue.acm.org/detail.cfm?id=1394128 @crichardson
  • 31. There are drawbacks @crichardson
  • 32. Complexity See Steve Yegge’s Google Platforms Rant re Amazon.com @crichardson
  • 33. Multiple databases & Transaction management @crichardson
  • 34. Implementing features that span multiple services @crichardson
  • 35. When to use it? In the beginning: •You don’t need it •It will slow you down Later on: •You need it •Refactoring is painful @crichardson
  • 36. But there are many benefits Scales development: develop, deploy and scale each service independently Update UI independently Improves fault isolation Eliminates long-term commitment to a single technology stack Modular, polyglot, multi- framework applications @crichardson
  • 37. Two levels of architecture System-level Services Inter-service glue: interfaces and communication mechanisms Slow changing Service-level Internal architecture of each service Each service could use a different technology stack Pick the best tool for the job Rapidly evolving @crichardson
  • 38. If services are small... Regularly rewrite using a better technology stack Adapt system to changing requirements and better technology without a total rewrite Pick the best developers rather than best <pick a language> developers polyglot culture @crichardson
  • 39. The human body as a system @crichardson
  • 40. 50 to 70 billion of your cells die each day @crichardson
  • 41. Yet you (the system) remain you @crichardson
  • 42. Can we build software systems with these characteristics? http://dreamsongs.com/Files/ DesignBeyondHumanAbilitiesSimp.pdf http://dreamsongs.com/Files/WhitherSoftware.pdf @crichardson
  • 43. Agenda The (sometimes evil) monolith Decomposing applications into services How do services communicate? Presentation layer design How Cloud Foundry helps @crichardson
  • 44. Inter-service communication options Synchronous HTTP asynchronous AMQP Formats: JSON, XML, Protocol Buffers, Thrift, ... Even via the database Asynchronous is preferred JSON is fashionable but binary format is more efficient @crichardson
  • 45. Asynchronous message-based communication wgrus-billing.war Accounting Service wgrus-store.war wgrus-inventory.war RabbitMQ StoreFrontUI (Message InventoryService MySQL Broker) wgrus-shipping.war ShippingService @crichardson
  • 46. Benefits Decouples caller from server Caller unaware of server’s coordinates (URL) Message broker buffers message when server is down/ slow Supports a variety of communication patterns, e.g. point- to-point, pub-sub, ... @crichardson
  • 47. Drawbacks Additional complexity of message broker Request/reply-style communication is more complex @crichardson
  • 48. Writing code that calls services @crichardson
  • 49. The need for parallelism Service B b = serviceB() Call in parallel c = serviceC() Service A Service C d = serviceD(b, c) Service D @crichardson
  • 50. Java Futures are a great concurrency abstraction http://en.wikipedia.org/wiki/ Futures_and_promises @crichardson
  • 51. Using Java Futures public class Client { private ExecutorService executorService; private RemoteServiceProxy remoteServiceProxy; Eventually contains result public void doSomething() throws ... { Future<Integer> result = executorService.submit(new Callable<Integer>() { @Override public Integer call() throws Exception { return remoteServiceProxy.invokeRemoteService(); } }); /// Do other things When needed wait for result int r = result.get(500, TimeUnit.MILLISECONDS); System.out.println(r); } } @crichardson
  • 52. Better future implementations Guava ListenableFutures = better Scala’s composable Futures = really good Java 8 CompletableFuture = great @crichardson
  • 53. Composable Futures val f1 = Future { ... ; 1 } val f2 = Future { ... ; 2 } Transforms Future val f4 = f2.map(_ * 2) assertEquals(4, Await.result(f4, 1 second)) Combines two futures val fzip = f1 zip f2 assertEquals((1, 2), Await.result(fzip, 1 second)) http://doc.akka.io/docs/akka/2.0.1/scala/futures.html @crichardson
  • 54. Using Scala futures def callB() : Future[...] = ... def callC() : Future[...] = ... def callD() : Future[...] = ... Two calls execute in parallel val future = for { (b, c) <- callB() zip callC(); d <- callD(b, c) } yield d And then invokes D val result = Await.result(future, 1 second) http://doc.akka.io/docs/akka/2.0.1/scala/futures.html Get the result of D @crichardson
  • 55. Spring Integration Provides the building blocks for a pipes and filters architecture Enables development of application components that are loosely coupled insulated from messaging infrastructure Messaging defined declaratively @crichardson
  • 56. Handling partial failures Down? Slow? Service A Service B Down? Slow? @crichardson
  • 57. About Netflix > 1B API calls/day 1 API call average 6 service calls Fault tolerance is essential http://techblog.netflix.com/2012/02/fault-tolerance-in-high-volume.html @crichardson
  • 58. How to run out of threads HTTP Request X X X Thread 1 Thread 2 Thread 3 X Thread n Execute thread Service A X Service B pool Eventually all threads If service B is down then thread Tomcat will be blocked will be blocked @crichardson
  • 59. Their approach Network timeouts and retries Invoke remote services via a bounded thread pool Use the Circuit Breaker pattern On failure: return default/cached data return error to caller https://github.com/Netflix/Hystrix See my talk tomorrow for more details @crichardson
  • 60. Agenda The (sometimes evil) monolith Decomposing applications into services How do services communicate? Presentation layer design How Cloud Foundry helps @crichardson
  • 61. Presentation layer evolution.... WAR StoreFrontUI HTML / HTTP View Controller Browser Model @crichardson
  • 62. ...Presentation layer evolution Browser Web application Static View Controller content JSON-REST RESTful Model Endpoints HTML 5 - Events Event JavaScript publisher No elaborate, server-side web framework required @crichardson
  • 63. How to publish events to browser? @crichardson
  • 64. NodeJS is the fashionable technology @crichardson
  • 65. Why NodeJS? Familiar Javascript High-performance, scalable event-driven, non-blocking I/O model Compact runtime Over 17,000 modules developed by the community Simple event publishing using socket.io or SockJS @crichardson
  • 66. Why not NodeJS? a.k.a. callback hell @crichardson
  • 67. A modern web application Browser Node JS RESTful WS Service 1 HTML 5/ Server Java application Service 2 Script Events Socket.io Socket.io client server Service 3 @crichardson
  • 68. NodeJS - using RESTful WS and AMQP REST Service REST Requests Node JS Events socket.io AMQP AMQP RabbitMQ Service @crichardson
  • 69. Socket.io server-side var express = require('express') , http = require('http') , amqp = require(‘amqp’) ....; Handle server.listen(8081); socket.io ... var amqpCon = amqp.createConnection(...); connection io.sockets.on('connection', function (socket) { function amqpMessageHandler(message, headers, deliveryInfo) { var m = JSON.parse(message.data.toString()); Republish socket.emit(‘tick’, m); as socket.io }; amqpCon.queue(“”, {}, event function(queue) { queue.bind(“myExchange”, “”); queue.subscribe(amqpMessageHandler); }); Subscribe to }); AMQP queue https://github.com/cer/nodejs-clock @crichardson
  • 70. Socket.io - client side <html> <body> The event is <span data-bind="text: ticker"></span> <script src="/socket.io/socket.io.js"></script> <script src="/knockout-2.0.0.js"></script> <script src="/clock.js"></script> Bind to model Connect to </body> </html> socket.io clock.js var socket = io.connect(location.hostname); function ClockModel() { self.ticker = ko.observable(1); Subscribe socket.on('tick', function (data) { self.ticker(data); to tick event }); }; Update ko.applyBindings(new ClockModel()); model @crichardson
  • 71. Agenda The (sometimes evil) monolith Decomposing applications into services How do services communicate? Presentation layer design How Cloud Foundry helps @crichardson
  • 72. Original architecture WAR StoreFrontUI Accounting Service MySQL Browser Apache Database InventoryService Shipping Tomcat @crichardson
  • 73. Modern architecture p, lo Native Mobile HTML5 mobile Desktop Browser application application ve StoreUI StoreUI StoreUI st de NodeJS ? Asynchronous, Javascript is scalable communication StoreUI te e th w RabbitMQ oy do Spring/Scala pl Standalone web application Inventory Shipping “headless” ow Service Service de Spring/Java applications H d MySQL an Billing Service Customer Redis Inventory Mongo Order Database Database Database @crichardson
  • 75. Developing modular apps is more difficult Many more moving parts to manage Platform services: SQL, NoSQL, RabbitMQ Application services: your code Who is going to setup the environments: the developer sandbox? ... But Cloud Foundry helps... @crichardson
  • 76. Easy polyglot application deployment and service provisioning OSS community Ap p lica 'o vFabric Postgres Private   n  S Clouds   Data Services erv vFabric Public i ce Msg RabbitMQTM Clouds Services  In Micro ter Other Services Clouds fac Additional partners e services … @crichardson
  • 77. Creating a platform service instance $ vmc create-service mysql mysql1 Creating Service: OK $ vmc services ...... =========== Provisioned Services ============ +-------------+---------+ | Name | Service | +-------------+---------+ | mysql1 | mysql | +-------------+---------+ @crichardson
  • 78. Multi-application manifest - part 1 --- applications: inventory/target: Path to application name: inventory url: cer-inventory.chrisr.cloudfoundry.me framework: name: spring info: mem: 512M description: Java SpringSource Spring Application exec: mem: 512M instances: 1 services: Required platform services si-rabbit: type: :rabbitmq si-mongo: type: :mongodb si-redis: type: :redis @crichardson
  • 79. Multi-application manifest - part 2 store/target: Path to application name: store url: cer-store.chrisr.cloudfoundry.me framework: name: spring info: mem: 512M description: Java SpringSource Spring Application exec: mem: 512M instances: 1 Required platform services services: si-mongo: type: :mongodb si-rabbit: type: :rabbitmq @crichardson
  • 80. One command to create platform services and deploy application $ vmc push Would you like to deploy from the current directory? [Yn]: Pushing application 'inventory'... Creating Application: OK Creating Service [si-rabbit]: OK Binding Service [si-rabbit]: OK Creating Service [si-mongo]: OK vmc push: Binding Service [si-mongo]: OK •Reads the manifest file •Creates the required platform services Creating Service [si-redis]: OK Binding Service [si-redis]: OK Uploading Application: Checking for available resources: OK •Deploys all the applications Processing resources: OK Packing application: OK Uploading (12K): OK Push Status: OK Staging Application 'inventory': OK Starting Application 'inventory': OK Pushing application 'store'... @crichardson
  • 81. Micro Cloud Foundry: new developer sandbox App Instances Services Open source Platform as a Service project 10.04 A PaaS packaged as a VMware Virtual Machine Use as a developer sandbox • Use the services from Junit integration tests • Deploy your application for functional testing • Remote debugging from STS @crichardson
  • 82. Using Caldecott to tunnel into your services @crichardson
  • 83. Caldecott = TCP over HTTP native protocol native HTTP Service Caldecott Caldecott protocol Service client Port gem application NNN Your computer Cloud Foundry @crichardson
  • 84. Using Caldecott… $ vmc tunnel 1: mysql-135e0 2: mysql1 Which service to tunnel to?: 2 Password: ******** Stopping Application: OK Redeploying tunnel application 'caldecott'. Uploading Application: Checking for available resources: OK Packing application: OK Uploading (1K): OK Push Status: OK Binding Service [mysql1]: OK Staging Application: OK Starting Application: OK Getting tunnel connection info: OK Service connection info: username : uMe6Apgw00AhS password : pKcD76PcZR7GZ name : d7cb8afb52f084f3d9bdc269e7d99ab50 Starting tunnel to mysql1 on port 10000. 1: none 2: mysql Which client would you like to start?: 2 @crichardson
  • 85. …Using Caldecott Launching 'mysql --protocol=TCP --host=localhost --port=10000 -- user=uMe6Apgw00AhS --password=pKcD76PcZR7GZ d7cb8afb52f084f3d9bdc269e7d99ab50' Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 10944342 Server version: 5.1.54-rel12.5 Percona Server with XtraDB (GPL), Release 12.5, Revision 188 Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> @crichardson
  • 86. Running JUnit test with Caldecott Configure your test code to use port + connection info @crichardson
  • 87. Summary @crichardson
  • 88. Monolithic applications are simple to develop and deploy BUT have significant drawbacks @crichardson
  • 89. Apply the scale cube Modular, polyglot, and scalable applications Services developed, deployed and scaled independently @crichardson
  • 90. Cloud Foundry helps .js Ap p e lica Private   fac Data Services 'o ter Clouds   n  S r  In erv ide Public i ov ce Msg Services  In  Pr Clouds ter ud Cl o fac Micro e Other Services Clouds @crichardson
  • 91. @crichardson chris.richardson@springsource.com http://plainoldobjects.com Questions? www.cloudfoundry.com @crichardson