SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Aleš Justin, JBoss by RedHat


        JavaEE and
        Google AppEngine

Tuesday, April 12, 2011
Agenda

        • What is GAE and CDI?
        • Why GAE and CDI?
        • Other JavaEE technologies
        • Development vs. Production
        • Problems vs. Solutions
        • Testing
        •Q & A
Tuesday, April 12, 2011
About me


        • Old school JBoss-ian
           • Microcontainer co-author
           • Weld lead
           • RHT Cloud “guinea pig”
        • Eager PaaS user
           • While still GAE amateur

Tuesday, April 12, 2011
GAE


        • Forked Jetty
        • Many (logical) restrictions
        • RDBMS → BigTable
        • Simple Map(Reduce)
        • Good administration
        • Free basic usage

Tuesday, April 12, 2011
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:00
Tuesday, April 12, 2011
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 → CDI

Tuesday, April 12, 2011
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
Other technologies


        • JPA
        • JSF2
        • BeanValidation
        • javax.cache
        • JSON
        • ShrinkWrap + Arquillian

Tuesday, April 12, 2011
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
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 apps

Tuesday, April 12, 2011
Initial problems
                                               Proxy




                                        Bean


        • CDI
           • “Entry” mechanism
           • Request / response binding
           • Lack of “lifecycle” handling


Tuesday, April 12, 2011
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
Initial problems


        • JSF2
           • Context parameter settings
           • “new InitialContext” patch
           • “built-in” EL 1.0 → workaround


Tuesday, April 12, 2011
Initial problems


        • BeanValidation
           • Static usage with JPA
           • Size
           • Configuration


Tuesday, April 12, 2011
Initial problems

        • javax.cache (GCache)
           • No partition
           • NUCCORE-540 → fork
        • JSON
           • Different versions; client vs. server
        • Arquillian
           • Missing GAE container
Tuesday, April 12, 2011
“Production” problems


        • CDI
           • “Bean scanning” → exact listing
           • “Lazy beans” → MVC re-write
           • GZIP + Base64 usage
           • “Fall-back / repeat” mechanism

Tuesday, April 12, 2011
“Production” problems

        • JPA
            • Explicit entity listing
            • Maximize cache usage
            • “Caching” → Lazy EMF
        • javax.cache
            • serialVersionUID
            • Non-primitive variables
            • Cache evict / clear mechanism
Tuesday, April 12, 2011
Testing


        • ShrinkWrap
           • Binaries abstraction
        • Arquillian
           • Runtime / Env abstraction
           • https://github.com/alesj/arquillian

Tuesday, April 12, 2011
Tattletale

        • Lhotse POC
             • https://github.com/alesj/lhotse
  Lhotse

                          Server-API                    Tattletale




      Server-GAE                       Server-JEE




Tuesday, April 12, 2011
Q&A

            ales.justin@jboss.org




Tuesday, April 12, 2011

Contenu connexe

Tendances

GlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsGlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 Applications
Arun Gupta
 
Java EE Servlet/JSP Tutorial- Cookbook 2
Java EE Servlet/JSP Tutorial- Cookbook 2Java EE Servlet/JSP Tutorial- Cookbook 2
Java EE Servlet/JSP Tutorial- Cookbook 2
billdigman
 

Tendances (20)

Eureka moment
Eureka momentEureka moment
Eureka moment
 
GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...
GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...
GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...
 
LatJUG. JSF2.0 - The JavaEE6 Standard
LatJUG. JSF2.0 - The JavaEE6 StandardLatJUG. JSF2.0 - The JavaEE6 Standard
LatJUG. JSF2.0 - The JavaEE6 Standard
 
XPages and Java (DanNotes 50th conference, November 2013)
XPages and Java (DanNotes 50th conference, November 2013)XPages and Java (DanNotes 50th conference, November 2013)
XPages and Java (DanNotes 50th conference, November 2013)
 
Just enough app server
Just enough app serverJust enough app server
Just enough app server
 
GlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsGlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 Applications
 
Liberty: The Right Fit for Micro Profile?
Liberty: The Right Fit for Micro Profile?Liberty: The Right Fit for Micro Profile?
Liberty: The Right Fit for Micro Profile?
 
OSGi Community Event 2010 - OSGi and Android
OSGi Community Event 2010 - OSGi and AndroidOSGi Community Event 2010 - OSGi and Android
OSGi Community Event 2010 - OSGi and Android
 
Java EE Servlet/JSP Tutorial- Cookbook 2
Java EE Servlet/JSP Tutorial- Cookbook 2Java EE Servlet/JSP Tutorial- Cookbook 2
Java EE Servlet/JSP Tutorial- Cookbook 2
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)
 
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
Deploying Java EE 6 Apps in a Cluster: GlassFish 3.1 at Dallas Tech Fest 2011
 
Java EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan Gallimore
Java EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan GallimoreJava EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan Gallimore
Java EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan Gallimore
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Better Career with Java
Better Career with JavaBetter Career with Java
Better Career with Java
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomaven
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
Play framework
Play frameworkPlay framework
Play framework
 

Similaire à Java EE and Google App Engine

SeaJUG May 2012 mybatis
SeaJUG May 2012 mybatisSeaJUG May 2012 mybatis
SeaJUG May 2012 mybatis
Will Iverson
 
HootSuite Dev 2
HootSuite Dev 2HootSuite Dev 2
HootSuite Dev 2
ujihisa
 
Odnoklassniki.ru Architecture
Odnoklassniki.ru ArchitectureOdnoklassniki.ru Architecture
Odnoklassniki.ru Architecture
Dmitry Buzdin
 
[JVMLS 12] Kotlin / Java Interop
[JVMLS 12] Kotlin / Java Interop[JVMLS 12] Kotlin / Java Interop
[JVMLS 12] Kotlin / Java Interop
Andrey Breslav
 
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Guillaume Laforge
 
Spring Data NHJUG April 2012
Spring Data NHJUG April 2012Spring Data NHJUG April 2012
Spring Data NHJUG April 2012
trisberg
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
 

Similaire à Java EE and Google App Engine (20)

Iwmn architecture
Iwmn architectureIwmn architecture
Iwmn architecture
 
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
 
Stardog talk-dc-march-17
Stardog talk-dc-march-17Stardog talk-dc-march-17
Stardog talk-dc-march-17
 
SeaJUG May 2012 mybatis
SeaJUG May 2012 mybatisSeaJUG May 2012 mybatis
SeaJUG May 2012 mybatis
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM Alternative
 
HootSuite Dev 2
HootSuite Dev 2HootSuite Dev 2
HootSuite Dev 2
 
JavaEE 6 tools coverage
JavaEE 6 tools coverageJavaEE 6 tools coverage
JavaEE 6 tools coverage
 
Lucene, Solr and java 9 - opportunities and challenges
Lucene, Solr and java 9 - opportunities and challengesLucene, Solr and java 9 - opportunities and challenges
Lucene, Solr and java 9 - opportunities and challenges
 
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
 
Odnoklassniki.ru Architecture
Odnoklassniki.ru ArchitectureOdnoklassniki.ru Architecture
Odnoklassniki.ru Architecture
 
[JVMLS 12] Kotlin / Java Interop
[JVMLS 12] Kotlin / Java Interop[JVMLS 12] Kotlin / Java Interop
[JVMLS 12] Kotlin / Java Interop
 
Better front-end development in Atlassian plugins
Better front-end development in Atlassian pluginsBetter front-end development in Atlassian plugins
Better front-end development in Atlassian plugins
 
History of Java 2/2
History of Java 2/2History of Java 2/2
History of Java 2/2
 
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
 
Spring Data NHJUG April 2012
Spring Data NHJUG April 2012Spring Data NHJUG April 2012
Spring Data NHJUG April 2012
 
