SlideShare a Scribd company logo
Avoiding Java EE
Application Design Traps
 to achieve effective use of cloud computing
Alberto Lemos (Dr. Spock)      Danival Taffarel Calegari
   Senior Software Architect    MATERA Systems Architect
          SpockNET                Globalcode Instructor
Agenda

•   Motivation

•   Challenges when deploying
    Java EE on cloud computing

•   Some tips & tricks

•   Some evaluated Java PaaS

•   Java EE adapter for cloud
    services
Objective
“Provide the java developers and architects with
some ‘food for thoughts’ to help them to design
          a better Java EE application”
Agenda

•   Motivation

•   Challenges when deploying
    Java EE on cloud computing

•   Some tips & tricks

•   Some evaluated Java PaaS

•   Java EE adapter for cloud
    services
Motivation
•   How cloud computing can
    affect the architecture or the
    code of a Java EE application?

•   Some Java EE cloud key
    features are focused on to
    provide a PaaS model to the
    Application Servers

•   No new features to provide
    the programming model with
    cloud features
Agenda

•   Motivation

•   Challenges when deploying
    Java EE on cloud computing

•   Some tips & tricks

•   Some evaluated Java PaaS

•   Java EE adapter for cloud
    services
Java EE in the Cloud
Java EE in the Cloud


         Operational System
  Iaas
Java EE App Server

              JVM


       Operational System
Iaas
Java EE App Server

              JVM
Paas


       Operational System
Iaas
Java EE Application


       Java EE App Server

              JVM
Paas


       Operational System
Iaas
Java EE Services

Persistence
                          Java EE Application
Messaging
Transaction
                          Java EE App Server
  Security
 Resource                        JVM
   Cache           Paas


Component
                          Operational System
                   Iaas
Java EE Services
                                                Cloud Services
Persistence                                     Persistence
                          Java EE Application
Messaging                                       Messaging
Transaction                                     Monitoring
                          Java EE App Server
  Security                                       Security
 Resource                        JVM              NoSQL
   Cache           Paas
                                                  Storage
Component                                             ...
                          Operational System
                   Iaas
Java EE Services
                                                     Cloud Services
Persistence                                         Persistence
               JPA          Java EE Application
Messaging                                            Messaging
              JMS
Transaction                                         Monitoring
              JTA           Java EE App Server
  Security                                             Security
              JAAS
 Resource                          JVM                 NoSQL
              JNDI
   Cache             Paas
                                                       Storage
Component                                                  ...
               EJB          Operational System    non-std API

                     Iaas
Evaluated PaaS
Challenges

•   Elasticity

•   Deployment model

•   Support to Java EE full stack

•   Proprietary services

•   Resource handling
Load Balancer




Virtual Machine
Load Balancer




Virtual Machine
Load Balancer




Virtual Machine
Load Balancer




Virtual Machine
1000 users



                  Load Balancer




Virtual Machine        100 users per VM
500 users



                  Load Balancer




Virtual Machine          50 users per VM
100 users



                  Load Balancer




Virtual Machine          10 users per VM
100 users



                  Load Balancer




Virtual Machine        100 users in a VM
100 users



                  Load Balancer




Virtual Machine        100 users in a VM
Agenda

•   Motivation

•   Challenges when deploying
    Java EE on cloud computing

•   Some tips & tricks

•   Some evaluated Java PaaS

•   Java EE adapter for cloud
    services
JavaOne 2012 - BOF7955 ­ Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud Computing
Typical JavaEE Application
Database A
           Java EE Application
                                              Database Server 1
Java EE Server

                                                 Database B

       App 1                  App 2             Database C
Application Server X   Application Server Y   Database Server 2
JavaOne 2012 - BOF7955 ­ Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud Computing
Elasticity
Database A
           Java EE Application
                                              Database Server 1
Java EE Server

                                                 Database B

       App 1                  App 2             Database C
