running your java ee 6 applications in the cloud (fisl 12)
DESCRIPTION
Running your Java EE 6 applications in the Cloud (FISL 12)TRANSCRIPT
![Page 1: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/1.jpg)
<Insert Picture Here>
Running your Java EE Applications in the Cloud
Arun Gupta, Java EE & GlassFish Guyblogs.oracle.com/arungupta, @arungupta
![Page 2: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/2.jpg)
2
The following/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.
![Page 3: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/3.jpg)
3
Agenda
• Introduction to Java EE 6 & Demo• Java EE 6 on
• • • •
• Multi-cloud Vendor Comparison• Evolving Java EE for Cloud• Conclusions
![Page 4: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/4.jpg)
4
• Java EE 6 Web Profile• Pruning
• Pruned today, means• Optional in the next release• Deleted in the subsequent releases
• Technologies marked in Javadocs• EJB 2.x Entity Beans, JAX-RPC, JAXR, JSR 88
Light-weight
![Page 5: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/5.jpg)
5
• EJB-in-WAR• No-interface EJB• Optional
“web.xml”/”faces-config.xml”
• Annotation-driven• @Schedule• @Path• @Inject• . . .
![Page 6: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/6.jpg)
6
<web-fragment> <filter> <filter-name>wicket.helloworld</filter-name> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> <init-param> <param-name>applicationClassName</param-name> <param-value>...</param-value> </init-param> </filter>
<filter-mapping> <filter-name>wicket.helloworld</filter-name> <url-pattern>/*</url-pattern> </filter-mapping></web-fragment>
![Page 7: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/7.jpg)
7
Oracle's definition of Cloud Computing
● Virtualized elastic platform for applications● Standards-based application development/execution platform● Includes hardware and software● Virtualized and Elastic● Runs a wide variety of applications● On both public and private clouds
![Page 8: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/8.jpg)
8
Oracle Exalogic Elastic Cloud
● Hardware and Software engineered to work together
● 100% Fault-tolerant & Scalable On-Demand
● 30 compute servers, 360 cores, 980 GB Solid-state disk, 40 GB/sec Infiniband, Patch centrally
● Servers, Network, Storage, VM, Operating System, Middleware, Develop/Run all applications
![Page 9: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/9.jpg)
9
Based uponresearch work ...
![Page 10: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/10.jpg)
10
What is Amazon ?
• Boot server instances, scale up/down, pay-per-use• EC2: Compute capacity in the cloud• S3: Storage capacity in the cloud (1b → 5 GB)• Simple Email Service, RDS (Database), FWS
(fulfillment), SQS (queue), SNS (notification), CloudWatch (monitoring), FPS (payment), VPC (private cloud), EBS (block storage), ...
![Page 11: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/11.jpg)
11
Java EE 6 on Amazon
• 2 New AMIs based on Hardened OpenSolaris• Oracle GlassFish Server 3.0 (not released)• Apache HTTP Server + mod_jk (not released)• Pre-existing MySQL Database 5.1 AMI
• Instances managed by SMF• GlassFish: svcadm restart/enable/disable svc:/application/GlassFish/domain1:default
• MySQL SMF: svcadm enable mysql• mod_jk: svcadm restart/refresh/enable/disable svc:/network/http:apache22
![Page 12: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/12.jpg)
12
Java EE 6 on Amazon# Define a load-balancing worker worker.list=worker1 ## Define an ajp13 worker to represent instance1 worker.instance1.type=ajp13 worker.instance1.host=ec2-67-202-51-223.compute-1.amazonaws.com worker.instance1.port=8009 ## Define an ajp13 worker to represent instance2 worker.instance2.type=ajp13 worker.instance2.host=ec2-67-202-7-236.compute-1.amazonaws.com worker.instance2.port=8009 ## Define the type of worker1 worker.worker1.type=lb # Add inst1 and inst2 to the balance_workers property of worker1 worker.worker1.balance_workers=instance1,instance2
AJP_INSTANCE_NAMEin GlassFish instances
![Page 13: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/13.jpg)
13
mod_jk
GlassFish-1 GlassFish-2
MySQL
GlassFish-N. . .
ManagedUsing
“cladmin”
![Page 14: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/14.jpg)
14
How to Deploy ?
• Launch MySQL AMI, create database, user, privileges, …
• Launch 1 or more GlassFish AMI• Set AJP_INSTANCE_NAME in each GlassFish
• Administer multiple instances using cladmin• --target instance-list OR set AS_TARGET=”...”• cladmin create-jdbc-connection-pool …• cladmin deploy ~/samples/hello.war
• Launch mod_jk AMI• Configure “worker.properties”
![Page 15: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/15.jpg)
15
![Page 16: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/16.jpg)
16
100,000+surveys/hr
GlassFish 3.0.1 JAX-RS EJB 3.1 JPA 2
![Page 17: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/17.jpg)
17
Pricing
http://aws.amazon.com/ec2/pricing/
![Page 18: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/18.jpg)
18
Java EE 6 on RightScaleR
ightS
cale
AmazonUS East
AmazonUS West
AmazonEU
AmazonAsia
RackspaceIBM
CloudVMWare
Cloud-ReadySolutions
Expertise& Support
Web Site
Grid Right
Scripts
CloudApplications
AutomationArchitecture
![Page 19: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/19.jpg)
19
How to Deploy ?Macro Definition
• Launches a new virtual server with clean install of Ubuntu
• Install GlassFish Server Open Source Edition 3.0• Detects database in the deployment
• Installs MySQL Connector/J Driver• Creates a JDBC Connection Pool and Resource
• Install samples• Archives (WAR/EAR/...) stored in S3
![Page 20: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/20.jpg)
20
High Availability Deployment
DNS Round Robin
Amazon S3
Load Balancer-1 Load Balancer-2
GlassFish-1 GlassFish-2 GlassFish-3 GlassFish-n. . .
MasterDB
SlaveDB EBS
VolEBSVol
replication
Amazon EC2
Min: 0;Max: 5
Server Array
![Page 21: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/21.jpg)
21
RightScripts
![Page 22: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/22.jpg)
22
Alerts
![Page 23: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/23.jpg)
23
![Page 24: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/24.jpg)
24
Pricing
http://www.rightscale.com/products/plans-pricing/
![Page 25: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/25.jpg)
25
What is Azure ?
![Page 26: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/26.jpg)
26
How to deploy ?Azure Storage
![Page 27: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/27.jpg)
27
How to deploy ?Visual Studio Project
![Page 28: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/28.jpg)
28
How to deploy ?Publish
ServiceConfiguration
ServiceDefinition
Run.cmd
Launch.ps1
http://blogs.oracle.com/arungupta/entry/ttod_155_glassfish_in_azure
![Page 29: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/29.jpg)
29
How to deploy ?Expose GlassFish ports
![Page 30: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/30.jpg)
30
How to deploy ?Launch.ps1
$connection_string ='DefaultEndpointsProtocol=http;AccountName=YOUR-STORAGE;AccountKey=YOUR-KEY'
# JDK$jdk = 'jdk1.6.0_23.zip'download_from_storage 'java' $jdk $connection_string (Get-Location).Pathunzip ((Get-Location).Path + "\" + $jdk) (Get-Location).Path
# GlassFish$glassfish = 'glassfish-3.1-b40.zip'download_from_storage 'apps' $glassfish $connection_string (Get-Location).Pathunzip ((Get-Location).Path + "\" + $glassfish) (Get-Location).Path
# Launch GlassFish.\jdk1.6.0_23\bin\java `-jar.\glassfish3\glassfish\modules\admin-cli.jar start-domain --verbose
![Page 31: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/31.jpg)
31
How to deploy ?Publish
![Page 32: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/32.jpg)
32
Pricing
• Offers - Consumption or Commitment
• 30-day FREE pass• Platform offer comparison table
![Page 33: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/33.jpg)
33
Pricing
http://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&locale=en-US&offer=COMPARE_PUBLIC
![Page 34: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/34.jpg)
34
http://blogs.oracle.com/arungupta/entry/wishlist_for_windows_azure
Tweet and Blog It!
![Page 35: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/35.jpg)
35
Java EE 6 on Joyent
● High performance and reliable public, private, and hybrid cloud
● Environment● Language: Java, PHP, Ruby, …● Server: GlassFish, Apache, nginx, …● Database: MySQL, Oracle, ...
![Page 36: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/36.jpg)
36
Vs Amazon
![Page 37: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/37.jpg)
37
Java EE 6 on Joyent
● Smart Machine (nee Accelerators)● Public IP Address● Root access to Solaris Zone● Guaranteed minimum CPU/RAM● Dedicated IP address + 100 Mbps connectivity● Common packages like MySQL can be installed using
Webmin● “sftp” to upload application packages
![Page 38: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/38.jpg)
38
![Page 39: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/39.jpg)
39
![Page 40: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/40.jpg)
40
Pricing
http://www.joyentcloud.com/support/levels/
![Page 41: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/41.jpg)
41
Multi-cloud Vendors
![Page 42: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/42.jpg)
42
Vendor Language Compute Storage Provider
RightScale Bash, Ruby, Perl
Yes Yes Amazon, GoGrid, FlexiScale, Eucalyptus
OpenStack REST Yes Yes Several
SimpleCloud PHP No Yes, Queing
Microsoft, IBM, Rackspace, Nirvanix, GoGrid
libcloud Python Yes ?? Several
jClouds Java, Clojure
Yes Yes Several
DeltaCloud Ruby, REST
Create/Start/Stop/Reboot/Destroy
No Amazon, GoGrid, OpenNebula, Rackspace, RHEV-M, RimuHosting
CloudLoop Java No Yes Amazon, Nirvanix
Dasein Java ?? Yes Amazon, Rackspace, vSphere
Cumulogic Language/IaaS-agnsotic PaaS
CloudBees Java JVM-based PaaS
OpenShift Java, PHP Java PaaS, MySQL, MongoDB
CloudFoundry Spring, Rails, Node.js
Several
![Page 43: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/43.jpg)
43
From the real users ...Developers can concentrateon business logic, Java EE 6 is providing a standard for the infrastructure.
Jigsaw puzzle, Modular, standard, less xml, easy, easy, have I said easy?
Higher integrated specs,simple and annotation driven,single-classloader WARs,next level of industry standard
Standards compliance, vendor independence, milliseconds and kilobyte deployment
http://blogs.oracle.com/arungupta/tags/community+feedback
Faster development, less frameworks, less complexity, more great code shipped
Not your fat grandfather's enterprise Java anymore, enterprise Java renaissance
Definite excuse to avoid Spring forever
Simplified Java Development, Focus on building great products
![Page 44: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/44.jpg)
44
What does Java EE offer to Cloud ?
● Containers● Injectable services● Scale to large clusters● Security model● . . .
![Page 45: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/45.jpg)
45
Java EE 7 : JSR 342
• Theme: Cloud• More easily operate on private or public clouds• Multi-tenancy and elasticity
• Technology refresh: JMS 2.0, CDI 1.1, ...• HTML 5 and Web Sockets, WebSockets,
Java JSON API• Possible JSRs inclusion
• Concurrency Utilities for Java EE (JSR 236)• JCache (JSR 107)
• Modularity and Versioning
NEW
![Page 46: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/46.jpg)
46
Java EE 7 Schedule
• March 2011 Early EG Formed• Q3 2011 Early Draft• Q1 2012 Public Draft• Q4 2012 Final Release
NEW
![Page 47: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/47.jpg)
47
Java EE 7 JSR Soup
• Java Persistence API 2.1 – JSR 338• JAX-RS 2.0 – JSR 339• Servlets 3.1 – JSR 340• Expression Language 3.0 – JSR 341• Java EE 7 – JSR 342 • Java Message Service 2.0 – JSR 343• Java Server Faces 2.2 – JSR 344• EJB 3.2 – JSR 345• CDI 1.1 – JSR 346• JCache – JSR 107
NEW
![Page 48: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/48.jpg)
48
Distribution License Features
GlassFish Server Open Source Edition 3.1Web Profile
CDDL & GPLv2
• Java EE 6 compatibility• Web Profile support• In-memory replication / clustering• Centralized Administration
GlassFish Open Source Edition 3.1
CDDL & GPLv2
• Java EE 6 compatibility• Full Java EE distribution• In-memory replication / clustering• Centralized Administration
Oracle GlassFish Server 3.1Web Profile Commercial
• Adds• Oracle GlassFish Server Control• Patches, support, knowledge base
Oracle GlassFish Server 3.1 Commercial
• Adds• Oracle GlassFish Server Control• Patches, support, knowledge base
GlassFish Server Distributions
![Page 49: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/49.jpg)
49
Weblogic in the Cloud
• Built-in Coherence grid for session management• Clusters spanning 400 nodes
• Virtual Assembly Builder to stamp out environments• Appliances, Deployment Plan, Templates
• Zip distribution for lighter-weight development• Download, install, startup < 2 mins
• Excellent management tools• DIY Today• TBD: Automated in next release
![Page 50: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/50.jpg)
50
Conclusions
• Java EE 6 is light-weight, flexible, easy-to-use• GlassFish Server Open Source Edition 3.0 and
Oracle GlassFish Server 3.0 provides feature-rich implementation
• Java EE 6 applications can be easily deployed on Amazon, RightScale, Azure, Joyent, and other clouds.
• Java EE 7/GlassFish 4.0 will provide a standards-based programming model for PaaS environments.
• Talk to us at [email protected].
![Page 51: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/51.jpg)
51
References
• glassfish.org• oracle.com/goto/glassfish• blogs.sun.com/theaquarium• youtube.com/user/GlassFishVideos• @glassfish
![Page 52: Running your Java EE 6 applications in the Cloud (FISL 12)](https://reader033.vdocuments.us/reader033/viewer/2022052900/5563a180d8b42a2b6a8b4eeb/html5/thumbnails/52.jpg)
<Insert Picture Here>
Running your Java EE 6 Applications in the Cloud
Arun Gupta, Java EE & GlassFish Guyblogs.oracle.com/arungupta, @arungupta