Integrating ECM (WebCenter Content) with your Enterprise! 5 Tips to Try, 5 Tr...
Integrating ECM (WebCenter Content) with your Enterprise! 5 Tips to Try, 5 Tr...Integrating ECM (WebCenter Content) with your Enterprise! 5 Tips to Try, 5 Tr...
Integrating ECM (WebCenter Content) with your Enterprise! 5 Tips to Try, 5 Tr...
 
Perl Testing Consideration (seen from other languages)
Perl Testing Consideration (seen from other languages)Perl Testing Consideration (seen from other languages)
Perl Testing Consideration (seen from other languages)
 
Devoxx Java Social and Agorava
Devoxx Java Social and AgoravaDevoxx Java Social and Agorava
Devoxx Java Social and Agorava
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
 
Introduction to Java 7 (Devoxx Nov/2011)
Introduction to Java 7 (Devoxx Nov/2011)Introduction to Java 7 (Devoxx Nov/2011)
Introduction to Java 7 (Devoxx Nov/2011)
 

Plus de Arun Gupta

Plus de Arun Gupta (20)

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 
NoSQL - Vital Open Source Ingredient for Modern Success
NoSQL - Vital Open Source Ingredient for Modern SuccessNoSQL - Vital Open Source Ingredient for Modern Success
NoSQL - Vital Open Source Ingredient for Modern Success
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Java EE and Google App Engine

  • 1. Aleš Justin, JBoss by RedHat JavaEE and Google AppEngine Tuesday, April 12, 2011
  • 2. Agenda • What is GAE and CDI? • Why GAE and CDI? • Other JavaEE technologies • Development vs. Production • Problems vs. Solutions • Testing •Q & A Tuesday, April 12, 2011
  • 3. About me • Old school JBoss-ian • Microcontainer co-author • Weld lead • RHT Cloud “guinea pig” • Eager PaaS user • While still GAE amateur Tuesday, April 12, 2011
  • 4. GAE • Forked Jetty • Many (logical) restrictions • RDBMS → BigTable • Simple Map(Reduce) • Good administration • Free basic usage Tuesday, April 12, 2011
  • 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:00 Tuesday, April 12, 2011
  • 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 → CDI Tuesday, April 12, 2011
  • 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. Other technologies • JPA • JSF2 • BeanValidation • javax.cache • JSON • ShrinkWrap + Arquillian Tuesday, April 12, 2011
  • 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. 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 apps Tuesday, April 12, 2011
  • 11. Initial problems Proxy Bean • CDI • “Entry” mechanism • Request / response binding • Lack of “lifecycle” handling Tuesday, April 12, 2011
  • 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. Initial problems • JSF2 • Context parameter settings • “new InitialContext” patch • “built-in” EL 1.0 → workaround Tuesday, April 12, 2011
  • 14. Initial problems • BeanValidation • Static usage with JPA • Size • Configuration Tuesday, April 12, 2011
  • 15. Initial problems • javax.cache (GCache) • No partition • NUCCORE-540 → fork • JSON • Different versions; client vs. server • Arquillian • Missing GAE container Tuesday, April 12, 2011
  • 16. “Production” problems • CDI • “Bean scanning” → exact listing • “Lazy beans” → MVC re-write • GZIP + Base64 usage • “Fall-back / repeat” mechanism Tuesday, April 12, 2011
  • 17. “Production” problems • JPA • Explicit entity listing • Maximize cache usage • “Caching” → Lazy EMF • javax.cache • serialVersionUID • Non-primitive variables • Cache evict / clear mechanism Tuesday, April 12, 2011
  • 18. Testing • ShrinkWrap • Binaries abstraction • Arquillian • Runtime / Env abstraction • https://github.com/alesj/arquillian Tuesday, April 12, 2011
  • 19. Tattletale • Lhotse POC • https://github.com/alesj/lhotse Lhotse Server-API Tattletale Server-GAE Server-JEE Tuesday, April 12, 2011
  • 20. Q&A ales.justin@jboss.org Tuesday, April 12, 2011