Application Server X   Application Server Y   Database Server 2
Load Balancer

                                                    Load Balancer Server




        Java EE Application             Java EE Application                Java EE Application              Java EE Application

  Java EE Server                   Java EE Server                     Java EE Server                   Java EE Server




        App 1                    App 2                   Database A                     Database B                 Database C
Application Server X     Application Server Y        Database Server 1             Database Server 2
Load Balancer

                                                    Load Balancer Server




        Java EE Application             Java EE Application                Java EE Application              Java EE Application

  Java EE Server                   Java EE Server                     Java EE Server                   Java EE Server




        App 1                    App 2                   Database A                     Database B                 Database C
Application Server X     Application Server Y        Database Server 1             Database Server 2
Elasticity Challenges

• State management
• Application startup time
• Communication complexity
• Resource discovery
State management
• Design for stateless services
  •   Use stateless EJB

• REST.
  •   JAX-RS.

• JSF features.
  •   Client state saving.

  •   Preemptive navigation (bookmarkable URLs).
State management
• Store state in a distributed cache solution
  •   Memcached, Infinispan, Oracle Coherence, etc.

  •   JSR 107 (JCache) planned to Java EE 7.

  •   Setup carefully the distributed cache to avoid
      high cost on data transfer over the network.
Application startup time
• Reduce the application footprint.
  •   Put static resources in separate deployment
      units.

  •   Static resources may be available in a content
      delivery service.

• Lazy load resources as much as possible.
Communication complexity
• Decouple applications by using
  asynchronous messaging.
• Create atomic idempotent services.
• Keep dynamic data closer to the compute
  and static data closer to the end-user.
 •   Consider to create database shards.
Load Balancer

                                                    Load Balancer Server




        Java EE Application             Java EE Application                Java EE Application              Java EE Application

  Java EE Server                   Java EE Server                     Java EE Server                   Java EE Server




        App 1                    App 2                   Database A                     Database B                 Database C
Application Server X     Application Server Y        Database Server 1             Database Server 2
Load Balancer

                                             Load Balancer Server




     Java EE Application        Java EE Application                 Java EE Application        Java EE Application

Java EE Server             Java EE Server                      Java EE Server             Java EE Server



                                                Message Service


                                            App 1                      App 2
                                  Application Server X         Application Server Y
Load Balancer

                                            Load Balancer Server




     Java EE Application        Java EE Application                Java EE Application              Java EE Application

Java EE Server             Java EE Server                     Java EE Server                   Java EE Server




                                                 Database A                     Database B                 Database C
                                             Database Server 1             Database Server 2
Load Balancer

                                             Load Balancer Server




      Java EE Application        Java EE Application                Java EE Application              Java EE Application

 Java EE Server             Java EE Server                     Java EE Server                   Java EE Server

Zone 01                                                           Zone 02




                                                  Database A                     Database B                 Database C
                                              Database Server 1             Database Server 2
Load Balancer

                                                           Load Balancer Server




            Java EE Application                  Java EE Application               Java EE Application              Java EE Application

      Java EE Server                    Java EE Server                       Java EE Server                   Java EE Server




   DB A - S01              DB B - S01                 DB C - S01                  DB A - S02             DB B - S02            DB C - S02
 Database Server 1 S01   Database Server 2 S01                               Database Server 1 S02   Database Server 2 S02

Zone 01                                                                       Zone 02
Resource discovery
• Let resource management to the container.
  •   Resource location became transparent to
      application by using CDI.

• Use load balancers to access internal
  resources.
Load Balancer

                                                       Load Balancer Server




           Java EE Application             Java EE Application                Java EE Application             Java EE Application

     Java EE Server                   Java EE Server                     Java EE Server                 Java EE Server




       DB A                   DB B                     DB C                     DB A                  DB B                  DB C
Database Server I      Database Server 2                                 Database Server 3     Database Server 4
Load Balancer

                                                       Load Balancer Server




           Java EE Application             Java EE Application                Java EE Application             Java EE Application

     Java EE Server                   Java EE Server                     Java EE Server                 Java EE Server




                                                            Load Balancer



       DB A                   DB B                     DB C                     DB A                  DB B                  DB C
