SlideShare una empresa de Scribd logo
1 de 14
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

RapidApp presentation for Cincinnati.pm
RapidApp presentation for Cincinnati.pmRapidApp presentation for Cincinnati.pm
RapidApp presentation for Cincinnati.pmHenry Van Styn
 
The power of datomic
The power of datomicThe power of datomic
The power of datomicKonrad Szydlo
 
Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014StampedeCon
 
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problems
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problemsHibernate Tips ‘n’ Tricks - 15 Tips to solve common problems
Hibernate Tips ‘n’ Tricks - 15 Tips to solve common problemsThorben Janssen
 
Elasticsearch { "Meetup" : "talk" }
Elasticsearch { "Meetup" : "talk" }Elasticsearch { "Meetup" : "talk" }
Elasticsearch { "Meetup" : "talk" }Lutf Ur Rehman
 
Java 8 in action.Jinq
Java 8 in action.JinqJava 8 in action.Jinq
Java 8 in action.JinqStrannik_2013
 
Development without Constraint
Development without ConstraintDevelopment without Constraint
Development without ConstraintChad Davis
 
Feeds is my Friend: a Drupal 6 to 7 Migration story
Feeds is my Friend: a Drupal 6 to 7 Migration storyFeeds is my Friend: a Drupal 6 to 7 Migration story
Feeds is my Friend: a Drupal 6 to 7 Migration storyAdelle Frank
 
Drupalize your data use entities
Drupalize your data use entitiesDrupalize your data use entities
Drupalize your data use entities均民 戴
 
Python training in hyderabad
Python training in hyderabadPython training in hyderabad
Python training in hyderabadRajitha D
 
JIRA Development
JIRA DevelopmentJIRA Development
JIRA DevelopmentSperasoft
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Integrating Doctrine with Laravel
Integrating Doctrine with LaravelIntegrating Doctrine with Laravel
Integrating Doctrine with LaravelMark Garratt
 
Hibernate Performance Tuning @JUG Thüringen
Hibernate Performance Tuning @JUG ThüringenHibernate Performance Tuning @JUG Thüringen
Hibernate Performance Tuning @JUG ThüringenThorben Janssen
 
Restful Best Practices
Restful Best PracticesRestful Best Practices
Restful Best PracticesBelighted
 

La actualidad más candente (19)

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

Destacado

CZNIC: Správa internetu, routing a IPv6
CZNIC: Správa internetu, routing a IPv6CZNIC: Správa internetu, routing a IPv6
CZNIC: Správa internetu, routing a IPv6Tomáš Holas
 
Gwt frameworky GXT + UJORM
Gwt frameworky GXT + UJORMGwt frameworky GXT + UJORM
Gwt frameworky GXT + UJORMTomáš Holas
 
Ondra Kučera: Otevřený web a jeho současný stav
Ondra Kučera: Otevřený web a jeho současný stavOndra Kučera: Otevřený web a jeho současný stav
Ondra Kučera: Otevřený web a jeho současný stavTomáš Holas
 

Destacado (9)

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

Similar a Google App Engine - exploiting limitations

springdatajpa-up.pdf
springdatajpa-up.pdfspringdatajpa-up.pdf
springdatajpa-up.pdfssuser0562f1
 
Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreIMC Institute
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料Shinichi Ogawa
 
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...Joaquin Delgado PhD.
 
RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning...
 RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning... RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning...
RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning...S. Diana Hu
 
Building Rich Internet Applications with Ext JS
Building Rich Internet Applications  with Ext JSBuilding Rich Internet Applications  with Ext JS
Building Rich Internet Applications with Ext JSMats Bryntse
 
hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfPatiento Del Mar
 
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMKilling Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMOrtus Solutions, Corp
 
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015Matt Raible
 
How DITA Got Her Groove Back: Going Mapless with Don Day
How DITA Got Her Groove Back: Going Mapless with Don DayHow DITA Got Her Groove Back: Going Mapless with Don Day
How DITA Got Her Groove Back: Going Mapless with Don DayInformation Development World
 
ORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 SpecificationsORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 SpecificationsAhmed Ramzy
 
Data Abstraction for Large Web Applications
Data Abstraction for Large Web ApplicationsData Abstraction for Large Web Applications
Data Abstraction for Large Web Applicationsbrandonsavage
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingManish Pandit
 

Similar a Google App Engine - exploiting limitations (20)

Gaej For Beginners
Gaej For BeginnersGaej For Beginners
Gaej For Beginners
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Where to save my data, for devs!
Where to save my data, for devs!Where to save my data, for devs!
Where to save my data, for devs!
 
springdatajpa-up.pdf
springdatajpa-up.pdfspringdatajpa-up.pdf
springdatajpa-up.pdf
 
Java Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : DatastoreJava Web Programming on Google Cloud Platform [2/3] : Datastore
Java Web Programming on Google Cloud Platform [2/3] : Datastore
 
Hibernate
HibernateHibernate
Hibernate
 
Introduction to Datastore
Introduction to DatastoreIntroduction to Datastore
Introduction to Datastore
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料
 
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
 
RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning...
 RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning... RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning...
RecSys 2015 Tutorial – Scalable Recommender Systems: Where Machine Learning...
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
 
Building Rich Internet Applications with Ext JS
Building Rich Internet Applications  with Ext JSBuilding Rich Internet Applications  with Ext JS
Building Rich Internet Applications with Ext JS
 
hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdf
 
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMKilling Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
 
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
#NoXML: Eliminating XML in Spring Projects - SpringOne 2GX 2015
 
How DITA Got Her Groove Back: Going Mapless with Don Day
How DITA Got Her Groove Back: Going Mapless with Don DayHow DITA Got Her Groove Back: Going Mapless with Don Day
How DITA Got Her Groove Back: Going Mapless with Don Day
 
Node.js
Node.jsNode.js
Node.js
 
ORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 SpecificationsORM Concepts and JPA 2.0 Specifications
ORM Concepts and JPA 2.0 Specifications
 
Data Abstraction for Large Web Applications
Data Abstraction for Large Web ApplicationsData Abstraction for Large Web Applications
Data Abstraction for Large Web Applications
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 

Último

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...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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, ...apidays
 
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 FMESafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
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 DiscoveryTrustArc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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 WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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, ...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

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