45
1

Java EE7: Developing for the Cloud

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Java EE7: Developing for the Cloud

1

Page 2: Java EE7: Developing for the Cloud

<Insert Picture Here>

Java EE 7: Developing for the Cloud

Martin Grebac

Metro / JAXWS / JAXB Project Lead

Page 3: Java EE7: Developing for the Cloud

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.

Page 4: Java EE7: Developing for the Cloud

4

Agenda

• Java EE 7 theme

• Main features

• Component JSRs

• Transparency

• Status and Schedule

• Roadmap

Page 5: Java EE7: Developing for the Cloud

5

Java EE 7 Theme: The Cloud

Page 6: Java EE7: Developing for 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) ?

Page 7: Java EE7: Developing for the Cloud

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)

Page 8: Java EE7: Developing for the Cloud

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)

Page 9: Java EE7: Developing for the Cloud

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)

Page 10: Java EE7: Developing for the Cloud

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

Page 11: Java EE7: Developing for the Cloud

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

Page 12: Java EE7: Developing for the Cloud

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

Page 13: Java EE7: Developing for the Cloud

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”,

[email protected]

)

Page 14: Java EE7: Developing for the Cloud

14

Old Java EE Model

• Configure Java EE resources – JDBC, JMS etc

• Deploy Application EAR

Page 15: Java EE7: Developing for the Cloud

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 …

Page 16: Java EE7: Developing for the Cloud

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

Page 17: Java EE7: Developing for the Cloud

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

Page 18: Java EE7: Developing for the Cloud

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

Page 19: Java EE7: Developing for the Cloud

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

Page 20: Java EE7: Developing for the Cloud

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

Page 21: Java EE7: Developing for the Cloud

21

Dedicated App, Dedicated Database

Page 22: Java EE7: Developing for the Cloud

22

Shared App, Dedicated Database

Page 23: Java EE7: Developing for the Cloud

23

Dedicated App, Shared Database

Page 24: Java EE7: Developing for the Cloud

24

Shared App, Shared Database

Page 25: Java EE7: Developing for the Cloud

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

Page 26: Java EE7: Developing for the Cloud

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

Page 27: Java EE7: Developing for the Cloud

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”

Page 28: Java EE7: Developing for the Cloud

28

Walkthrough (1)

SimplyCRM DiabloCloud

Page 29: Java EE7: Developing for the Cloud

29

Walkthrough (2)

SimplyCRM

Application Developer

App

Writes

DiabloCloud

Page 30: Java EE7: Developing for the Cloud

30

Walkthrough (3)

SimplyCRM

PaaS Account Manager

PaaS Customer

Signs up as a customer

DiabloCloud

Page 31: Java EE7: Developing for the Cloud

31

Walkthrough (4)

SimplyCRM DiabloCloud

Application Submitter

App

Submits the application System Administrator

Page 32: Java EE7: Developing for the Cloud

32

Walkthrough (5)

ExtraServices DiabloCloud

App

Discovers

Page 33: Java EE7: Developing for the Cloud

33

Walkthrough (6)

ExtraServices DiabloCloud

PaaS Customer

App

Signs up as a customer PaaS Account Manager

Page 34: Java EE7: Developing for the Cloud

34

App

Walkthrough (7)

ExtraServices DiabloCloud

Deployer System Administrator

Customizes and

deploys the application

Page 35: Java EE7: Developing for the Cloud

35

App

Walkthrough (8)

ExtraServices DiabloCloud

Deployer System Administrator

Provisions on

Cloud

infrastructure

Page 36: Java EE7: Developing for the Cloud

36

Walkthrough (9)

ExtraServices DiabloCloud

Deployer System Administrator

Provisioned and

Deployed App

Page 37: Java EE7: Developing for the Cloud

37

Walkthrough (10)

ExtraServices DiabloCloud

End-Users Access the application

Provisioned and

Deployed App

Page 38: Java EE7: Developing for the Cloud

38

Walkthrough (11)

ExtraServices DiabloCloud

End-Users Access the application

Administrator Administers the application

Provisioned and

Deployed App

Page 39: Java EE7: Developing for the Cloud

39

Walkthrough (12)

ExtraServices DiabloCloud

End-Users

System Administrator

Access the application

Administrator Administers the application

Monitors

Provisioned and

Deployed App

Page 40: Java EE7: Developing for the Cloud

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 • …

Page 41: Java EE7: Developing for the Cloud

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

Page 42: Java EE7: Developing for the Cloud

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

Page 43: Java EE7: Developing for the Cloud

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

Page 44: Java EE7: Developing for the Cloud

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

[email protected]

[email protected]

Page 45: Java EE7: Developing for the Cloud

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.