SlideShare a Scribd company logo
1 of 76
Download to read offline
Developing polyglot applications
      on Cloud Foundry
Chris Richardson


Author of POJOs in Action
Founder of the original CloudFoundry.com
  @crichardson
crichardson@vmware.com
http://plainoldobjects.com/
Presentation goal

  Modular, polyglot applications:
      what, why and how?


  How Cloud Foundry simplifies
their development and deployment
About Chris
(About Chris)
About Chris()
About Chris
About Chris




http://www.theregister.co.uk/2009/08/19/
       springsource_cloud_foundry/
vmc push About-Chris

   Developer Advocate for
     CloudFoundry.com



Signup at http://cloudfoundry.com
Agenda


• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

• Deploying   modular, polyglot applications
Let’s imagine you are building an
     e-commerce application
Traditional web application
                  architecture
                             WAR



                                    StoreFrontUI


                                     Accounting
                                      Service

                                                      MySQL
Browser        Apache                                 Database
                                   InventoryService




Simple to                              Shipping
                                       Service


     develop
     test               Tomcat
     deploy
     scale
But there are problems
Users expect a rich, dynamic and
     interactive experience
                                                                   h
                                                                oug
                                                          d   en
                         HTTP Request
                                                        oo
                                                    ’t g
   Browser
                                             e   isn       Java Web Application
                         HTML/Javascript
                                      ec tur
                                    it
                               ar ch
                        e UI
                 s   tyl
             Old


             Real-time web ≅ NodeJS
Limitations of relational
                    databases

• Scalability

• Distribution

• Schema   updates

• O/R   impedance mismatch

• Handling   semi-structured data
Monolithic architecture
          =
      Problems
Intimidates developers
Obstacle to frequent
                    deployments
•   Need to redeploy everything to change one component

•   Increases risk of failure, e.g. interrupts background jobs



                                 Fear of change



•   Extensive test cycle
•   Updates will happen less often, e.g. Makes A/B testing UI really difficult
Overloads your IDE and container




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




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

• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

  • Decomposing     applications into services

  • Using   NoSQL

  • Presentation   layer design

• Deploying   modular, polyglot applications
The scale cube


Y axis -
functional
decomposition




                                                           ila g
                                                       sim nin
Scale by




                                                              r
                                                ing ing tio
splitting




                                              th litt r ti
                                                 sp pa
different things



                                              by data

                                                   s
                                           ale -
                                         Sc is
                                             ax
                                           Z

                   X axis - horizontal
                      duplication
Y-axis scaling - application level
          WAR



                 StoreFrontUI


                  Accounting
                   Service


                InventoryService



                    Shipping
                    Service
Y-axis scaling - application level
                                                       accounting application

                                                                     Accounting
                                                                      Service




Store front web application                              inventory application



             StoreFrontUI                                        InventoryService




                                                       shipping application


                                                                      Shipping
                                                                      Service




  Apply X axis cloning and/or Z axis partitioning to each service
Drawbacks of Y-axis splits


• Complexity

• Partitioned   databases and transaction management

• Deciding   when to use this approach
But there are many benefits

• Scales
       development: develop, deploy and scale each service
 independently

• Less   for each developer to learn

• Doesn’t   overload IDE or container

• Improves   fault isolation

• Eliminates   long-term commitment to a single technology stack
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 can use a different technology stack
Pick the best tool for the job
Rapidly evolving - regularly rewrite
Modular, polyglot,
  applications
Inter-service communication
                options
• Transports: Synchronous   HTTP      asynchronous AMQP

• Formats: JSON, XML, Protocol   Buffers, Thrift, ...

   Asynchronous is preferred but REST
                is fine
 JSON is fashionable but binary format
            is more efficient
Asynchronous message-based communication
                                        accounting application

                                            Accounting
                                             Service




storefront web application               inventory application

                             RabbitMQ
     StoreFrontUI            (Message    InventoryService
                                                                 MySQL
                              Broker)




                                         shipping application



                                         ShippingService
Agenda

• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

  • Decomposing     applications into services

  • Using   NoSQL

  • Presentation   layer design

• Deploying   modular, polyglot applications
Solution: Use NoSQL

 Benefits                  Drawbacks

• Higher   performance   • Limited   transactions

• Higher   scalability   • Limited   querying

• Richer   data-model    • Relaxed   consistency

• Schema-less            • Unconstrained    data
Example NoSQL Databases
Database                       Key features

Cassandra   Extensible column store, very scalable, distributed

 Neo4j                       Graph database
                    Document-oriented, fast, scalable
MongoDB

  Redis                 Key-value store, very fast

      http://nosql-database.org/ lists 122+ NoSQL
                        databases
