Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Aleš Justin, JBoss by RedHat        JavaEE and        Google AppEngineTuesday, April 12, 2011
Agenda        • What is GAE and CDI?        • Why GAE and CDI?        • Other JavaEE technologies        • Development vs....
About me        • Old school JBoss-ian           • Microcontainer co-author           • Weld lead           • RHT Cloud “g...
GAE        • Forked Jetty        • Many (logical) restrictions        • RDBMS → BigTable        • Simple Map(Reduce)      ...
CDI        • Context and Dependency Injection        • JSR-299 → JBoss Weld RI        • “type-safe” programming        • “...
Why GAE and CDI?        • Simple reason: sandbox app        • Android app with server back-end           • Tattletale (Tož...
CDI #2        • @Inject             • @Observes        • @Qualifier          • @ConversationS.        • @Named            ...
Other technologies        • JPA        • JSF2        • BeanValidation        • javax.cache        • JSON        • ShrinkWr...
Project Kick-Off        • Know (all) restrictions!           • 30sec, white-list, no threads, ...        • How portable sh...
The Goal        • Abstract away GAE API           • Pure JavaEE           • Port app to JBossAS (6 & 7)        • Use CDI a...
Initial problems                                               Proxy                                        Bean        • ...
Initial problems        • JPA           • Limited relationships (Entity groups)              • Proxying layer vs. Custom “...
Initial problems        • JSF2           • Context parameter settings           • “new InitialContext” patch           • “...
Initial problems        • BeanValidation           • Static usage with JPA           • Size           • ConfigurationTuesd...
Initial problems        • javax.cache (GCache)           • No partition           • NUCCORE-540 → fork        • JSON      ...
“Production” problems        • CDI           • “Bean scanning” → exact listing           • “Lazy beans” → MVC re-write    ...
“Production” problems        • JPA            • Explicit entity listing            • Maximize cache usage            • “Ca...
Testing        • ShrinkWrap           • Binaries abstraction        • Arquillian           • Runtime / Env abstraction    ...
Tattletale        • Lhotse POC             • https://github.com/alesj/lhotse  Lhotse                          Server-API  ...
Q&A            ales.justin@jboss.orgTuesday, April 12, 2011
Upcoming SlideShare
Loading in …5
×

Java EE and Google App Engine

4,856 views

Published on

Java EE and Google App Engine @ JAX London

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Java EE and Google App Engine

  1. 1. Aleš Justin, JBoss by RedHat JavaEE and Google AppEngineTuesday, April 12, 2011
  2. 2. Agenda • What is GAE and CDI? • Why GAE and CDI? • Other JavaEE technologies • Development vs. Production • Problems vs. Solutions • Testing •Q & ATuesday, April 12, 2011
  3. 3. About me • Old school JBoss-ian • Microcontainer co-author • Weld lead • RHT Cloud “guinea pig” • Eager PaaS user • While still GAE amateurTuesday, April 12, 2011
  4. 4. GAE • Forked Jetty • Many (logical) restrictions • RDBMS → BigTable • Simple Map(Reduce) • Good administration • Free basic usageTuesday, April 12, 2011
  5. 5. CDI • Context and Dependency Injection • JSR-299 → JBoss Weld RI • “type-safe” programming • “contexts” concept • Easy to extend: “Extensions” • “Using CDI Extensions to Make a Better Java EE ” at 18:00Tuesday, April 12, 2011
  6. 6. Why GAE and CDI? • Simple reason: sandbox app • Android app with server back-end • Tattletale (Tožibaba) • Zero administration / configuration • Reliable up-time • No more “boiler-plate” code → CDITuesday, April 12, 2011
  7. 7. CDI #2 • @Inject • @Observes • @Qualifier • @ConversationS. • @Named • @Decorator • @Scope • @Alternative • Interceptors • @Sterotype • InjectionPoint • Instance • Pete and Dan’s • @Produces yday tutorial!Tuesday, April 12, 2011
  8. 8. Other technologies • JPA • JSF2 • BeanValidation • javax.cache • JSON • ShrinkWrap + ArquillianTuesday, April 12, 2011
  9. 9. Project Kick-Off • Know (all) restrictions! • 30sec, white-list, no threads, ... • How portable should my app be? • Development vs. Production Env! • Frameworks have problems • But they mostly have (easy) solutions → fork?Tuesday, April 12, 2011
  10. 10. The Goal • Abstract away GAE API • Pure JavaEE • Port app to JBossAS (6 & 7) • Use CDI as much as possible • Test it all, same as other JavaEE appsTuesday, April 12, 2011
  11. 11. Initial problems Proxy Bean • CDI • “Entry” mechanism • Request / response binding • Lack of “lifecycle” handlingTuesday, April 12, 2011
  12. 12. Initial problems • JPA • Limited relationships (Entity groups) • Proxying layer vs. Custom “ORM” • Transaction per “Entity group” • Old DataNucleus version • Long vs. Key entity key • “Enhanced” entities • GeoModel hashing queries (“IN”)Tuesday, April 12, 2011
  13. 13. Initial problems • JSF2 • Context parameter settings • “new InitialContext” patch • “built-in” EL 1.0 → workaroundTuesday, April 12, 2011
  14. 14. Initial problems • BeanValidation • Static usage with JPA • Size • ConfigurationTuesday, April 12, 2011
  15. 15. Initial problems • javax.cache (GCache) • No partition • NUCCORE-540 → fork • JSON • Different versions; client vs. server • Arquillian • Missing GAE containerTuesday, April 12, 2011
  16. 16. “Production” problems • CDI • “Bean scanning” → exact listing • “Lazy beans” → MVC re-write • GZIP + Base64 usage • “Fall-back / repeat” mechanismTuesday, April 12, 2011
  17. 17. “Production” problems • JPA • Explicit entity listing • Maximize cache usage • “Caching” → Lazy EMF • javax.cache • serialVersionUID • Non-primitive variables • Cache evict / clear mechanismTuesday, April 12, 2011
  18. 18. Testing • ShrinkWrap • Binaries abstraction • Arquillian • Runtime / Env abstraction • https://github.com/alesj/arquillianTuesday, April 12, 2011
  19. 19. Tattletale • Lhotse POC • https://github.com/alesj/lhotse Lhotse Server-API Tattletale Server-GAE Server-JEETuesday, April 12, 2011
  20. 20. Q&A ales.justin@jboss.orgTuesday, April 12, 2011

×