SlideShare a Scribd company logo
1 of 15
8 rules to build web app on
 top of Google AppEngine
         effectively
        Lessons learned




            www.comvai.com
Google App Engine



ā€¢ Keep in mind Google AppEngine supports
  subset of Java EE specifications. Check at
  http://code.google.com/p/googleappengine/wiki/W



                  www.comvai.com
1. Design Data model as simple as
                possible
ā€¢   The App Engine Datastore is not traditional relational SQL database and
    there are several important differences.

ā€¢   AppEngine datastore is schemaless. Entities of the same kind can have
    different properties. The application itself is responsible for ensuring that
    entities conform to it.

ā€¢   If you want to migrate your existing data model to App Engine you will
    probably need it to redesign.

ā€¢   Data-model consistency will be split to the data-model and application.

ā€¢   Check app engine datastore limitations to understand it. It gives you better
    overview regarding your future data-model design.
    http://code.google.com/appengine/articles/datastore/overview.html
                                   www.comvai.com
How to
ā€¢   Use recommended High Replication Datastore HRD.

ā€¢   Use Objectify with JPA annotations over built-in JPA or JDO.

ā€¢   Prefer to use unowned relationships between entities.

ā€¢   Forget about count entities over filtered query result. Design your UI so
    that count is not being required.

ā€¢   If you need statistic calculations, do it on entity update.

ā€¢   Note: Building data model on top of built-in either JPA or JDO doesn't
    guarantee that application will be vendor independent because of different
    behavior of AppEngine datastore in some cases. Even it doesn't mean that's
    not possible to do so just requires understanding of AppEngine datastore
    behavior.
                                   www.comvai.com
2. Handle your data model via non
     default version of your GAE app



ā€¢   The AppEngine allows you to deploy more than one non default version of
    your application. Deploy specifically designed application to perform update
    of your data model only as a non default version to be independent from
    your main application release cycle.




                                  www.comvai.com
3. Price shields tips

ā€¢   Use Appstats out of the box tool to detect datastore bottleneck. Just plug
    in. It helps you to find the hidden unnecessary datastore operations that are
    dragging you down.

ā€¢   Use memcache. Datastore operations costs money and caching of "static"
    data could save you from using unnecessary datastore operations.

ā€¢   Use as many static files as possible. Static files are handled with high
    performance static front-end servers (CDN) which are highly optimized for
    this type of content.

ā€¢   See more
    http://www.gregtracy.com/revisiting-google-app-engines-pricing-changes

                                  www.comvai.com
4. Improve cold startup time
ā€¢   AppEngine instances starts quite often thus cold startup time (known as
    well as warmup request, loading request) is more important than in
    traditional Java EE application. Good startup time improves user experience.

ā€¢   Minimize number of your application java library dependencies as much as
    possible. Make sure if all your libs are really needed. Otherwise it will slow
    your cold startup time down.

ā€¢   Don't use JSP if you are already using another Frontend framework

ā€¢   Using JSPs will add additional libraries into your lib directory that are used
    for processing of JSP.
    http://www.listry.com/blog/2010/03/google-app-engine-cold-start-tip-dont

ā€¢   Use Objectify over built-in JPA or JDO.
    http://www.listry.com/blog/2010/03/google-app-engine-cold-start-guide-for
                                   www.comvai.com
5. Prefer Google Guice as DI framework




ā€¢   It's simple, small in size and powerful library and you probably won't need
    more.




                                  www.comvai.com
6. Use GWT for your desktop like web
                app


ā€¢   GWT together with GAE offers lot of built-in technics to improve your
    web app performance. Built-in features coming as advice from the book
    High Performance Web Sites.

ā€¢   It's better to have only one framework for the UI even it means to build
    some components yourself. Among other things it means less dependencies
    and simplified upgrade process.




                                www.comvai.com
How to GWT


ā€¢   Use built-in optimization technics with help of GWT's ClientBundles.

ā€¢   ClientBundles and ImageResource makes using images more efficient.

ā€¢   CssResource for CSS minification, CSS image strips and much more, see
    docs for ClientBundles (DataResource, TextResource,
    ExternalTextResource).

ā€¢   Switch on minification and obfuscation of the Java-JavaScript compiler.




                                  www.comvai.com
How to GAE



ā€¢   Content Delivery Network CDN

ā€¢   Gzip compression

ā€¢   Memcache




                            www.comvai.com
7. Use GWT MVP pattern




ā€¢   It's not easy to work with but worth of time. GWT has built-in support for
    MVP pattern.




                                 www.comvai.com