NoSQL and the scale cube




                                    nin a ing
                                itio dr rd
                             r t an ha
                           pa ss s
                               Ca DB


                                       g
                                   go
                                on
                             M
   MongoDB replica sets
   Cassandra replication
The future is polyglot




 IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg
Polyglot persistence architecture
                                            accounting application

                                                Accounting
                                                 Service             MySQL




storefront web application                   inventory application

                               RabbitMQ
     StoreFrontUI              (Message      InventoryService        Redis
                                Broker)




                                             shipping application



                                             ShippingService         Mongo
Agenda

• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

  • Decomposing     applications into services

  • Using   NoSQL

  • Presentation   layer design

• Deploying   modular, polyglot applications
Modular application




Choice of presentation layer
        technology
NodeJS is the fashionable
      technology
Why NodeJS?
• Familiar   JavaScript

• High-performance, scalable   event-driven, non-blocking I/O
 model

• Over   13,000 17,000 modules developed by the community

• ManyJavaScript client frameworks have a NodeJS
 counterpart, e.g. socket.io and SockJS
Why not NodeJS?




           a.k.a. callback hell
A modern web application

              REST       Node JS     Service 1
Browser


                                     Service 2
              Events
 HTML 5                  Server
Application            Application
Socket.io              Socket.io
  client                server          ...
NodeJS as a mediator

REST                 REST
                             Service




          Node JS


Events               AMQP              AMQP
         socket.io          RabbitMQ          Service
Socket.io - server-side
var express = require('express')
  , http = require('http')
  , amqp = require(‘amqp’)
  ....;

server.listen(8081);                                       Handle socket.io
...                                                          connection
var amqpCon = amqp.createConnection(...);

io.sockets.on('connection', function (socket) {
                                                                   Republish as
  function amqpMessageHandler(message, headers, deliveryInfo) {   socket.io event
      var m = JSON.parse(message.data.toString());
      socket.emit(‘tick’, m);
   };
   amqpCon.queue(“myQueue”, {},
       function(queue) {                                       Subscribe to AMQP
         queue.bind(“myExchange”, “myBindingKey”);
         queue.subscribe(amqpMessageHandler);
                                                                     queue
   });
});
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>

</body>                            Bind to model        Connect to
</html>
                                                      socket.io server
              clock.js
var socket = io.connect(location.hostname);

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




                                                            p,
                                              Native Mobile application          HTML5 mobile application




                                                         lo
                  Desktop Browser

                   StoreUI                           StoreUI                     StoreUI




                                                      ve
                                                   de
Asynchronous,                                         NodeJS




                                                    ?
                                                        NodeJS                                   Javascript
   scalable




                                                  is
                                                      StoreUI
communication




                                               th
                                            te e
                                              w     RabbitMQ




                                              st
                                            oy
                           do
 Spring/Scala                                                                                                 Standalone
web application                     Inventory
                                      Inventory                           Shipping Service                     “headless”

                                          pl
                                     Service                                   Shipping
                                       Service                                                                Spring/Java
      ow


                                                                                                              applications
                                       de
                  Billing Service          Redis Inventory                 Mongo Order
     H




                                             Database                       Database
                                     d
                                an



                     MySQL
                    Customer
                    Database
Agenda

• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

• Deploying   modular, polyglot applications

  • Overview    of Cloud Foundry

  • Using   Cloud Foundry

  • Consuming     Cloud Foundry services
The Open
           Platform as a Service

   Deploy and scale polyglot
applications in seconds, without
  locking yourself into a single
              cloud             ible,
                                     pen , Flex
                          Sim ple, O lable
                                   Sca
OSS community




 vFabric
Postgres                            Ap
                                                                       Private	
  
                                                                       Clouds	
  
                                       p
           Data Services
                                      lica
                                         'o
                                           n	
  S


        vFabric
                                                                   Public
                                             erv


      RabbitMQTM
                                                ice



                     Msg Services
                                                                   Clouds
                                                   	
  In
                                                     ter
                                                        fac




                                                               Micro
                                                           e




                                    Other Services
                                                               Clouds
           Additional partners services …
CloudFoundry.COM - Multi-
tenant PaaS operated by VMware
                     CloudFoundry.COM (beta)
   Services
  Runtimes & Frameworks




                          vCenter / vSphere

  Infrastructure
Micro Cloud             –                                 FoundryTM

Industry first downloadable PaaS


      App Instances                               Services




      Open source Platform as a Service project




      A cloud packaged as a VMware Virtual Machine
CloudFoundry.ORG - Vibrant Apache
   2 licensed open-source project
                   CloudFoundry.ORG




                    Your Infrastructure

    Download      Setup                          Deploy Behind
     Code      Environment                BOSH     Firewall
Cloud Foundry: you can trade-off
 Less
        effort vs flexibility Less
         Public PaaS

                                                                ....
                                 .COM


         Private PaaS
