PaaSing a Java EE 6 Application - Kshitiz Saxena

Embed Size (px)

Citation preview

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    1/57

    PaaSing a JavaEE 6 Applicat

    Kshitiz

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    2/57

    The following is intended to outline our general product dir

    is intended for information purposes only, and may not beincorporated into any contract. It is not a commitment to dematerial, code, or functionality, and should not be relied upmaking purchasing decisions. The development, release, atiming of any features or functionality described for Oracle

    products remains at the sole discretion of Oracle.

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    3/57

    Program Agenda

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    4/57

    Cloud Computing

    Illusion of infinite computing resources availabl

    demand

    Elimination of an up-front commitment by cloud

    Ability to pay for use of computing resources oterm basis

    Whats new?

    (+) Above the Clouds, Armbrust et al, UC B

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    5/57

    Cloud Computing

    On-demand Self-Service

    Broad network access

    Resource Pooling

    Rapid Elasticity

    Measured Service

    Essential Characteristics

    (*) NIST Definition of Cloud Computing 8

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    6/57

    Cloud Computing

    Private Cloud Operated solely for an organization

    On-premise or off-premise

    Community Cloud

    Public Cloud Access to general public

    Hybrid Cloud 2 or more clouds, Cloud Bursting

    Deployment Models

    (*) NIST Definition of Cloud Computing

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    7/57

    Cloud Computing

    Software as a Service (SaaS)

    Platform as a Service (PaaS) Deploy customer-created applications

    Using languages and tools supported by PaaS Provid

    No control of underlying cloud infrastructure

    Control over deployed applications, hosting env. Conf

    Infrastructure as a Service (IaaS)

    Service Models

    (*) NIST Definition of Cloud Computing 8

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    8/57

    Program Agenda

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    9/57

    PaaS and Java EE

    Common programming model for enterprise de

    Runtime handles applications infrastructure co

    Declarative resource references

    Scalable (scale-out) component models

    Java EE design principles and capabilities

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    10/57

    PaaS and Java EE

    Enhancements New Roles for PaaS

    Services as first class citizens

    Multitenancy

    Evolution, not a revolution!

    Java EE 7: Making Java EE ready for the cloud

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    11/57

    New PaaS Roles in Java EE 7

    PaaS Product Vendor

    PaaS Provider

    PaaS Account Manager

    PaaS Customer

    Application Submitter Application Administrator

    End-User

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    12/57

    Java EE 7 Roles in a PaaS scenario

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    13/57

    Program Agenda

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    14/57

    PaaS Implications on Deployment Simplified PaaS Application Deployment

    Single-click, self-service, push to cloud

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    15/57

    PaaS Implications on Deployment

    Automatic Service Provisioning and Manageme

    Service Orchestration

    Automatic Service Dependency discovery

    Service Provisioning and Association

    Handle operational infrastructure concerns automatic

    Network configuration, HA, Clustering, Load Balancing

    Application and Service deployment versioning

    Services Management

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    16/57

    PaaS Implications on Deployment

    Scalable virtualized on-demand environment

    Support multiple cloud deployment models

    Public, Private, Hybrid

    PaaS Provider decoupled from IaaS infrastructure

    Multi-tenancy

    Virtualized runtimes

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    17/57

    PaaS Implications on Deployment

    Automatic Scaling of Services

    Scale to applications needs

    User-defined alerts and actions

    Control over application hosting environment Flexibility in choice of application services, framework

    Rich service configuration Shared services

    Extensible runtime to allow new Services

    Scaling and Operations

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    18/57

    A sample application stack

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    19/57

    Traditional Java EE Application Deploy

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    20/57

    Java EE PaaS Application Deployment

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    21/57

    Program Agenda

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    22/57

    Terminology

    Service

    ServiceType Java EE, RDBMS, HTTP Load Balancer etc.

    Services scope and lifecycle Provisioned Services

    Application scoped

    Shared

    External (a priori) services

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    23/57

    Specification of Service Metadata

    Optional!

    When not specified (vanilla EE app archives) Orchestration Engine automatically handles discovery of s

    Automatic wiring to default Service Templates

    Metadata may be specified when:

    Finer grain control of application environment desired

    Application-specific Service configuration

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    24/57

    Design Model

    S ifi i f S i M d

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    25/57

    Specification of Service Metadata

    Service Definition

    Metadata used to provision and configure a Service What :Service characteristics (functional and non-functio

    Template matching

    How :Explicit Template specification Template wiring

    Service Reference An application components dependency on a Service

    Explicit : User-specified through deployment descriptors

    Implicit and Discovered: Information contained within th

    S i D d S ifi ti

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    26/57

    Service Dependency Specification

    S l S i D fi iti

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    27/57

    Sample Service Definition

    S l S i R f

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    28/57

    Sample Service Reference

    GlassFish PaaS R ntime Architect re

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    29/57

    GlassFish PaaS Runtime Architecture

    Service Orchestration Flow

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    30/57

    Service Orchestration Flow

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    31/57

    Demo

    PaaSing a Java EE Application in the Cloud

    Conference Planning in the Cloud

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    32/57

    Conference Planning in the Cloud

    . . .

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    33/57

    Program Agenda

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    34/57

    Program Agenda

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

    GlassFish PaaS Runtime Architecture

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    35/57

    GlassFish PaaS Runtime Architecture

    IMS

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    36/57

    IMS

    Provide common management interface acros

    virtualization technologies

    One-liner

    IMS

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    37/57

    IMS

    IMS functionalities

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    38/57

    IMS functionalities

    Support virtualization definitions

    Isolates from low level Virtual Machine allocation/

    Integrates with native solutions through Plug-in/SPI mech

    Template management

    ServerPool / Hardware management (depending ovirtualization technology).

    Templates

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    39/57

    Templates

    A virtual-machine disk can be duplicated

    used to instantiate a virtual-machine.

    Virtualization Specific

    Provides 1 to many service types (usually one).

    Template are customized during the first startup DAS location

    Template parameters like instance name

    Customization mechanism is virtualization specific

    Program Agenda

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    40/57

    Program Agenda

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

    GlassFish PaaS Runtime Architecture

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    41/57

    GlassFish PaaS Runtime Architecture

    Service Orchestration

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    42/57

    Service Orchestration

    Enable single-click deployment of a PaaS app

    through automatic service dependency discoveservice provisioning and service association

    One-liner

    Service Dependency Discovery

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    43/57

    Service Dependency Discovery

    Service Provisioning

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    44/57

    Se ce o s o g

    Service Association

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    45/57

    Program Agenda

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    46/57

    g g

    Cloud Computing

    PaaS and Java EE PaaS implications on application deployment

    Design Model

    IMS

    Service Orchestration

    Auto-Scaling

    Resources

    GlassFish PaaS Runtime Architecture

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    47/57

    Auto-Scaling

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    48/57

    g

    The ability of a system to automatically adapt to

    traffic without impacting throughput and availab

    One-liner

    What we need

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    49/57

    To determine the health of Services in the Syst Number of metrics can be used

    An arbitrary / complex condition need to be evaluated Arbitrary actions can be taken

    A framework that allows

    Ability to define new Metric sources easily (Extensible Ability to express complex queries easily

    Ability to create new Actions easily`

    Determining State of Services

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    50/57

    Monitor System Resources CPU

    Used and idle CPU times

    Memory

    Process memory: Allocated, Resident etc.

    JVM memory: Used, Committed and Max memory

    Disk Reads, Writes per seconds

    Bytes read, written etc.

    Determining State of Services (Contd.)

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    51/57

    Monitor Application Related Objects

    HTTP Sessions created / destroyed per second

    Number of HTTP requests that arrived Connection Pools: Number of connections acquired / rele

    Database Queries executed

    Transaction status: Number of commits / rollbacks

    Response time of a specific URL

    Many, many, many other metrics

    We have metrics. Now what?

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    52/57

    Use relevant metrics to determine health of the Such as Java EE Clustered Instances, Clustered DB

    Use Trends Average memory usage above 60% for last 10 min

    Avg Response times of 90% of requests in last 10 min

    Use Combinations

    Are both CPU and Memory usages high ? Is CPU usage of Java EE Cluster and number of que

    on Database within certain limits ?

    What Actions can you take?

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    53/57

    Possible Actions Send email to admin

    Log some info Scale up / Scale down to meet the load

    Send a (JMX) notification

    And many, many, many more

    Program Agenda

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    54/57

    Cloud Computing

    PaaS and Java EE

    PaaS implications on application deployment

    Design Model

    Service Orchestration

    Auto-Scaling IMS

    Resources

    Resources

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    55/57

    GlassFish 4.0 http://download.java.net/glassfish/4.0/pro

    Spec http://bit.ly/sAZtEL Java EE 7 keynote demo http://bit.ly/q9T7Z2

    Java EE 7 http://jcp.org//en/jsr/detail?id=342

    PaaS Model http://bit.ly/o3XZIP

    Above the Clouds: A Berkeley View of Cloud Computing

    http://bit.ly/15MEL0

    The NIST Definition of Cloud Computing -- Special Publ145 http://1.usa.gov/ohXnlM

    For more information

    http://download.java.net/glassfish/4.0/promoted/http://bit.ly/sAZtELhttp://bit.ly/q9T7Z2http://jcp.org/en/jsr/detail?id=342http://bit.ly/o3XZIPhttp://bit.ly/15MEL0http://1.usa.gov/ohXnlMhttp://1.usa.gov/ohXnlMhttp://1.usa.gov/ohXnlMhttp://bit.ly/15MEL0http://bit.ly/o3XZIPhttp://jcp.org/en/jsr/detail?id=342http://bit.ly/q9T7Z2http://bit.ly/sAZtELhttp://download.java.net/glassfish/4.0/promoted/
  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    56/57

    Q&A

    PaaSing a JavaEE 6 Applicat

  • 8/3/2019 PaaSing a Java EE 6 Application - Kshitiz Saxena

    57/57

    PaaSing a JavaEE 6 Applicat

    Conference Session - 25360

    Kshitiz