Database Server I      Database Server 2                                 Database Server 3     Database Server 4
Load Balancer

                                                       Load Balancer Server




           Java EE Application             Java EE Application                Java EE Application             Java EE Application

     Java EE Server                   Java EE Server                     Java EE Server                 Java EE Server




                                                            Load Balancer



       DB A                   DB B                     DB C                     DB A                  DB B                  DB C
Database Server I      Database Server 2                                 Database Server 3     Database Server 4
Agenda

•   Motivation

•   Challenges when deploying
    Java EE on cloud computing

•   Some tips & tricks

•   Some evaluated Java PaaS

•   Java EE adapter for cloud
    services
Some evaluated Java PaaS
                Java EE full    Standard    Non-std APIs/   Distributed   Supported App
   PaaS
                   stack       Deployment     Services         Cache         Servers

AWS Beanstalk                                                                 Tomcat 6/7

Oracle Cloud                                                                  WebLogic

  Openshift                                                                  JBossAS 6/7

                                                                             Tomcat 6/7 -
 Cloudbees
                                                                              Glassfish 3

   Heroku                                                                      Tomcat 7

                                                                          Jetty 6 - Tomcat 6/7
   Jelastic
                                                                              - Glassfish 3

Cloud Foundry                                                                  Tomcat 7




                                                                                                 OCT/12
    GAE                                                                          Jetty
Last tips!
•   Prefer a cloud provider that
    provides the Java EE full stack.

•   Use CDI to support a business
    component model in a Java EE
    application deployed on a Web
    Container based cloud provider
    (Paas)

•   Avoid proprietary cloud services
    to avoid "cloud provider lock-in"
Agenda

•   Motivation

•   Challenges when deploying
    Java EE on cloud computing

•   Some tips & tricks

•   Some evaluated Java PaaS

•   Java EE adapter for cloud
    services
A vision of the future!
 Java EE Application    •   Glassfish for Amazon
                            Web Services

 Java EE Application    •   Glassfish for Oracle
     Java EE Services       Cloud
     Cloud Adapter
                        •   Application Servers for
                            IaaS environment
     Cloud Services

  Cloud Provider
Thank you!
•   Alberto Lemos (Dr. Spock)

    @drspockbr

    http://about.me/drspockbr

•   Danival T. Calegari

    @danivaltc

    danivaltc@gmail.com

More Related Content

PDF
Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud C...
PDF
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
PDF
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
PDF
Java EE 7 at JAX London 2011 and JFall 2011
PDF
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
PDF
JavaOne 2011: Migrating Spring Applications to Java EE 6
PDF
Java EE Technical Keynote at JavaOne Latin America 2011
PDF
GlassFish & Java EE Business Update @ CEJUG
Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud C...
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
Java EE 7 at JAX London 2011 and JFall 2011
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
JavaOne 2011: Migrating Spring Applications to Java EE 6
Java EE Technical Keynote at JavaOne Latin America 2011
GlassFish & Java EE Business Update @ CEJUG

What's hot (20)

PPT
Summer training java
PDF
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
PDF
Running your Java EE 6 applications in the Cloud
PPT
JEE Course - JEE Overview
PDF
Summer training java
PDF
The Java EE 7 Platform: Productivity++ & Embracing HTML5
PDF
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
PDF
GlassFish REST Administration Backend
PDF
GlassFish 3.1 at JCertif 2011
PDF
The Java EE 7 Platform: Developing for the Cloud
PDF
Java Summit Chennai: Java EE 7
PDF
GlassFish Community Update @ JavaOne 2011
PDF
The State of Java under Oracle at JCertif 2011
PPTX
Weblogic Server
PDF
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
PDF
TDC 2011: OSGi-enabled Java EE Application
PDF
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
PDF
Leverage Azure and SQL Azure to build SaaS applications
PDF
PDF
Jfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Summer training java
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud
JEE Course - JEE Overview
Summer training java
The Java EE 7 Platform: Productivity++ & Embracing HTML5
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
GlassFish REST Administration Backend
GlassFish 3.1 at JCertif 2011
The Java EE 7 Platform: Developing for the Cloud
Java Summit Chennai: Java EE 7
GlassFish Community Update @ JavaOne 2011
The State of Java under Oracle at JCertif 2011
Weblogic Server
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
TDC 2011: OSGi-enabled Java EE Application
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
Leverage Azure and SQL Azure to build SaaS applications
Jfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Ad

