Upload
dmitry-buzdin
View
1.561
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
1
<Insert Picture Here>
Java EE 7: Developing for the Cloud
Martin Grebac
Metro / JAXWS / JAXB Project Lead
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.
4
Agenda
• Java EE 7 theme
• Main features
• Component JSRs
• Transparency
• Status and Schedule
• Roadmap
5
Java EE 7 Theme: The Cloud
6
What Do We Mean by “The Cloud”?
• Infrastructure as a Service (IaaS) ?
• Platform as a Service (PaaS) ?
• Software as a Service (SaaS) ?
7
What Do We Mean by “The Cloud”?
• Infrastructure as a Service (IaaS)
The capability provided to the consumer is to provision
processing, storage, networks, and other fundamental
computing resources where the consumer is able to deploy
and run arbitrary software, which can include operating
systems and applications. (NIST)
• Platform as a Service (Paas)
• Software as a Service (SaaS)
8
What Do We Mean by “The Cloud”?
• Infrastructure as a Service (IaaS)
• Platform as a Service (PaaS)
The capability provided to the consumer is to deploy onto the
cloud infrastructure consumer-created or acquired
applications created using programming languages and tools
supported by the provider. The consumer does not manage or
control the underlying cloud infrastructure…, but has control
over the deployed applications and possibly application
hosting environment configurations. (NIST)
• Software as a Service (SaaS)
9
What Do We Mean by “The Cloud”?
• Infrastructure as a Service (IaaS)
• Platform as a Service (PaaS)
• Software as a Service (SaaS)
The capability provided to the consumer is to use the
provider’s applications running on a cloud infrastructure. The
consumer does not manage or control the underlying cloud
infrastructure…, with the possible exception of limited user-
specific application configuration settings. (NIST)
10
Support for Platform-as-a-Service Model
(Paas)
• Next logical step in extending value proposition of
Java EE platform
• Provide a way for customers and users of Java EE to
leverage private and public clouds
• PaaS support entails evolutionary change
• New platform roles; some modifications to existing roles
• Small programming model changes
• Multitenancy
• Java EE 7 is the first step
• An evolutionary step, not a radical one
• May include limited support for SaaS
11
Java EE 7 Cloud Roadmap
• Define new platform roles to accommodate PaaS
model
• Add metadata
• For service provisioning and configuration
• For QoS, elasticity
• For sharing of applications and resources
• For (re)configurability and customization
• Add useful APIs for cloud environment
• JAX-RS client API, Caching API, State Management, JSON
• Extend existing APIs with support for multitenancy
12
Roles
Tenant 1 Tenant 2 Tenant 3
Machine
JVM
JVM
JVM
Machine
JVM
JVM
JVM
Machine
JVM
JVM
JVM
Machine
JVM
JVM
JVM
Machine
JVM
JVM
JVM
Machine
JVM
JVM
JVM
Developer
PaaS Customer/
Tenant
Deployer
Application Submitter
Application Administrator
PaaS Provider
PaaS Product Provider
PaaS Account Manager
PaaS Administrator
13
Services • Cloud applications consume services
• Persistence, queueing, mail, caching, …
• Service metadata facilitates ease of use when
deploying into the cloud
@DataSourceDefinition (
name=“java:app/jdbc/myDB”,
className=“oracle.jdbc.pool.OracleDataSource”,
isolationLevel=TRANSACTION_REPEATABLE_READ,
initialPoolSize=5
)
@JMSConnectionFactoryDefinition (
name=“java:app/jms/myJMSConnectionFactory”,
className=“javax.jms.QueueConnectionFactory”
)
@MailSessionDefinition (
name=“java:app/mailSession”,
)
14
Old Java EE Model
• Configure Java EE resources – JDBC, JMS etc
• Deploy Application EAR
15
Java EE 7 Model
• Provision and deploy application
resources (e.g. LDAP stripe, data
source instantiation and connection …)
• Extensible Deployment Models Supporting
Multiple Frameworks
• Spring, Seam, Play …
16
PaaS and Multitenancy: Some Models
(1) PaaS Platform on Demand
• New runtime stack for each tenant
(2) PaaS Multitenant Containers
• Isolated application partitions per tenant with shared runtime
(3) SaaS Multitenant Applications
• Shared application instances, with tenant-specific
customization
(3*) SaaS-limited
• Separate application instances, with tenant-specific
customizations
17
Multitenancy in Java EE 7
• Support for separate isolated instances of the same
app for different tenants
• One application instance per tenant
• Each instance is customized and deployed for a single tenant
• “SaaS-limited”
• Allow shared resources
• “SaaS-proper” deferred to Java EE 8
18
Tenants
• Tenants correspond to the unit of isolation
• Mapping to a tenant done by the container
• E.g., using virtual servers
• Apps are marked as Multitenancy-Enabled
• Possible restrictions on application code
• Tenant identifier available to application
• E.g., under java:comp/tenantId
19
Multitenancy and Resources
• Separate database, shared nothing
• Best isolation
• Resource intensive
• Shared database, separate schema
• Database provides isolation at schema-level
• Less resource intensive
• Shared database, shared schema
• Isolation happens at row level !
• Least resource intensive
20
Application Level Multi Tenancy
@Entity
@Table(name=“EMP”)
@MultiTenant(SINGLE_TABLE)
@TenantDiscriminator(name=“company-id”, columnName=“COMPANY”)
public class Employee {
EMP
EMP_ID VERSION F_NAME L_NAME GENDER DEPT_ID
1 1 John Doe M 1
2 3 Jane Doe F 2
SELECT * FROM EMPLOYEE WHERE L_NAME LIKE ‘D%’ AND DEPT_ID= 1
21
Dedicated App, Dedicated Database
22
Shared App, Dedicated Database
23
Dedicated App, Shared Database
24
Shared App, Shared Database
25
New and Updated Roles
• Java EE Product Provider
• PaaS Provider
• PaaS Account Manager
• System Administrator
• PaaS Customer (Tenant)
• Application Submitter
• Deployer
• Application Administrator
• End-User
Cloud Vendor Cloud Customer
26
Use Cases / Scenarios
• Java EE vendor becomes a PaaS product vendor
• A PaaS provider wants to support Java EE applications
• A PaaS customer writes a web application, deploys it to
a cloud infrastructure, end users access it
• A software company writes an application, submits it to
a PaaS provider, then any number of tenants sign up
for the application, deploy it, their end users access it
27
Example Scenario
“A software company writes an
application, submits it to a PaaS
provider, then any number of tenants
sign up for the application, deploy it,
their end users access it”
28
Walkthrough (1)
SimplyCRM DiabloCloud
29
Walkthrough (2)
SimplyCRM
Application Developer
App
Writes
DiabloCloud
30
Walkthrough (3)
SimplyCRM
PaaS Account Manager
PaaS Customer
Signs up as a customer
DiabloCloud
31
Walkthrough (4)
SimplyCRM DiabloCloud
Application Submitter
App
Submits the application System Administrator
32
Walkthrough (5)
ExtraServices DiabloCloud
App
Discovers
33
Walkthrough (6)
ExtraServices DiabloCloud
PaaS Customer
App
Signs up as a customer PaaS Account Manager
34
App
Walkthrough (7)
ExtraServices DiabloCloud
Deployer System Administrator
Customizes and
deploys the application
35
App
Walkthrough (8)
ExtraServices DiabloCloud
Deployer System Administrator
Provisions on
Cloud
infrastructure
36
Walkthrough (9)
ExtraServices DiabloCloud
Deployer System Administrator
Provisioned and
Deployed App
37
Walkthrough (10)
ExtraServices DiabloCloud
End-Users Access the application
Provisioned and
Deployed App
38
Walkthrough (11)
ExtraServices DiabloCloud
End-Users Access the application
Administrator Administers the application
Provisioned and
Deployed App
39
Walkthrough (12)
ExtraServices DiabloCloud
End-Users
System Administrator
Access the application
Administrator Administers the application
Monitors
Provisioned and
Deployed App
40
Other Topics on the Java EE 7 Agenda
• Alignment of Managed Beans across CDI, EJB, JSF, Servlet, … • Extension of container-managed transactions beyond EJB
• Further simplifications for ease-of-development • Expanded use of dependency injection
• Expanded service metadata; improved configuration
• Pruning • EJB CMP/BMP, JAX-RPC, Deployment API
• Update to Web Profile • …
41
Java EE 7 JSRs
• Platform 7 / Web Profile 7
• JPA 2.1
• JAX-RS 2.0
• EJB 3.2
• JMS 2.0
• Servlet 3.1
• EL 3.0
• JSF 2.2
• CDI 1.1
• JCache 1.0 (JSR 107)
• Concurrency Utilities 1.0
• Bean Validation 1.1
• State Management 1.0
• JSON 1.0
• Batch Processing1.0
• Common Annotations 1.2 MR
• JTA 1.2 MR
• JSP 2.3 MR
• JASPIC 1.3 MR
42
Transparency
• High level of transparency for all Java EE JSRs
• Using java.net projects to run our JSRs in the open • One java.net project per specification
• E.g., javaee-spec, jpa-spec, jax-rs-spec, ejb-spec,…
• Publicly viewable Expert Group mailing list archive
• Users observer list gets copies of all emails to the EG
• Download area
• JIRA for issue tracking
• Wiki, source repository, etc. at the group’s discretion
• JCP.org private mailing list for administrative / confidential info
43
Status and Schedule
• Nearly all JSRs up and running
• Remaining ones to be filed in the coming weeks
• Final release 2012
• Date-driven release: anything not ready will be
deferred to Java EE 8
44
To Get in the Loop
• Java EE 7 java.net project
• Archives, documents, mailing lists,…
http://java.net/projects/javaee-spec
• Component projects
http://java.net/projects/XXX-spec
(where XXX = jpa, ejb, jms, servlet, jax-rs, jsf,…)
• Send us feedback
45
The preceding 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.