Weitere ähnliche Inhalte
Ähnlich wie PaaS enabling Java EE applications through service meta-data and policies - Java One SFO 2012 (20)
Mehr von Jagadish Prasath (6)
Kürzlich hochgeladen (20)
PaaS enabling Java EE applications through service meta-data and policies - Java One SFO 2012
- 1. 1 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
- 2. 2 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
LOGO
PaaS enabling Java EE applications through
service meta-data and policies
Bhavanisankara Sapaliga
Jagadish Ramu
Birds Of Feather
- 3. The following is intended to outline our general product direction.
It is intended for information purposes only, and may not be
incorporated into any contract. It is not a commitment to deliver
any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and
timing of any features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
3 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
2012,
- 4. Program Agenda
• Introduction & Terminology
• Service meta-data
• Service Allocation Policy
• Service Provisioning Order
• Service Co-location Policy
• Service Elevation Policy
• SLA Policy
• Service Augmentation Policy
• Q& A
4 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 5. Cloud Computing
Essential Characteristics
• On-demand Self-Service
• Broad network access
• Resource Pooling
• Rapid Elasticity
• Measured Service
5 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
(*) NIST Definition of Cloud Computing – 800-145 (Draft)
- 6. Cloud Computing
Service Models
• Software as a Service (SaaS)
• Platform as a Service (PaaS)
– Deploy customer-created applications
– Using languages and tools supported by PaaS Provider
– No control of underlying cloud infrastructure
– Control over deployed applications, hosting env. Configurations
• Infrastructure as a Service (IaaS)
6 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
(*) NIST Definition of Cloud Computing – 800-145 (Draft)
- 7. PaaS and Java EE
Java EE design principles and capabilities
• Common programming model for enterprise developers
• Runtime handles application’s infrastructure concerns
• Declarative resource references
• Scalable (scale-out) component models
• Application deployment drives provisioning of services
required by the application
• Using standards based application on a PaaS
7 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 8. Roles in a PaaS scenario
8 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 9. PaaS Implications on Deployment
Services Management
• Automatic Service Provisioning and Management
– Service Orchestration
• Automatic Service Dependency discovery
• Service Provisioning and Association
– Handle operational infrastructure concerns automatically
• Network configuration, HA, Clustering, Load Balancing …
– Application and Service deployment versioning
9 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 10. State of the proposals & work
• Most of these meta-data are derived as part of our
investigation and prototype work
• Conceptual at this stage, not all features/meta-data may
have implementation.
• Part of the meta-data is based on existing/proposed
standards (eg: Java EE 6 & 7 annotations, Java EE
standard descriptors)
10 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 11. Terminology
• Service
• ServiceType
– Java EE, RDBMS, HTTP Load Balancer etc.
• Services – scope and lifecycle
– Provisioned Services
• Application scoped
• Shared
– External (a priori ) services
• Metadata
– Descriptors, annotations for provisioning, policies, references
11 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 12. Service Scopes
● Services are scoped at various levels
12 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● Global services, available for all tenants
● Tenant scoped services, available for all deployments of a tenant
● Application scoped services, available only for an application
- 13. Service Scopes & Types
13 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 14. Service Metadata
• Provisioning meta-data or references can be specified along
with the application (eg: services.xml)
• Vendor specific descriptors (eg: glassfish-resources.xml )
• Standard descriptors or annotations
14 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● Java EE 6 & 7 - resource annotations
– DataSource, MailSession, JMSConnectionFactory,
JMSDestination etc.,
- 15. Specification of Service Metadata
• Optional
– When not specified (vanilla EE app archives)
• Orchestration Engine automatically handles discovery of service deps
• Automatic wiring to default Service Templates
– Metadata may be specified when:
• Finer grain control of application environment desired
• Application-specific Service configuration
15 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 16. Metadata Usage
16 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 17. Specification of Service Metadata
• Service Definition
– Metadata used to provision and configure a Service
17 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
• What : Service characteristics (functional and non-functional) →
Template matching
• How : Explicit Template specification → Template wiring
• Service Reference
– An application component’s dependency on a Service
• Explicit : User-specified through deployment descriptors
• Implicit and Discovered: Information contained within the archive
- 19. Sample Service Description
<service-description name="salary-service" init-type="lazy">
<!-- Based on the characteristics specified below, Orchestrator
matches a Template and provisions that Service -->
<characteristics>
<characteristic name="service-type" value="Database"/>
<characteristic name="product-vendor" value="Oracle"/>
<characteristic name="product-name" value="OracleDB"/>
<characteristic name="product-version" value="11g"/>
<characteristic name="os-name" value="OEL"/>
</characteristics>
<configurations>
<configuration name="database.init.sql" value="init.salary-service.sql"/>
<configuration name="database.name" value="salary_database"/>
</configurations>
</service-description>
19 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 20. Service References
● glassfish-resources.xml (Vendor specific descriptor):
<resources>
<jdbc-connection-pool res-type="javax.sql.DataSource" name="java:app/jdbc/test_pool">
20 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
<property name="service-name" value="global/mydb-service"/>
</jdbc-connection-pool>
<jdbc-resource pool-name="java:app/jdbc/test_pool" jndi-name="
java:app/jdbc/MyRes"></jdbc-resource>
</resources>
● Services.xml
<!-- services.xml -->
<service-reference name="lb-ref" service-name="global/my-shared-lb-service">
- 21. Service References
● Using the @DataSourceDefinition annotation:
@DataSourceDefinition(
21 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
name="java:app/jdbc/DB1",
databaseName="sun-appserv-samples",
paas-enabled="true" | service-name=”global/mydb-service”
)
● Either paas-enabled or service-name can be specified.
● paas-enabled=”true” enables the dynamic binding of the @DSD to a Database
service.
● A new Database service may get created or an existing service may be used
(based on the allocation-policy)
● service-name=”global/mydb-service” binds this DSD to the mydb-service
- 22. Optional Service Dependencies
● An application can specify optional service dependencies.
22 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● <service-ref name=”my-service-ref” service-type=”Caching”
optional=”true”/>
● Optional, late binding of service depenencies
● <service-ref name=”my-service-ref” service-name=”Caching”
optional=”true” late-binding=”true”/>
● Helps to notify when the optional service is made available later in the
runtime so that the application or other dependent services can
associate dynamically.
- 23. Service Naming conventions
● JNDI style of name spaces:
23 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● app/bookstore/BookstoreJavaService
● app/bookstore/BookstoreDBService
● tenant/tenant1/FooJavaEEService
● global/SharedOracleDBService
● Both shared and external services have “global/”
namespace
● Using these naming conventions a service can be uniquely
identified at any given scope
- 25. Service Allocation Policy
● Specified globally or per tenant level
● Default for all <service-reference> elements
● Can be over-ridden per :
25 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● service-type
● vendor-name
● product-name
● product-version
- 26. Service Allocation Policy
<tenant>
<policy>
<!-- valid values for allocation-policy are "shared | dedicated"-->
<service-allocation-policy allocation-policy="shared"/>
<service-ref type="JavaEE" allocation-policy="dedicated"/>
<service-ref type="Database" allocation-policy="dedicated"/>
<service-ref type="Database" allocation-policy="shared" vendor-name="Oracle" product-name="Oracle-Database" product-version="
26 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
11g"/>
<!-- The entry below has same effect as unspecified since the default is “shared”-->
<service-ref type="LoadBalancer" allocation-policy="shared"/>
</service-allocation-policy>
</policy>
</tenant>
- 27. Service Provisioning Order
● Default : As specified in the meta-data “services.xml”
● Specify order in the service description
● Derive any implicit service requirements unspecified in
meta-data and formulate dependency graph
27 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● Cyclic dependencies
– Use existing shared service
– Use “optional”, “lazy-binding” options
– Fail !
- 28. Service Provisioning Order
<service-provisioning-order>
<!-- provisioning-order can be of values "derived" or "meta-data"
"meta-data" : Indicates that provisioning should be as specified in "services.xml".
This can be natural ordering or via the attribute "order" in <service-description>
"derived" : Runtime determines the order by formulating service dependency graph -->
<provisioning-order mode ="meta-data"/>
<!-- cyclic-dependency-resolution can be done using :
"use-shared-service" : Use an existing shared service instead of new one.
"fail" : Fail provisioning
"lazy-binding" : Determine whether the Service Provisioning Engine can handle its service
dependency through "optional" and "lazy-binding" mode and apply accordingly. -->
<cyclic-dependency-resolution-policy mode="use-shared-service" >
</service-provisioning-order>
28 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 29. Service Co-location
● Purpose:
29 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● Multiple services or service nodes co-located in the same hardware
(or virtual machine)
● Benefits:
● Necessary for efficient use of hardware
● Helps the developer-mode deployments for unit testing multiple
applications on the cloud
- 30. Service Co-location
● Specification using services.xml:
30 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
<services>
<service-description name="myGlassFish">...</service-description>
<service-description name="myDatabase">...</service-description>
<service-description name="myLB">...</service-description>
<service-pool>myGlassFish,myDatabase,myLB</service-pool>
</services>
- 31. Service Co-location
● Specification using policies : defines generic rule for co-locating
the services, in the absence of service-pool specified in
services.xml
<policy>
<co-locate-services>
<service-ref type="JavaEE" vendor-name=”GlassFish”/>
<service-ref type="Database" vendor-name="JavaDB"/>
</co-locate-services>
</policy>
31 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 32. Service Elevation Policy
● Auto-detect and elevate an application-scoped-service to account
scoped service
● When used as private cloud (on-premise), auto-detect and elevate an
account-scoped-service to global-service
32 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● Useful for optimized resource sharing with complete control
● Automatically downcast the scope when required so as to tie the
service with application's state (enabled or disabled)
● Application disablement can also stop the running service to help
reduce billing.
- 33. Service Elevation Policy
<tenant>
<policy>
<service-elevation-policy enabled=”true”/>
<upcast-policy>
<event type=”app-deploy” applicable-scopes=”tenant, application”/>
<event-type=”app-redeploy” applicable-scopes=”tenant, application”/>
</upcast-policy>
<downcast-policy>
<event-type=”app-undeploy” applicable-scopes=”tenant, application”/>
<event-type=”app-redeploy” applicable-scopes=”tenant, application”/>
</downcast-policy>
<--elevation policy is disabled for LoadBalancer type -->
<service-type = “LoadBalancer” enabled=”false”/>
</service-elevation-policy>
</policy>
</tenant>
33 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 34. Service Level Agreement Policy
● Service policies can be defined
<sla-policies>
<service-policy type="JavaEE">
<policy name=”max.concurrent.requests” exceeds=”10” action=”upgrade-account”/>
<policy name=”max.http.sessions” exceeds=”100” action=”upgrade-account”/>
</service-policy>
</sla-policies>
● These service policies will result in creating appropriate elasticity
alerts and actions
34 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 35. Service Augmentation conventions
● Upgrade the shared service to meet the application's
requirements
35 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
● For example, upgrade Java EE service from web-profile to
full-profile
● Augmentation rules can be specified as policies
● TBA
- 36. Resources
For more information
• Above the Clouds: A Berkeley View of Cloud Computing
http://bit.ly/15MEL0
• The NIST Definition of Cloud Computing -- Special Publication 800-
145(Draft) http://1.usa.gov/eZ8PSn
36 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
- 37. 37 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
Q&A
- 38. 38 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
- 39. 39 Copyright © 2012, Oracle and/or its affiliates. All rights
reserved.
Classic Duke Future Tech Duke
- 40. 40 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.