SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante 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
 

Semelhante 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

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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 Processorsdebabhi2
 
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 challengesrafiqahmad00786416
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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.pptxRustici Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
"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 ...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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 businesspanagenda
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 connectorsNanddeep Nachan
 
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
 
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
 

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
"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 ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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 - 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
 
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...
 

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