SlideShare a Scribd company logo
Google App Engine
    exploiting limitations




        Tomáš Holas
What is App Engine?
• Run your web applications on Google’s
  infrastructure
• PaaS = Platform as a Service
• Automatic scaling
• Need to comply to platform’s rules
• Application is sandboxed
• Production environment simulated by SDK
• Python, Java, and other JVM languages
• Supports most web frameworks
What are the rules?
• Read-only filesystem
• 30s time to respond
• No socket connections
• No processes or threads
• No system calls
• Limit on number and size of files
• Quotas on system resources
Everything through API
• URL Fetch
• Mail
• Images
• Google Accounts
• CRON
• Task Queues
• XMPP (Jabber)
• Memcached
Google Datastore
• Distributed database
• Base on BigTable
• Supports transactions and partitioning
• Supports hierarchies
• Not a relational database
• No schema
• No SQL
Datastore principle

• Primary building block: Entity
 • All entities stored in one “table”
 • Each entity has it’s Kind
   •   instead of being in a separate table

 • Entity’s key is unique across Kind’s
 • Entity Groups - hierarchical structures
 • Entity has 0..N Properties
Vlastnosti Entit
• Each Entity can have any combination of
   attributes.
  •   Two entites of the same kind can have different properties

• Multivalue properties are supported (ie. Array)
  •   this can be used for 1:N and M:N relations

• Each entity can have it’s parrent
  •   It’s possible to construct hierarchical structures

  •   Hierarchies are used for automatic partitioning of the database

  •   Transactions are possible only across Entity Group members
Datastore limitations
•   Not using SQL, only GQL (Python) or JDOQL (Java)

•   No joins support, not even anything similar

•   No database constraints

•   No aggregation functions (count, avg, min, max…)

•   Maximum of 1000 records from one query. It’s not possible to go over
    this limitation using offset, but cursors support is planned.

•   Inequality filter on one property only
    SELECT * FROM Person WHERE
    birth_year >= 1980 AND birth_year <= 2009
    SELECT * FROM Person WHERE
    birth_year >= 1980 AND height >= 180

•   No global transactions - only inside Entity Group

•   No ad-hoc query support. Each type of query needs to have it’s own
    index configured. SDK does this automatically.
How to cope with this?
• Consider suitability of the platform
  •   Is it even possible to implement my project?

• Change mindset
• Change the way application is designed
  •   Forget relational database stereotypes

• Exploit Datastore’
  •   Simplicity, speed, versatility, multivalue attributes…

• Denormalize!
• Transfer the data consistence responsibility from
   database to application
Python API
class Person(db.Model):
  first_name = db.StringProperty()
  last_name = db.StringProperty()
  hobbies = db.StringListProperty()

p = Person(first_name = "Albert", last_name = "Johnson")
p.hobbies = ["chess", "travel"]

query = db.Query(Person)
query.filter("last_name = ", "Johnson")
results = query.fetch
Java API
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Person {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

      @Persistent
      private String firstName;

      @Persistent
      private String lastName;

      @Persistent
      List<String> hobbies;
  }

Query query = pm.newQuery(Person.class);
query.setFilter("lastName == 'Johnson'");
List<Employee> results = (List<Employee>) query.execute();
DEMO !
Conclusion

• App Engine easy development of
  scalable web applications
• Be careful of specific limitations
• Suitable for very small or very large
  projects
• It’s getting better every day
Thank you!
  tomas.holas@gmail.com
  linkedin.com/in/tomash
facebook.com/tomas.holas
    twitter.com/tomaash

More Related Content