Similar to JavaOne 2012 - BOF7955 ­ Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud Computing (20)

PPTX
The Java EE 7 Platform: Developing for the Cloud
PDF
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
PDF
Java EE 7 and HTML5: Developing for the Cloud
PDF
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
PDF
Java ee 7 platform developing for the cloud kshitiz saxena
PDF
Java one brazil_keynote_dochez
PDF
Java EE7: Developing for the Cloud
PDF
Java EE Technical Keynote - JavaOne India 2011
PDF
JUG Darmstadt - Java EE 7 - Auf in die Wolken!
PDF
2011 04-dsi-javaee-in-the-cloud-andreadis
ODP
Intro in JavaEE world (TU Olomouc)
PDF
Running your Java EE applications in the Cloud
PDF
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
PPTX
SPEC INDIA Java Case Study
PDF
Java EE 7 - Into the Cloud
PDF
A Behind the Scenes Look at the Force.com Platform
PDF
JavaEE6
PDF
GlassFish in the Virtual World
PPT
Introduction to java_ee
PPTX
Shaping your career for Cloud
The Java EE 7 Platform: Developing for the Cloud
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7 and HTML5: Developing for the Cloud
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java ee 7 platform developing for the cloud kshitiz saxena
Java one brazil_keynote_dochez
Java EE7: Developing for the Cloud
Java EE Technical Keynote - JavaOne India 2011
JUG Darmstadt - Java EE 7 - Auf in die Wolken!
2011 04-dsi-javaee-in-the-cloud-andreadis
Intro in JavaEE world (TU Olomouc)
Running your Java EE applications in the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
SPEC INDIA Java Case Study
Java EE 7 - Into the Cloud
A Behind the Scenes Look at the Force.com Platform
JavaEE6
GlassFish in the Virtual World
Introduction to java_ee
Shaping your career for Cloud
Ad

More from Danival Calegari (7)

ODP
Tecnologias Netflix OSS
ODP
TDC 2014 - Java 8: Expressões Lambda e API de Stream
ODP
Java 8 - Expressões Lambda e Stream API - DevCamp 2014
ODP
JSR 352 - Processamento Batch na Plataforma Java - JustJava 2013
PDF
Evitando as armadilhas no projeto de aplicações Java EE para uso eficaz da nuvem
ODP
Polis Hyperlink Dicas e truques de Performance para JPA e EJB
KEY
JSR 352 Batch Applications for the Java Platform
Tecnologias Netflix OSS
TDC 2014 - Java 8: Expressões Lambda e API de Stream
Java 8 - Expressões Lambda e Stream API - DevCamp 2014
JSR 352 - Processamento Batch na Plataforma Java - JustJava 2013
Evitando as armadilhas no projeto de aplicações Java EE para uso eficaz da nuvem
Polis Hyperlink Dicas e truques de Performance para JPA e EJB
JSR 352 Batch Applications for the Java Platform