Effort                                              ....                  Flexibility


         Custom Private PaaS

                       git clone git://github.com/cloudfoundry/vcap.git

 More                                                                      More
Agenda

• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

• Deploying   modular, polyglot applications

  • Overview    of Cloud Foundry

  • Using   Cloud Foundry

  • Consuming     Cloud Foundry services
Using Cloud Foundry
Example vmc commands
$ vmc target <any cloud>

$ vmc login <credentials>

$ vmc push <my-app>


   > bind services? Yes

$ vmc update <my-app>

$ vmc instances <my-app> +100
Sinatra + Redis
require 'sinatra'
require 'redis'           Connect to Redis

configure do
	 $r = Redis.new(:host => '127.0.0.1', :port => '6379') if !$r
end

get '/' do
 "Hello World! " + $r.incr("hitcounter").to_s
end
                                                Increment hit
                                                   counter

http://sgce2012.cloudfoundry.com/
One step deployment
---
applications:
  ./storefront:                   Path to application
    name: nodestore
    framework:
     name: node
     info:
      mem: 64M
      description: Node.js Application
      exec:
    url: ${name}.${target-base}
    mem: 64M
    instances: 1
    services:
     si-redis:
                             Required platform services
      type: redis
     si-rabbit:
      type: rabbitmq
One step deployment
applications:
 standalone-inventory/target/appassembler:                     Path to application
  name: standalone-shipping
  framework:
   name: standalone
   info:
    description: Standalone Application
    exec:
  runtime: java
  command: bin/standalone-shipping
  url:
  mem: 512M
  instances: 1
  services:                       Required platform services
   si-rabbit:
    type: rabbitmq
   si-mongo:
    type: mongodb
One step deployment
$ 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

Binding Service [si-mongo]: OK
                                              vmc push:
Creating Service [si-redis]: OK               •Reads the manifest file
Binding Service [si-redis]: OK                •Creates the required platform services
Uploading Application:
                                              •Deploys all the applications
 Checking for available resources: OK

 Processing resources: OK

 Packing application: OK

 Uploading (12K): OK

Push Status: OK

Staging Application 'inventory': OK

Starting Application 'inventory': OK

Pushing application 'store'...
Micro Cloud Foundry =
             your 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
Agenda

• The   (sometimes evil) monolith

• Refactoring   to a modular, polyglot architecture

• Deploying   modular, polyglot applications

  • Overview    of Cloud Foundry

  • Using   Cloud Foundry

  • Consuming     Cloud Foundry services
Cloud Foundry services
Creating a service instance
$ vmc create-service mysql mysql1
Creating Service: OK

$ vmc services
......

=========== Provisioned Services ============
+-------------+---------+
| Name        | Service |
+-------------+---------+
| mysql1      | mysql   |
+-------------+---------+

$
Binding a service to an
            application
   $ vmc push cer-spring --path web/target/
   Application Deployed URL [cer-spring.cloudfoundry.com]:
   Detected a Java SpringSource Spring Application, is this correct? [Yn]:
   Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
   Creating Application: OK
Would you like to bind any services to 'cer-spring'? [yN]: y [yN]: y
    Would you like
                   to bind any services to 'cer-spring'?
Would you like to use anan existing provisioned service? [yN]: y
    Would you like
                   to use existing provisioned service? [yN]: y
The The following provisioned servicesavailable
     following provisioned services are are available
1: mysql1
    1: mysql1
2: mysql-135e0
    2: mysql-135e0
Please select one you wish to use:use: 1
    Please select one you wish to 1
Binding Service [mysql1]: OK OK
    Binding Service [mysql1]:
   Uploading Application:
     Checking for available resources: OK
     Processing resources: OK
     Packing application: OK
     Uploading (12K): OK
Bindings exposed through
VCAP_SERVICES environment variable
    {    "mysql-5.1": [{
             "name": "mysql1",
             "label": "mysql-5.1",
             "plan": "free",
             "tags": ["mysql", "mysql-5.1", "relational"],
             "credentials": {
                 "name": "da81b57c25cca4c65929a223f0ed068a0",
                 "host": "172.99.99.99",
                 "port": 3306,
                 "username": "secretusername",
                 "password": "secretuserpassword"
                 ....
             }
        }]
    }
Accessing bound services:
                   low-level
var services = JSON.parse(process.env.VCAP_SERVICES);
var creds = services['mysql-5.1'][0].credentials




configure do
    services = JSON.parse(ENV['VCAP_SERVICES'])
    mysql_key = services.keys.select { |svc| svc =~ /mysql/i }.first
    mysql = services[mysql_key].first['credentials']
    mysql_conf = {:host => mysql['hostname'], :port => mysql['port'],
        :username => mysql['user'], :password => mysql['password']}
    @@client = Mysql2::Client.new mysql_conf