Benefits

ā€¢   Well suited for large scale application.

ā€¢   Separation of functionality into components. Helps simplify UI unit testing.

ā€¢   Built-in browser history management. MVP is not concerned with browser
    history management, but Activities and Places may be used very well with
    MVP development.

ā€¢   Built-in event bus as a central point for app events.

ā€¢   Caching all of your code books via GWT event bus as a central pipe to go
    to the backend.


                                   www.comvai.com
8. Use Apache Wicket for website

ā€¢   The component based web framework. Version 1.5 or higher optimized for
    Google AppEngine

ā€¢   In Java ecosystem there is a lot of front-end frameworks thus to choose the
    right one depends on many varying factors. We like Apache Wicket because
    it's Java, feature rich component-oriented framework with good API. As
    version 1.5 it very well operates on App Engine. So it's up to you and your
    requirements but ones Apache Wicket is good fit for you we recommend it.

ā€¢   Add wicketstuff-gae-initializer dependency along side with wicket core
    dependencies

ā€¢   Alternative Play framework as it has specific module for App Engine.

                                 www.comvai.com
ā€¢   Visit http://www.comvai.com/google-app-engine-development and register
    yourself to get development of your Google AppEngine project's Proof of
    Concept for free.

ā€¢   Validate suitability of your project to be built on top of Google App Engine.




                                  www.comvai.com

More Related Content

More from Aurel Medvegy

More from Aurel Medvegy (20)

Google website applications
Google website applicationsGoogle website applications
Google website applications
Ā 
Google web tools
Google web toolsGoogle web tools
Google web tools
Ā 
Google web tools kit
Google web tools kitGoogle web tools kit
Google web tools kit
Ā 
Google web software
Google web softwareGoogle web software
Google web software
Ā 
Google web development
Google web developmentGoogle web development
Google web development
Ā 
Google web code
Google web codeGoogle web code
Google web code
Ā 
Google web 2.0
Google web 2.0Google web 2.0
Google web 2.0
Ā 
Google sites development
Google sites developmentGoogle sites development
Google sites development
Ā 
Google site development
Google site developmentGoogle site development
Google site development
Ā 
Google development
Google developmentGoogle development
Google development
Ā 
Google apps reseller
Google apps resellerGoogle apps reseller
Google apps reseller
Ā 
Google apps development
Google apps developmentGoogle apps development
Google apps development
Ā 
Google appps
Google apppsGoogle appps
Google appps
Ā 
Google appengine
Google appengineGoogle appengine
Google appengine
Ā 
Google appengine apps
Google appengine appsGoogle appengine apps
Google appengine apps
Ā 
Google app
Google appGoogle app
Google app
Ā 
Google app programming
Google app programmingGoogle app programming
Google app programming
Ā 
Google app pricing
Google app pricingGoogle app pricing
Google app pricing
Ā 
Google app example
Google app exampleGoogle app example
Google app example
Ā 
Google app engine sign in
Google app engine sign inGoogle app engine sign in
Google app engine sign in
Ā 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(ā˜Žļø+971_581248768%)**%*]'#abortion pills for sale in dubai@
Ā 
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
Ā 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
Ā 
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
Ā 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Ā 
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...
Ā 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Ā 
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
Ā 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Ā 
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
Ā 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Ā 
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 ...
Ā 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Ā 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
Ā 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Ā 
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
Ā 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
Ā 
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
Ā 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Ā 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
Ā 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Ā 

