porting java app to cloud
DESCRIPTION
Demonstration of moving existing java app to amazon ec2 and Google app engineTRANSCRIPT
Porting JavaWeb Application ToEnterprise Cloud
Abhishek Chikane05 August 2011
What We are Going To discuss
Today?
What Is Cloud?
How To Develop Apps on Cloud?
printf(“Hello World”);
How To Port Your Java Web App on Cloud?
System.out.prinln(“Hello World”);
Why?
What You Are Going To Do?
Deploy Your
.war
Or .ear
On Cloud
Move Your DB To Cloud ?
Software As
Service
Platform As Service
Infrastructure As Service
Flavors Of Clouds?
Web Application
Web Application On Cloud
Amazon Web Service Infrastructure As Service
Amazon Web Service Java Web Application
.war
.ear
No DBCP Support
Use JDBC String
Google App Engine Platform As Service
Google App Engine Platform As Service
JPA Or JDO
. Google Web App WAR
Google App Engine Java Platform
Google Data Store
No JDBC Support
Google App Engine Platform As Service
Google Web Application Project
Structure Of Project
Google App Engine Platform As Service
JSP Compilation Issue
Change It To JDK Path
Google App Engine Platform As Service
Google App Engine Data Store
EntityTable Row
KindTable
JPA/JDO Configuration
Data Store
Google App Engine Platform As Service
Need To Change The Primary Key Data Type To java.lang.Long Type
Why?Integer, Float or any other data type will not work
Primary Keys Of Entities
Google App Engine Platform As Service
Running Struts
What?Tell OGNL to not do security manager permission checks
Why?GAE has a security manager and you don't have the ability to add the OGNL-specific permissions
How?place for this is in a Servlet context listener, executing when the context is initialized
OgnlRuntime.setSecurityManager(null);
In Dev Environment need to override Freemarker Class
Google App Engine Platform As Service
Either Setup Proper Relation Among The Entities and Use JPA For Join
Or Make Plain QueriesJoin Queries
Google App Engine Platform As Service
Lists returned by Data Nucleus Query API is not serialized
What Is The Error?Query results list object can not be accessed
How To Fix It?Copy the query results into ArrayList/Vector
Data Nucleus List Serialization
Google App Engine Platform As Service
Session Handling
Update the object in session after each change of value.
Why?The session object is not passed by reference
Google App Engine Platform As Service
Java Logging
If I have System.out.printlns In My App?Set logger level <= INFO
Where To See Logs?
Logging Configuration
Google App Engine Platform As Service
Remove Jars, Classes Of Not Supported APIs/Frameworks From Your Application
e.g. Hibernate EJBJAX-RPCJAX-WSJDBCJMXJMSJNDIRMI etc.
Class Loading Problem
Google App Engine Platform As Service
Very Dangerous Error
Error 203
How To Avoid?Do not put any CPU intensive processing in one request
Tips For Development Environment
Google App Engine Platform As Service
• Sometimes Needs Eclipse Restart For Servlet Changes
• Need Dev Server Restart For Other Changes
• If App Fails To Deploy In Between, Rollback Using AppConfig Command And Try Again
• Do Not Use Dot (.) In Version Values
Structure of Project
Tips for Development Environment
Data Store
Error 203
Class Loading Problem
Primary Keys of Entities
Data Nucleus List Serialization
Session Handling
Logging Configuration
Running Struts
Join Queries
JSP Compilation Issue
Google App Engine Platform As Service
Salesforce
Thanks
Abhishek Chikane5 August 2011