end
Accessing bound services:
         high-level, Spring/Java
CloudEnvironment environment = new CloudEnvironment();
RdbmsServiceInfo mysqlSvc =
    environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class);
RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator();
DataSource dataSource = dataSourceCreator.createService(mysqlSvc);

         <cloud:data-source id="dataSource" service-name="mysql1">
           <cloud:pool pool-size="1-5"/>
           <cloud:connection properties="charset=utf-8"/>
         </cloud:data-source>
         ...

                                reconfigured automatically
              <bean id="dataSource" class="…">
                  … DataSource for MySQL instance …
              </bean>
Accessing bound services:
            high-level, Ruby
                     reconfigured automatically
RedisHost = "127.0.0.1"
RedisPort = 10000
$r = Redis.new(:host => RedisHost, :port => RedisPort) if !$r



                      rewritten automatically
        production:
          adapter: sqlite3
          database: db/production.sqlite3
          pool: 5
          timeout: 5000
The human body as a system
50 to 70 billion of your cells die
            each day
Yet you (the system) remain you
Can we build software systems
  with these characteristics?
                 http://dreamsongs.com/Files/
             DesignBeyondHumanAbilitiesSimp.pdf


               http://dreamsongs.com/Files/
                   WhitherSoftware.pdf
@crichardson crichardson@vmware.com
http://plainoldobjects.com/presentations/




         Questions?
www.cloudfoundry.com @cloudfoundry

More Related Content

What's hot

Polyglot Persistence - Two Great Tastes That Taste Great Together
Polyglot Persistence - Two Great Tastes That Taste Great TogetherPolyglot Persistence - Two Great Tastes That Taste Great Together
Polyglot Persistence - Two Great Tastes That Taste Great TogetherJohn Wood
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Javasunnygleason
 
Postgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can EatPostgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can EatEDB
 
Conference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQLConference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQLSeveralnines
 
NOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the CloudNOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the Cloudboorad
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010Mark Atwood
 
How did you know this ad would be relevant for me?
How did you know this ad would be relevant for me?How did you know this ad would be relevant for me?
How did you know this ad would be relevant for me?DataWorks Summit
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB  present...MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB  present...
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...MongoDB
 
My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12Mat Keep
 
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...slashn
 
2011 05-12 nosql-progressive.net
2011 05-12 nosql-progressive.net2011 05-12 nosql-progressive.net
2011 05-12 nosql-progressive.netMårten Gustafson
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your StartupAmazon Web Services
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMat Keep
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Malin Weiss
 
Webinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDBWebinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDBMongoDB
 
Linkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slidesLinkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slidesruslansv
 
Meandre 2.0 Alpha Preview
Meandre 2.0 Alpha PreviewMeandre 2.0 Alpha Preview
Meandre 2.0 Alpha PreviewXavier Llorà
 

What's hot (20)

Polyglot Persistence - Two Great Tastes That Taste Great Together
Polyglot Persistence - Two Great Tastes That Taste Great TogetherPolyglot Persistence - Two Great Tastes That Taste Great Together
Polyglot Persistence - Two Great Tastes That Taste Great Together
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Java
 
Postgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can EatPostgres: The NoSQL Cake You Can Eat
Postgres: The NoSQL Cake You Can Eat
 
Conference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQLConference tutorial: MySQL Cluster as NoSQL
Conference tutorial: MySQL Cluster as NoSQL
 
NOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the CloudNOSQL, CouchDB, and the Cloud
NOSQL, CouchDB, and the Cloud
 
Memcached, presented to LCA2010
Memcached, presented to LCA2010Memcached, presented to LCA2010
Memcached, presented to LCA2010
 
How did you know this ad would be relevant for me?
How did you know this ad would be relevant for me?How did you know this ad would be relevant for me?
How did you know this ad would be relevant for me?
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB  present...MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB  present...
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
 
My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12My sql 5.6_replwebinar_may12
My sql 5.6_replwebinar_may12
 
On being RESTful
On being RESTfulOn being RESTful
On being RESTful
 
MySQL高可用
MySQL高可用MySQL高可用
MySQL高可用
 
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
Slash n: Tech Talk Track 2 – Distributed Transactions in SOA - Yogi Kulkarni,...
 
2011 05-12 nosql-progressive.net
2011 05-12 nosql-progressive.net2011 05-12 nosql-progressive.net
2011 05-12 nosql-progressive.net
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
 
MySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached APIMySQL Cluster NoSQL Memcached API
MySQL Cluster NoSQL Memcached API
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
Webinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDBWebinar: Migrating from RDBMS to MongoDB
Webinar: Migrating from RDBMS to MongoDB
 
Linkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slidesLinkedin NUS QCon 2009 slides
Linkedin NUS QCon 2009 slides
 