Google app software

  • 1. 8 rules to build web app on top of Google AppEngine effectively Lessons learned www.comvai.com
  • 2. Google App Engine ā€¢ Keep in mind Google AppEngine supports subset of Java EE specifications. Check at http://code.google.com/p/googleappengine/wiki/W www.comvai.com
  • 3. 1. Design Data model as simple as possible ā€¢ The App Engine Datastore is not traditional relational SQL database and there are several important differences. ā€¢ AppEngine datastore is schemaless. Entities of the same kind can have different properties. The application itself is responsible for ensuring that entities conform to it. ā€¢ If you want to migrate your existing data model to App Engine you will probably need it to redesign. ā€¢ Data-model consistency will be split to the data-model and application. ā€¢ Check app engine datastore limitations to understand it. It gives you better overview regarding your future data-model design. http://code.google.com/appengine/articles/datastore/overview.html www.comvai.com
  • 4. How to ā€¢ Use recommended High Replication Datastore HRD. ā€¢ Use Objectify with JPA annotations over built-in JPA or JDO. ā€¢ Prefer to use unowned relationships between entities. ā€¢ Forget about count entities over filtered query result. Design your UI so that count is not being required. ā€¢ If you need statistic calculations, do it on entity update. ā€¢ Note: Building data model on top of built-in either JPA or JDO doesn't guarantee that application will be vendor independent because of different behavior of AppEngine datastore in some cases. Even it doesn't mean that's not possible to do so just requires understanding of AppEngine datastore behavior. www.comvai.com
  • 5. 2. Handle your data model via non default version of your GAE app ā€¢ The AppEngine allows you to deploy more than one non default version of your application. Deploy specifically designed application to perform update of your data model only as a non default version to be independent from your main application release cycle. www.comvai.com
  • 6. 3. Price shields tips ā€¢ Use Appstats out of the box tool to detect datastore bottleneck. Just plug in. It helps you to find the hidden unnecessary datastore operations that are dragging you down. ā€¢ Use memcache. Datastore operations costs money and caching of "static" data could save you from using unnecessary datastore operations. ā€¢ Use as many static files as possible. Static files are handled with high performance static front-end servers (CDN) which are highly optimized for this type of content. ā€¢ See more http://www.gregtracy.com/revisiting-google-app-engines-pricing-changes www.comvai.com
  • 7. 4. Improve cold startup time ā€¢ AppEngine instances starts quite often thus cold startup time (known as well as warmup request, loading request) is more important than in traditional Java EE application. Good startup time improves user experience. ā€¢ Minimize number of your application java library dependencies as much as possible. Make sure if all your libs are really needed. Otherwise it will slow your cold startup time down. ā€¢ Don't use JSP if you are already using another Frontend framework ā€¢ Using JSPs will add additional libraries into your lib directory that are used for processing of JSP. http://www.listry.com/blog/2010/03/google-app-engine-cold-start-tip-dont ā€¢ Use Objectify over built-in JPA or JDO. http://www.listry.com/blog/2010/03/google-app-engine-cold-start-guide-for www.comvai.com
  • 8. 5. Prefer Google Guice as DI framework ā€¢ It's simple, small in size and powerful library and you probably won't need more. www.comvai.com
  • 9. 6. Use GWT for your desktop like web app ā€¢ GWT together with GAE offers lot of built-in technics to improve your web app performance. Built-in features coming as advice from the book High Performance Web Sites. ā€¢ It's better to have only one framework for the UI even it means to build some components yourself. Among other things it means less dependencies and simplified upgrade process. www.comvai.com
  • 10. How to GWT ā€¢ Use built-in optimization technics with help of GWT's ClientBundles. ā€¢ ClientBundles and ImageResource makes using images more efficient. ā€¢ CssResource for CSS minification, CSS image strips and much more, see docs for ClientBundles (DataResource, TextResource, ExternalTextResource). ā€¢ Switch on minification and obfuscation of the Java-JavaScript compiler. www.comvai.com
  • 11. How to GAE ā€¢ Content Delivery Network CDN ā€¢ Gzip compression ā€¢ Memcache www.comvai.com
  • 12. 7. Use GWT MVP pattern ā€¢ It's not easy to work with but worth of time. GWT has built-in support for MVP pattern. www.comvai.com
  • 13. Benefits ā€¢ Well suited for large scale application. ā€¢ Separation of functionality into components. Helps simplify UI unit testing. ā€¢ Built-in browser history management. MVP is not concerned with browser history management, but Activities and Places may be used very well with MVP development. ā€¢ Built-in event bus as a central point for app events. ā€¢ Caching all of your code books via GWT event bus as a central pipe to go to the backend. www.comvai.com
  • 14. 8. Use Apache Wicket for website ā€¢ The component based web framework. Version 1.5 or higher optimized for Google AppEngine ā€¢ In Java ecosystem there is a lot of front-end frameworks thus to choose the right one depends on many varying factors. We like Apache Wicket because it's Java, feature rich component-oriented framework with good API. As version 1.5 it very well operates on App Engine. So it's up to you and your requirements but ones Apache Wicket is good fit for you we recommend it. ā€¢ Add wicketstuff-gae-initializer dependency along side with wicket core dependencies ā€¢ Alternative Play framework as it has specific module for App Engine. www.comvai.com
  • 15. ā€¢ Visit http://www.comvai.com/google-app-engine-development and register yourself to get development of your Google AppEngine project's Proof of Concept for free. ā€¢ Validate suitability of your project to be built on top of Google App Engine. www.comvai.com