JavaOne 2012 - BOF7955 ­ Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud Computing

  • 1. Avoiding Java EE Application Design Traps to achieve effective use of cloud computing Alberto Lemos (Dr. Spock) Danival Taffarel Calegari Senior Software Architect MATERA Systems Architect SpockNET Globalcode Instructor
  • 2. Agenda • Motivation • Challenges when deploying Java EE on cloud computing • Some tips & tricks • Some evaluated Java PaaS • Java EE adapter for cloud services
  • 3. Objective “Provide the java developers and architects with some ‘food for thoughts’ to help them to design a better Java EE application”
  • 4. Agenda • Motivation • Challenges when deploying Java EE on cloud computing • Some tips & tricks • Some evaluated Java PaaS • Java EE adapter for cloud services
  • 5. Motivation • How cloud computing can affect the architecture or the code of a Java EE application? • Some Java EE cloud key features are focused on to provide a PaaS model to the Application Servers • No new features to provide the programming model with cloud features
  • 6. Agenda • Motivation • Challenges when deploying Java EE on cloud computing • Some tips & tricks • Some evaluated Java PaaS • Java EE adapter for cloud services
  • 7. Java EE in the Cloud
  • 8. Java EE in the Cloud Operational System Iaas
  • 9. Java EE App Server JVM Operational System Iaas
  • 10. Java EE App Server JVM Paas Operational System Iaas
  • 11. Java EE Application Java EE App Server JVM Paas Operational System Iaas
  • 12. Java EE Services Persistence Java EE Application Messaging Transaction Java EE App Server Security Resource JVM Cache Paas Component Operational System Iaas
  • 13. Java EE Services Cloud Services Persistence Persistence Java EE Application Messaging Messaging Transaction Monitoring Java EE App Server Security Security Resource JVM NoSQL Cache Paas Storage Component ... Operational System Iaas
  • 14. Java EE Services Cloud Services Persistence Persistence JPA Java EE Application Messaging Messaging JMS Transaction Monitoring JTA Java EE App Server Security Security JAAS Resource JVM NoSQL JNDI Cache Paas Storage Component ... EJB Operational System non-std API Iaas
  • 16. Challenges • Elasticity • Deployment model • Support to Java EE full stack • Proprietary services • Resource handling
  • 21. 1000 users Load Balancer Virtual Machine 100 users per VM
  • 22. 500 users Load Balancer Virtual Machine 50 users per VM
  • 23. 100 users Load Balancer Virtual Machine 10 users per VM
  • 24. 100 users Load Balancer Virtual Machine 100 users in a VM
  • 25. 100 users Load Balancer Virtual Machine 100 users in a VM
  • 26. Agenda • Motivation • Challenges when deploying Java EE on cloud computing • Some tips & tricks • Some evaluated Java PaaS • Java EE adapter for cloud services
  • 29. Database A Java EE Application Database Server 1 Java EE Server Database B App 1 App 2 Database C Application Server X Application Server Y Database Server 2
  • 32. Database A Java EE Application Database Server 1 Java EE Server Database B App 1 App 2 Database C Application Server X Application Server Y Database Server 2
  • 33. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server App 1 App 2 Database A Database B Database C Application Server X Application Server Y Database Server 1 Database Server 2
  • 34. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server App 1 App 2 Database A Database B Database C Application Server X Application Server Y Database Server 1 Database Server 2
  • 35. Elasticity Challenges • State management • Application startup time • Communication complexity • Resource discovery
  • 36. State management • Design for stateless services • Use stateless EJB • REST. • JAX-RS. • JSF features. • Client state saving. • Preemptive navigation (bookmarkable URLs).
  • 37. State management • Store state in a distributed cache solution • Memcached, Infinispan, Oracle Coherence, etc. • JSR 107 (JCache) planned to Java EE 7. • Setup carefully the distributed cache to avoid high cost on data transfer over the network.
  • 38. Application startup time • Reduce the application footprint. • Put static resources in separate deployment units. • Static resources may be available in a content delivery service. • Lazy load resources as much as possible.
  • 39. Communication complexity • Decouple applications by using asynchronous messaging. • Create atomic idempotent services. • Keep dynamic data closer to the compute and static data closer to the end-user. • Consider to create database shards.
  • 40. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server App 1 App 2 Database A Database B Database C Application Server X Application Server Y Database Server 1 Database Server 2
  • 41. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server Message Service App 1 App 2 Application Server X Application Server Y
  • 42. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server Database A Database B Database C Database Server 1 Database Server 2
  • 43. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server Zone 01 Zone 02 Database A Database B Database C Database Server 1 Database Server 2
  • 44. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server DB A - S01 DB B - S01 DB C - S01 DB A - S02 DB B - S02 DB C - S02 Database Server 1 S01 Database Server 2 S01 Database Server 1 S02 Database Server 2 S02 Zone 01 Zone 02
  • 45. Resource discovery • Let resource management to the container. • Resource location became transparent to application by using CDI. • Use load balancers to access internal resources.
  • 46. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server DB A DB B DB C DB A DB B DB C Database Server I Database Server 2 Database Server 3 Database Server 4
  • 47. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server Load Balancer DB A DB B DB C DB A DB B DB C Database Server I Database Server 2 Database Server 3 Database Server 4
  • 48. Load Balancer Load Balancer Server Java EE Application Java EE Application Java EE Application Java EE Application Java EE Server Java EE Server Java EE Server Java EE Server Load Balancer DB A DB B DB C DB A DB B DB C Database Server I Database Server 2 Database Server 3 Database Server 4
  • 49. Agenda • Motivation • Challenges when deploying Java EE on cloud computing • Some tips & tricks • Some evaluated Java PaaS • Java EE adapter for cloud services
  • 50. Some evaluated Java PaaS Java EE full Standard Non-std APIs/ Distributed Supported App PaaS stack Deployment Services Cache Servers AWS Beanstalk Tomcat 6/7 Oracle Cloud WebLogic Openshift JBossAS 6/7 Tomcat 6/7 - Cloudbees Glassfish 3 Heroku Tomcat 7 Jetty 6 - Tomcat 6/7 Jelastic - Glassfish 3 Cloud Foundry Tomcat 7 OCT/12 GAE Jetty
  • 51. Last tips! • Prefer a cloud provider that provides the Java EE full stack. • Use CDI to support a business component model in a Java EE application deployed on a Web Container based cloud provider (Paas) • Avoid proprietary cloud services to avoid "cloud provider lock-in"
  • 52. Agenda • Motivation • Challenges when deploying Java EE on cloud computing • Some tips & tricks • Some evaluated Java PaaS • Java EE adapter for cloud services
  • 53. A vision of the future! Java EE Application • Glassfish for Amazon Web Services Java EE Application • Glassfish for Oracle Java EE Services Cloud Cloud Adapter • Application Servers for IaaS environment Cloud Services Cloud Provider
  • 54. Thank you! • Alberto Lemos (Dr. Spock) @drspockbr http://about.me/drspockbr • Danival T. Calegari @danivaltc danivaltc@gmail.com