Meandre 2.0 Alpha Preview
Meandre 2.0 Alpha PreviewMeandre 2.0 Alpha Preview
Meandre 2.0 Alpha Preview
 

Viewers also liked

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 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
 
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
 
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
 
Decomposing applications for scalability and deployability (devnexus 2013)
Decomposing applications for scalability and deployability (devnexus 2013)Decomposing applications for scalability and deployability (devnexus 2013)
Decomposing applications for scalability and deployability (devnexus 2013)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 (gluecon 2013)
Developing polyglot persistence applications (gluecon 2013)Developing polyglot persistence applications (gluecon 2013)
Developing polyglot persistence applications (gluecon 2013)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
 
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
 
C* Summit 2013: Remember Me! Session Clustering with Cassandra by Les Hazlewood
C* Summit 2013: Remember Me! Session Clustering with Cassandra by Les HazlewoodC* Summit 2013: Remember Me! Session Clustering with Cassandra by Les Hazlewood
C* Summit 2013: Remember Me! Session Clustering with Cassandra by Les HazlewoodDataStax Academy
 
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
 
#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
 
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
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudEberhard Wolff
 
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...Chris Richardson
 

Viewers also liked (17)

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 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)
 
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
 
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...
 
Decomposing applications for scalability and deployability (devnexus 2013)
Decomposing applications for scalability and deployability (devnexus 2013)Decomposing applications for scalability and deployability (devnexus 2013)
Decomposing applications for scalability and deployability (devnexus 2013)
 
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 (gluecon 2013)
Developing polyglot persistence applications (gluecon 2013)Developing polyglot persistence applications (gluecon 2013)
Developing polyglot persistence applications (gluecon 2013)
 
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)
 
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...
 
C* Summit 2013: Remember Me! Session Clustering with Cassandra by Les Hazlewood
C* Summit 2013: Remember Me! Session Clustering with Cassandra by Les HazlewoodC* Summit 2013: Remember Me! Session Clustering with Cassandra by Les Hazlewood
C* Summit 2013: Remember Me! Session Clustering with Cassandra by Les Hazlewood
 
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,...
 
#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
 
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
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
 
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
 