PDF
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
PDF
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
KEY
Preliminary committee presentation
PPT
Finding knowledge, data and answers on the Semantic Web
PDF
Core Java Training in Bangalore | Best Core Java Class in Bangalore
PPTX
NoSQL Tel Aviv Meetup#1: NoSQL Data Modeling
PDF
SDEC2011 NoSQL Data modelling
PPTX
Modeling JSON data for NoSQL document databases
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Preliminary committee presentation
Finding knowledge, data and answers on the Semantic Web
Core Java Training in Bangalore | Best Core Java Class in Bangalore
NoSQL Tel Aviv Meetup#1: NoSQL Data Modeling
SDEC2011 NoSQL Data modelling
Modeling JSON data for NoSQL document databases

What's hot (19)

PDF
Introduction to datomic
PPT
RapidApp presentation for Cincinnati.pm
PDF
The power of datomic
PDF
Datomic – A Modern Database - StampedeCon 2014
PPTX
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problems
PPTX
Elasticsearch { "Meetup" : "talk" }
PPTX
Java 8 in action.Jinq
PDF
Development without Constraint
PPT
Feeds is my Friend: a Drupal 6 to 7 Migration story
PDF
Drupalize your data use entities
PPTX
Python training in hyderabad
PDF
JIRA Development
PPTX
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
PDF
Integrating Doctrine with Laravel
PPTX
Hibernate Performance Tuning @JUG Thüringen
PPTX
MongoDB
PPTX
PDF
Restful Best Practices
PPTX
SQL Provider
Introduction to datomic
RapidApp presentation for Cincinnati.pm
The power of datomic
Datomic – A Modern Database - StampedeCon 2014
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problems
Elasticsearch { "Meetup" : "talk" }
Java 8 in action.Jinq
Development without Constraint
Feeds is my Friend: a Drupal 6 to 7 Migration story
Drupalize your data use entities
Python training in hyderabad
JIRA Development
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Integrating Doctrine with Laravel
Hibernate Performance Tuning @JUG Thüringen
MongoDB
Restful Best Practices
SQL Provider
Ad

Viewers also liked (9)

PDF
PDF
CZNIC: Správa internetu, routing a IPv6
PDF
Základy GWT
PDF
Gwt frameworky GXT + UJORM
PDF
Úvod do rails
PDF
Úvod do OOP
ODP
Ondra Kučera: Otevřený web a jeho současný stav
PDF
Google App Engine
ODP
Začínáme iOS vývoj
CZNIC: Správa internetu, routing a IPv6
Základy GWT
Gwt frameworky GXT + UJORM
Úvod do rails
Úvod do OOP
Ondra Kučera: Otevřený web a jeho současný stav
Google App Engine
Začínáme iOS vývoj
Ad

Similar to Google App Engine - exploiting limitations (20)

PPT
Google App Engine
KEY
Appengine Nljug
PPT
The 90-Day Startup with Google AppEngine for Java
PDF
I've (probably) been using Google App Engine for a week longer than you have
PDF
Google Developer Days Brazil 2009 - Java Appengine
PDF
Google app engine - Soft Uni 19.06.2014
PPTX
Google app engine
PPTX
Googleappengineintro 110410190620-phpapp01
PPT
PyCon India 2010 Building Scalable apps using appengine
PDF
Introduction to App Engine Development
PPT
LatJUG. Google App Engine
PDF
Google App Engine Developer - Day2
PDF
Java Support On Google App Engine
PDF
Developing, deploying and monitoring Java applications using Google App Engine
PPT
Google App Engine for Java
PDF
Google App Engine for Java
PPTX
Introduction to Google App Engine
PDF
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
PPTX
Google appenginejava.ppt
PPT
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Google App Engine
Appengine Nljug
The 90-Day Startup with Google AppEngine for Java
I've (probably) been using Google App Engine for a week longer than you have
Google Developer Days Brazil 2009 - Java Appengine
Google app engine - Soft Uni 19.06.2014
Google app engine
Googleappengineintro 110410190620-phpapp01
PyCon India 2010 Building Scalable apps using appengine
Introduction to App Engine Development
LatJUG. Google App Engine
Google App Engine Developer - Day2
Java Support On Google App Engine
Developing, deploying and monitoring Java applications using Google App Engine
Google App Engine for Java
Google App Engine for Java
Introduction to Google App Engine
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
Google appenginejava.ppt
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Spectroscopy.pptx food analysis technology
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Machine Learning_overview_presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
MIND Revenue Release Quarter 2 2025 Press Release
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MYSQL Presentation for SQL database connectivity
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectroscopy.pptx food analysis technology
A comparative analysis of optical character recognition models for extracting...
20250228 LYD VKU AI Blended-Learning.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Machine Learning_overview_presentation.pptx
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...