Editor's Notes

  • #2: \n
  • #3: \n
  • #4: * Discuss some ideas of how to design a typical Java EE application\n* It’s not the definitive guide to the development of a Java EE application\n* Show some conclusions from a study about a typical Java EE application running on a cloud computing environment sold as a platform.\n
  • #5: \n
  • #6: \n
  • #7: \n
  • #8: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #9: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #10: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #11: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #12: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #13: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #14: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #15: Step 1: If we install Java EE in a cloud environment we could start with an IaaS, where we have total control on what’s installed.\nStep 2: Then, we can install an Java EE application server\nStep 4: and sell it as a PaaS.\nStep 5: Then, install a Java EE application. It seems that Java EE is an excellent way to implement a PaaS model despite of some gaps to be solve at the Java EE 8.\nStep 6: Because, Java EE provides a set of standard services. It means a set of standard APIs for:\n * Relational Persistence via JPA\n * Asynchronous messaging via JMS (it deserves improvements - as planned by Java EE 7 spec)\n * Transaction via JTA\n * Security via JAAS (it’s another service that deserves improvements)\n * Resource Handling and location via JNDI\n * Distributed cache (it’ll be addressed by a spec from the Java EE 7)\n * Component modeling via EJB\n * and other services\nStep 7: But, all cloud computing providers provide a set of services. For instance:\n * Relational persistence (usually via MySQL, PostgreSQL ...)\n * Messaging\n * Monitoring service\n * Security (priv/pub key, SSL, certificates, ...)\n * NoSQL persistence\n * Storage service\n * and other services\nSome Java EE services match with cloud services. But, the major problem with a service that matches:\nStep 8: the major part of the cloud providers provides non-standard APIs to access their services.\n
  • #16: \n
  • #17: \n
  • #18: \n
  • #19: \n
  • #20: \n
  • #21: \n
  • #22: \n
  • #23: \n
  • #24: \n
  • #25: \n
  • #26: \n
  • #27: \n
  • #28: \n
  • #29: \n
  • #30: \n
  • #31: \n
  • #32: \n
  • #33: \n
  • #34: \n
  • #35: \n
  • #36: \n
  • #37: \n
  • #38: \n
  • #39: \n
  • #40: \n
  • #41: \n
  • #42: \n
  • #43: \n
  • #44: \n
  • #45: \n
  • #46: \n
  • #47: \n
  • #48: \n
  • #49: \n
  • #50: \n
  • #51: \n
  • #52: \n
  • #53: \n
  • #54: \n
  • #55: \n
  • #56: \n
  • #57: \n
  • #58: \n
  • #59: \n
  • #60: \n
  • #61: \n
  • #62: \n
  • #63: \n
  • #64: \n
  • #65: \n
  • #66: \n
  • #67: \n
  • #68: \n
  • #69: \n
  • #70: \n
  • #71: \n
  • #72: \n
  • #73: \n
  • #74: \n
  • #75: \n
  • #76: \n
  • #77: \n
  • #78: \n
  • #79: \n
  • #80: \n
  • #81: \n
  • #82: \n
  • #83: \n
  • #84: \n
  • #85: \n
  • #86: \n
  • #87: \n
  • #88: \n
  • #89: \n
  • #90: \n
  • #91: Typical JavaEE Application\n- One or more databases\n- Integration with one or more applications\n\n
  • #92: Typical JavaEE Application\n- One or more databases\n- Integration with one or more applications\n\n
  • #93: Typical JavaEE Application\n- One or more databases\n- Integration with one or more applications\n\n
  • #94: \n
  • #95: \n
  • #96: \n
  • #97: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #98: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #99: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #100: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #101: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #102: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #103: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #104: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #105: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #106: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #107: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #108: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #109: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #110: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #111: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #112: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #113: Traps for Elasticity\n* State management\n - Session replication introduces communication costs (both computational and money)\n* Application footprint\n - Applications with a huge footprint leads to slower startup time\n* Communication complexity\n - The communication with other applications will increase complexity as new instances are added to the cloud.\n* Resource discovery\n - As new database or application instances are added to the cloud, the application must be able to use the new resources.\n
  • #114: State management tips\n- Stateless services led to better fault tolerance, load balancing and instance removal.\n- Distributed cache solution is well suitable to cloud\n * JSR 107 (JCache) is planned to Java EE 7\n * Vendor lock-in\n- REST principles put the state in the client\n- JSF allows storing the component state in client. Beware of increased network traffic.\n
  • #115: \n
  • #116: \n
  • #117: - Idempotent services provide less control on the sender side. In failover situations, just resend the messages.\n
  • #118: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #119: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #120: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #121: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #122: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #123: \n
  • #124: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #125: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #126: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #127: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #128: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #129: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #130: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #131: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #132: Elasticity\n- Vertical scaling\n * To increase computer power by adding more servers.\n * Release servers as the load is reduced.\n * Load balancer to users to reach new instances\n * Load balancer to application reach required resources\n\n
  • #133: \n
  • #134: \n
  • #135: \n
  • #136: \n
  • #137: \n
  • #138: \n