Similar to Developing polyglot applications on Cloud Foundry (#oredev 2012)

Decomposing applications for deployability and scalability (cfopentour india)
Decomposing applications for deployability and scalability (cfopentour india)Decomposing applications for deployability and scalability (cfopentour india)
Decomposing applications for deployability and scalability (cfopentour india)Chris 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
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture PatternsAmazon Web Services
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA
 
Resource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor NetworkResource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor NetworkThomas Pham
 
Microservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applicationsMicroservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applicationsStijn Van Den Enden
 
Service Oriented Architecture (SOA) [1/5] : Introduction to SOA
Service Oriented Architecture (SOA) [1/5] : Introduction to SOAService Oriented Architecture (SOA) [1/5] : Introduction to SOA
Service Oriented Architecture (SOA) [1/5] : Introduction to SOAIMC Institute
 
Innovations in Grid Computing with Oracle Coherence
Innovations in Grid Computing with Oracle CoherenceInnovations in Grid Computing with Oracle Coherence
Innovations in Grid Computing with Oracle CoherenceBob Rhubart
 
Private Clouds - Business Agility Seminar
Private Clouds - Business Agility SeminarPrivate Clouds - Business Agility Seminar
Private Clouds - Business Agility SeminarExponential_e
 
The Hybrid Windows Azure Application
The Hybrid Windows Azure ApplicationThe Hybrid Windows Azure Application
The Hybrid Windows Azure ApplicationMichael Collier
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo | MADP & MBaaS
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolithMarkus Eisele
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolithMarkus Eisele
 
Linking Services and Linked Data: Keynote for AIMSA 2012
Linking Services and Linked Data: Keynote for AIMSA 2012Linking Services and Linked Data: Keynote for AIMSA 2012
Linking Services and Linked Data: Keynote for AIMSA 2012John Domingue
 
First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...Real-Time Innovations (RTI)
 

Similar to Developing polyglot applications on Cloud Foundry (#oredev 2012) (20)

Decomposing applications for deployability and scalability (cfopentour india)
Decomposing applications for deployability and scalability (cfopentour india)Decomposing applications for deployability and scalability (cfopentour india)
Decomposing applications for deployability and scalability (cfopentour india)
 
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
 
Spring Into the Cloud
Spring Into the CloudSpring Into the Cloud
Spring Into the Cloud
 
Designing microservices
Designing microservicesDesigning microservices
Designing microservices
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case Study
 
Resource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor NetworkResource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor Network
 
Microservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applicationsMicroservices - Hitchhiker's guide to cloud native applications
Microservices - Hitchhiker's guide to cloud native applications
 
Service Oriented Architecture (SOA) [1/5] : Introduction to SOA
Service Oriented Architecture (SOA) [1/5] : Introduction to SOAService Oriented Architecture (SOA) [1/5] : Introduction to SOA
Service Oriented Architecture (SOA) [1/5] : Introduction to SOA
 
Innovations in Grid Computing with Oracle Coherence
Innovations in Grid Computing with Oracle CoherenceInnovations in Grid Computing with Oracle Coherence
Innovations in Grid Computing with Oracle Coherence
 
2018 jk
2018 jk2018 jk
2018 jk
 
Private Clouds - Business Agility Seminar
Private Clouds - Business Agility SeminarPrivate Clouds - Business Agility Seminar
Private Clouds - Business Agility Seminar
 
The Hybrid Windows Azure Application
The Hybrid Windows Azure ApplicationThe Hybrid Windows Azure Application
The Hybrid Windows Azure Application
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for Enterprises
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Linking Services and Linked Data: Keynote for AIMSA 2012
Linking Services and Linked Data: Keynote for AIMSA 2012Linking Services and Linked Data: Keynote for AIMSA 2012
Linking Services and Linked Data: Keynote for AIMSA 2012
 
First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...
 

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

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

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Developing polyglot applications on Cloud Foundry (#oredev 2012)

  • 1. Developing polyglot applications on Cloud Foundry Chris Richardson Author of POJOs in Action Founder of the original CloudFoundry.com @crichardson crichardson@vmware.com http://plainoldobjects.com/
  • 2. Presentation goal Modular, polyglot applications: what, why and how? How Cloud Foundry simplifies their development and deployment
  • 8. vmc push About-Chris Developer Advocate for CloudFoundry.com Signup at http://cloudfoundry.com
  • 9. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Deploying modular, polyglot applications
  • 10. Let’s imagine you are building an e-commerce application
  • 11. Traditional web application architecture WAR StoreFrontUI Accounting Service MySQL Browser Apache Database InventoryService Simple to Shipping Service develop test Tomcat deploy scale
  • 12. But there are problems
  • 13. Users expect a rich, dynamic and interactive experience h oug d en HTTP Request oo ’t g Browser e isn Java Web Application HTML/Javascript ec tur it ar ch e UI s tyl Old Real-time web ≅ NodeJS
  • 14. Limitations of relational databases • Scalability • Distribution • Schema updates • O/R impedance mismatch • Handling semi-structured data
  • 17. Obstacle to frequent deployments • Need to redeploy everything to change one component • Increases risk of failure, e.g. interrupts background jobs Fear of change • Extensive test cycle • Updates will happen less often, e.g. Makes A/B testing UI really difficult
  • 18. Overloads your IDE and container Slows down development
  • 19. Obstacle to scaling development But the I want to update backend is not the UI working yet! Lots of coordination and communication required
  • 20. Requires long-term commitment to a technology stack
  • 21. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Decomposing applications into services • Using NoSQL • Presentation layer design • Deploying modular, polyglot applications
  • 22.
  • 23. The scale cube Y axis - functional decomposition ila g sim nin Scale by r ing ing tio splitting th litt r ti sp pa different things by data s ale - Sc is ax Z X axis - horizontal duplication
  • 24. Y-axis scaling - application level WAR StoreFrontUI Accounting Service InventoryService Shipping Service
  • 25. Y-axis scaling - application level accounting application Accounting Service Store front web application inventory application StoreFrontUI InventoryService shipping application Shipping Service Apply X axis cloning and/or Z axis partitioning to each service
  • 26. Drawbacks of Y-axis splits • Complexity • Partitioned databases and transaction management • Deciding when to use this approach
  • 27. But there are many benefits • Scales development: develop, deploy and scale each service independently • Less for each developer to learn • Doesn’t overload IDE or container • Improves fault isolation • Eliminates long-term commitment to a single technology stack
  • 28. 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 can use a different technology stack Pick the best tool for the job Rapidly evolving - regularly rewrite
  • 29. Modular, polyglot, applications
  • 30. Inter-service communication options • Transports: Synchronous HTTP asynchronous AMQP • Formats: JSON, XML, Protocol Buffers, Thrift, ... Asynchronous is preferred but REST is fine JSON is fashionable but binary format is more efficient
  • 31. Asynchronous message-based communication accounting application Accounting Service storefront web application inventory application RabbitMQ StoreFrontUI (Message InventoryService MySQL Broker) shipping application ShippingService
  • 32. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Decomposing applications into services • Using NoSQL • Presentation layer design • Deploying modular, polyglot applications
  • 33. Solution: Use NoSQL Benefits Drawbacks • Higher performance • Limited transactions • Higher scalability • Limited querying • Richer data-model • Relaxed consistency • Schema-less • Unconstrained data
  • 34. Example NoSQL Databases Database Key features Cassandra Extensible column store, very scalable, distributed Neo4j Graph database Document-oriented, fast, scalable MongoDB Redis Key-value store, very fast http://nosql-database.org/ lists 122+ NoSQL databases
  • 35. NoSQL and the scale cube nin a ing itio dr rd r t an ha pa ss s Ca DB g go on M MongoDB replica sets Cassandra replication
  • 36. The future is polyglot IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg
  • 37. Polyglot persistence architecture accounting application Accounting Service MySQL storefront web application inventory application RabbitMQ StoreFrontUI (Message InventoryService Redis Broker) shipping application ShippingService Mongo
  • 38. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Decomposing applications into services • Using NoSQL • Presentation layer design • Deploying modular, polyglot applications
  • 39. Modular application Choice of presentation layer technology
  • 40. NodeJS is the fashionable technology
  • 41. Why NodeJS? • Familiar JavaScript • High-performance, scalable event-driven, non-blocking I/O model • Over 13,000 17,000 modules developed by the community • ManyJavaScript client frameworks have a NodeJS counterpart, e.g. socket.io and SockJS
  • 42. Why not NodeJS? a.k.a. callback hell
  • 43. A modern web application REST Node JS Service 1 Browser Service 2 Events HTML 5 Server Application Application Socket.io Socket.io client server ...
  • 44. NodeJS as a mediator REST REST Service Node JS Events AMQP AMQP socket.io RabbitMQ Service
  • 45. Socket.io - server-side var express = require('express') , http = require('http') , amqp = require(‘amqp’) ....; server.listen(8081); Handle socket.io ... connection var amqpCon = amqp.createConnection(...); io.sockets.on('connection', function (socket) { Republish as function amqpMessageHandler(message, headers, deliveryInfo) { socket.io event var m = JSON.parse(message.data.toString()); socket.emit(‘tick’, m); }; amqpCon.queue(“myQueue”, {}, function(queue) { Subscribe to AMQP queue.bind(“myExchange”, “myBindingKey”); queue.subscribe(amqpMessageHandler); queue }); });
  • 46. 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> </body> Bind to model Connect to </html> socket.io server clock.js var socket = io.connect(location.hostname); function ClockModel() { self.ticker = ko.observable(1); Subscribe to tick socket.on('tick', function (data) { event self.ticker(data); }); }; Update model ko.applyBindings(new ClockModel());
  • 47. Modular, polyglot architecture p, Native Mobile application HTML5 mobile application lo Desktop Browser StoreUI StoreUI StoreUI ve de Asynchronous, NodeJS ? NodeJS Javascript scalable is StoreUI communication th te e w RabbitMQ st oy do Spring/Scala Standalone web application Inventory Inventory Shipping Service “headless” pl Service Shipping Service Spring/Java ow applications de Billing Service Redis Inventory Mongo Order H Database Database d an MySQL Customer Database
  • 48. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Deploying modular, polyglot applications • Overview of Cloud Foundry • Using Cloud Foundry • Consuming Cloud Foundry services
  • 49. The Open Platform as a Service Deploy and scale polyglot applications in seconds, without locking yourself into a single cloud ible, pen , Flex Sim ple, O lable Sca
  • 50. OSS community vFabric Postgres Ap Private   Clouds   p Data Services lica 'o n  S vFabric Public erv RabbitMQTM ice Msg Services Clouds  In ter fac Micro e Other Services Clouds Additional partners services …
  • 51. CloudFoundry.COM - Multi- tenant PaaS operated by VMware CloudFoundry.COM (beta) Services Runtimes & Frameworks vCenter / vSphere Infrastructure
  • 52. Micro Cloud – FoundryTM Industry first downloadable PaaS App Instances Services Open source Platform as a Service project A cloud packaged as a VMware Virtual Machine
  • 53. CloudFoundry.ORG - Vibrant Apache 2 licensed open-source project CloudFoundry.ORG Your Infrastructure Download Setup Deploy Behind Code Environment BOSH Firewall
  • 54. Cloud Foundry: you can trade-off Less effort vs flexibility Less Public PaaS .... .COM Private PaaS Effort .... Flexibility Custom Private PaaS git clone git://github.com/cloudfoundry/vcap.git More More
  • 55. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Deploying modular, polyglot applications • Overview of Cloud Foundry • Using Cloud Foundry • Consuming Cloud Foundry services
  • 57. Example vmc commands $ vmc target <any cloud> $ vmc login <credentials> $ vmc push <my-app> > bind services? Yes $ vmc update <my-app> $ vmc instances <my-app> +100
  • 58. Sinatra + Redis require 'sinatra' require 'redis' Connect to Redis configure do $r = Redis.new(:host => '127.0.0.1', :port => '6379') if !$r end get '/' do "Hello World! " + $r.incr("hitcounter").to_s end Increment hit counter http://sgce2012.cloudfoundry.com/
  • 59.
  • 60. One step deployment --- applications: ./storefront: Path to application name: nodestore framework: name: node info: mem: 64M description: Node.js Application exec: url: ${name}.${target-base} mem: 64M instances: 1 services: si-redis: Required platform services type: redis si-rabbit: type: rabbitmq
  • 61. One step deployment applications: standalone-inventory/target/appassembler: Path to application name: standalone-shipping framework: name: standalone info: description: Standalone Application exec: runtime: java command: bin/standalone-shipping url: mem: 512M instances: 1 services: Required platform services si-rabbit: type: rabbitmq si-mongo: type: mongodb
  • 62. One step deployment $ 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 Binding Service [si-mongo]: OK vmc push: Creating Service [si-redis]: OK •Reads the manifest file Binding Service [si-redis]: OK •Creates the required platform services Uploading Application: •Deploys all the applications Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (12K): OK Push Status: OK Staging Application 'inventory': OK Starting Application 'inventory': OK Pushing application 'store'...
  • 63. Micro Cloud Foundry = your 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
  • 64. Agenda • The (sometimes evil) monolith • Refactoring to a modular, polyglot architecture • Deploying modular, polyglot applications • Overview of Cloud Foundry • Using Cloud Foundry • Consuming Cloud Foundry services
  • 66. Creating a service instance $ vmc create-service mysql mysql1 Creating Service: OK $ vmc services ...... =========== Provisioned Services ============ +-------------+---------+ | Name | Service | +-------------+---------+ | mysql1 | mysql | +-------------+---------+ $
  • 67. Binding a service to an application $ vmc push cer-spring --path web/target/ Application Deployed URL [cer-spring.cloudfoundry.com]: Detected a Java SpringSource Spring Application, is this correct? [Yn]: Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: Creating Application: OK Would you like to bind any services to 'cer-spring'? [yN]: y [yN]: y Would you like to bind any services to 'cer-spring'? Would you like to use anan existing provisioned service? [yN]: y Would you like to use existing provisioned service? [yN]: y The The following provisioned servicesavailable following provisioned services are are available 1: mysql1 1: mysql1 2: mysql-135e0 2: mysql-135e0 Please select one you wish to use:use: 1 Please select one you wish to 1 Binding Service [mysql1]: OK OK Binding Service [mysql1]: Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (12K): OK
  • 68. Bindings exposed through VCAP_SERVICES environment variable { "mysql-5.1": [{ "name": "mysql1", "label": "mysql-5.1", "plan": "free", "tags": ["mysql", "mysql-5.1", "relational"], "credentials": { "name": "da81b57c25cca4c65929a223f0ed068a0", "host": "172.99.99.99", "port": 3306, "username": "secretusername", "password": "secretuserpassword" .... } }] }
  • 69. Accessing bound services: low-level var services = JSON.parse(process.env.VCAP_SERVICES); var creds = services['mysql-5.1'][0].credentials configure do services = JSON.parse(ENV['VCAP_SERVICES']) mysql_key = services.keys.select { |svc| svc =~ /mysql/i }.first mysql = services[mysql_key].first['credentials'] mysql_conf = {:host => mysql['hostname'], :port => mysql['port'], :username => mysql['user'], :password => mysql['password']} @@client = Mysql2::Client.new mysql_conf end
  • 70. Accessing bound services: high-level, Spring/Java CloudEnvironment environment = new CloudEnvironment(); RdbmsServiceInfo mysqlSvc = environment.getServiceInfo("mysqlService", RdbmsServiceInfo.class); RdbmsServiceCreator dataSourceCreator = new RdbmsServiceCreator(); DataSource dataSource = dataSourceCreator.createService(mysqlSvc); <cloud:data-source id="dataSource" service-name="mysql1"> <cloud:pool pool-size="1-5"/> <cloud:connection properties="charset=utf-8"/> </cloud:data-source> ... reconfigured automatically <bean id="dataSource" class="…"> … DataSource for MySQL instance … </bean>
  • 71. Accessing bound services: high-level, Ruby reconfigured automatically RedisHost = "127.0.0.1" RedisPort = 10000 $r = Redis.new(:host => RedisHost, :port => RedisPort) if !$r rewritten automatically production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000
  • 72. The human body as a system
  • 73. 50 to 70 billion of your cells die each day
  • 74. Yet you (the system) remain you
  • 75. Can we build software systems with these characteristics? http://dreamsongs.com/Files/ DesignBeyondHumanAbilitiesSimp.pdf http://dreamsongs.com/Files/ WhitherSoftware.pdf