This presentation introduces Google App Engine (GAE), covering its architecture, pricing, development process, and key services. GAE is a platform for building scalable web applications on Google's infrastructure. It provides automatic scaling, lower costs than traditional hosting, and services for user authentication, asynchronous tasks, storage, and more. Development involves using GAE's SDKs for local testing and the admin console for deploying and managing apps. Data can be stored in GAE's NoSQL datastore or relational Cloud SQL. Key services demonstrated include the datastore, blobstore, task queues, and transactions.
15. What is Google App Engine(GAE) ?
● Google’s platform to build Web Applications on the
cloud
● Dynamic Web server
● Transactional Data Store Model
16. Why GAE?
● Automatic scaling and load balancing
● Lower total cost of ownership
● Web administration console & utilities
● Enhances developing & deploying of web applications
● Multilanguage support (Java, Python, GO, PHP)
● Fully featured SDK for local development
● Rich set of Google APIs
● Secure environment (Sandbox)
25. GAE Services
● Developers are focused on implementing custom
business logic
● Wide range of services available
○ User service
○ Blobstore
○ Task Queues
○ Mail Service
○ Image
○ Memcache, etc
26. User Services
● Provides a simple API for authentication and
authorization
○ Detect if a user is signed in App
○ Detect if a user is an admin
● Works in combination with web.xml security settings
● Three authentication options
○ Google Account
○ Google Apps domains users
○ OpenID - experimental
28. Blobstore Services
● The Blobstore Service allows your application to serve
binary objects, larger than the entities in the Datastore.
● Blobs are created by uploading files through HTTP
○ The upload and store logic is handled by the
Service
○ The HTTP request is redirected to a dispatcher, by
specified by the developer
30. Task Queues
● Task Queues allow the application to perform work,
initiated by a user request, outside of that request.
● Suitable for triggering background processes
● Different types of queues
○ Push queues
○ Pull queues
○ REST reference
32. Storing Data
● GAE provides different ways of storing application
data
○ Datastore - provides a noSQL schemaless object
datastore with a query engine and transactions
○ Google Cloud SQL - provides a relation database,
based on MySQL
○ Google Cloud Storage - provides a storage service
for objects and files up to terabytes in size
34. Datastore
● Based on Google Big Table
● NoSQL object storage
● Schemaless and Hierarchical
● No joins and aggregations
● Queries must rung against existing indexes
● Access API using an instance of the DatastoreService
Class
35. Datastore - Types
● There are two different Datastore types we can use :
○ High Replication Datastore(HRD)
○ Master / Slave Datastore
36. Datastore - Types (HRD)
● High Replication Datastore(HRD) is replicated across
multiple data centers
○ Highest level of availability
○ Higher latency on writes
○ Query data is eventually consistent
37. Datastore - Types (Master/Slave)
● Master / Slave Datastore - one data center holds
master copy of the data. Data in the master is
asynchronously copied to the slaves.
○ Periods of unavailability
○ Low latency
○ Highest level on consistency
38. Datastore - Entities
● Entities - contain key/value pairs
● Each entity has a unique key comprised of :
○ The kind of the entity (Example : Person, Human)
○ An identifier for the the individual entity that can be
■ a key name string
■ an integer numeric ID
○ An optional ancestor path locating the entity in the
Datastore hierarchy
39. Datastore - Entities (2)
● The Entity class
● Creating an Entity
○ Create an instance of the Entity class
○ pass it to the DatastoreService.put() method
● Retrieving an Entity
○ Pass an entity Key to the DatastoreService.get()
40. Datastore - Entities (3)
● Updating an Entity
○ No different between creating and updating
● Deleting an Entity
○ Pass an entity Key to the DatastoreService.delete()
method
42. Datastore - Queries
● Queries retrieve a number of entities that meet a
specified set of conditions from Datastore
● Queries can specify :
○ Entity kind
○ Zero or more filters, based on entity properties
values
○ Zero or more sort order descriptions
○ Default or you can set a limit clause
● Rung against an existing index
43. Datastore - Queries (2)
● The Query Class
○ Pass entity kind as constructor parameter
● Adding filters - Datastore Filter Class and setFilter
method
○ Property name
○ Operator - a value, defined in FilterOperator
○ Value - the value to compare to
● Sorting - addsort() method
○ Property name
○ Sort order - a value, defined in SortDirection
44. Datastore - Queries (3)
● Fetching results
○ Pass a Query instance to the DatastoreService.
prepare() method
○ Use one of the methods of the PreparedQuery
instance, returned as a result
○ Refine your results using FetchOptions
45. Datastore - Indexes
● Similar to relational database indexes
● Automatic indexed created for some queries
● Other queries require indexes to be manually created
in the datastore-indexes.xml. They include :
○ Queries with multiple sort orders
○ Queries with a sort order on keys in descending
order
○ Queries with one or more inequality filters on a
property and one or more equality filters on other
properties, etc.
47. Datastore - Transactions
● Transactions - a set of atomic operations
● Transaction type :
○ Default transactions - work on a single entity
○ Cross - group (XG) transactions - work on different
entity groups
● Getting a Transaction instance - DatastoreService.
beginTransaction()