Google App Engine - exploiting limitations

  • 1. Google App Engine exploiting limitations Tomáš Holas
  • 2. What is App Engine? • Run your web applications on Google’s infrastructure • PaaS = Platform as a Service • Automatic scaling • Need to comply to platform’s rules • Application is sandboxed • Production environment simulated by SDK • Python, Java, and other JVM languages • Supports most web frameworks
  • 3. What are the rules? • Read-only filesystem • 30s time to respond • No socket connections • No processes or threads • No system calls • Limit on number and size of files • Quotas on system resources
  • 4. Everything through API • URL Fetch • Mail • Images • Google Accounts • CRON • Task Queues • XMPP (Jabber) • Memcached
  • 5. Google Datastore • Distributed database • Base on BigTable • Supports transactions and partitioning • Supports hierarchies • Not a relational database • No schema • No SQL
  • 6. Datastore principle • Primary building block: Entity • All entities stored in one “table” • Each entity has it’s Kind • instead of being in a separate table • Entity’s key is unique across Kind’s • Entity Groups - hierarchical structures • Entity has 0..N Properties
  • 7. Vlastnosti Entit • Each Entity can have any combination of attributes. • Two entites of the same kind can have different properties • Multivalue properties are supported (ie. Array) • this can be used for 1:N and M:N relations • Each entity can have it’s parrent • It’s possible to construct hierarchical structures • Hierarchies are used for automatic partitioning of the database • Transactions are possible only across Entity Group members
  • 8. Datastore limitations • Not using SQL, only GQL (Python) or JDOQL (Java) • No joins support, not even anything similar • No database constraints • No aggregation functions (count, avg, min, max…) • Maximum of 1000 records from one query. It’s not possible to go over this limitation using offset, but cursors support is planned. • Inequality filter on one property only SELECT * FROM Person WHERE birth_year >= 1980 AND birth_year <= 2009 SELECT * FROM Person WHERE birth_year >= 1980 AND height >= 180 • No global transactions - only inside Entity Group • No ad-hoc query support. Each type of query needs to have it’s own index configured. SDK does this automatically.
  • 9. How to cope with this? • Consider suitability of the platform • Is it even possible to implement my project? • Change mindset • Change the way application is designed • Forget relational database stereotypes • Exploit Datastore’ • Simplicity, speed, versatility, multivalue attributes… • Denormalize! • Transfer the data consistence responsibility from database to application
  • 10. Python API class Person(db.Model): first_name = db.StringProperty() last_name = db.StringProperty() hobbies = db.StringListProperty() p = Person(first_name = "Albert", last_name = "Johnson") p.hobbies = ["chess", "travel"] query = db.Query(Person) query.filter("last_name = ", "Johnson") results = query.fetch
  • 11. Java API @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Person { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String firstName; @Persistent private String lastName; @Persistent List<String> hobbies; } Query query = pm.newQuery(Person.class); query.setFilter("lastName == 'Johnson'"); List<Employee> results = (List<Employee>) query.execute();
  • 13. Conclusion • App Engine easy development of scalable web applications • Be careful of specific limitations • Suitable for very small or very large projects • It’s getting better every day
  • 14. Thank you! tomas.holas@gmail.com linkedin.com/in/tomash facebook.com/tomas.holas twitter.com/tomaash