1
Google App Engine
Alek Kowalczyk
1.10.2013
www.offiserv.com
2
LAMP vs GAELAMP vs GAE
3
LAMP vs GAELAMP vs GAE
Components:
✔Linux
✔Apache
✔MySQL
✔PHP, Python, Ruby, Perl
Components:
✔Python
Tasks:
✔ Keep secu...
4
GAE Dev EnvGAE Dev Env
Python libs:
Services:
Task Queues
Users & OAuth
XMPP
Memcache
Logs
Mail
Development server
Langu...
5
MissingMissing
Preview
6
HRD – High Replication DatastoreHRD – High Replication Datastore
Schema-less

Dynamic properties

Watch out missing
or...
7
Forget about what you know on SQL...Forget about what you know on SQL...
No planned downtimes
(I haven't noticed unplann...
8
Eventual ConsistencyEventual Consistency
GAE
High Replication
Datastore
Nope...
?
SELECT *
WHERE
name='Alex'
GAE
High Re...
9
How can I live with that?How can I live with that?
>>> ses = Session(cookie=cookie, user=user)
>>> ses.put()
# next requ...
10
BillingBilling
Google App Engine charges for:
Outgoing Bandwidth
Frontend & Backend Instances
Stored Data (Datastore...
11
Good and badGood and bad
✔New apps
✔Big data – small result sets
✔Google integration
✗Legacy apps
✗Binary code
✗CPU-int...
12
Q&A
Mobile developers needed
https://www.offiserv.com/career
13
Application Versions supportApplication Versions support
V1 V2
V2 – 70%V1 – 30%
Versioning
A/B Testing
14
Backup: Development setupBackup: Development setup
I. Create a free app on your google account:
https://appengine.googl...
15
Backup: The SandboxBackup: The Sandbox
An application cannot:
 Open a socket
 Access another host - except URL Fetch ...
Upcoming SlideShare
Loading in …5
×

Google App Engine - unusual application plaform for your next SaaS Project

757 views

Published on

OffiServ presentation on tech.3camp.pl barcamp event in Gdynia Pomeranian Science and Technology Park.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
757
On SlideShare
0
From Embeds
0
Number of Embeds
47
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • a
  • Google App Engine - unusual application plaform for your next SaaS Project

    1. 1. 1 Google App Engine Alek Kowalczyk 1.10.2013 www.offiserv.com
    2. 2. 2 LAMP vs GAELAMP vs GAE
    3. 3. 3 LAMP vs GAELAMP vs GAE Components: ✔Linux ✔Apache ✔MySQL ✔PHP, Python, Ruby, Perl Components: ✔Python Tasks: ✔ Keep secure ✔ Maintain updates ✔ Design and keep scalable ✔ Maintain load balancing Tasks: Pay monthly bills
    4. 4. 4 GAE Dev EnvGAE Dev Env Python libs: Services: Task Queues Users & OAuth XMPP Memcache Logs Mail Development server Languages:
    5. 5. 5 MissingMissing Preview
    6. 6. 6 HRD – High Replication DatastoreHRD – High Replication Datastore Schema-less  Dynamic properties  Watch out missing or type-varying columns! Database Access:  ORM:  DB API older  NDB newer – advanced caching  GQL  Low level API
    7. 7. 7 Forget about what you know on SQL...Forget about what you know on SQL... No planned downtimes (I haven't noticed unplanned ones too) Scalability 100 records query performs the same when searching in 100 records as in 1 000 000 000 records Query limitations  >, <, != conditions: one field only (who cares...)  No LIKE, GROUP BY, COUNT or SUM (again, who cares...) No JOIN queries What? 
    8. 8. 8 Eventual ConsistencyEventual Consistency GAE High Replication Datastore Nope... ? SELECT * WHERE name='Alex' GAE High Replication Datastore __key__=5 name='Alex' GAE High Replication Datastore id=5 name='Alex' SELECT * WHERE name='Alex' ?
    9. 9. 9 How can I live with that?How can I live with that? >>> ses = Session(cookie=cookie, user=user) >>> ses.put() # next request: >>> ses = GqlQuery(“SELECT * FROM Session WHERE cookie=:1”, cookie).get()  None  # or <Session object> if lucky... >>> ses = Session.all().filter('cookie', cookie).get() None  # or <Session object> if lucky... >>> ses = Session(key_name=COOKIE, user=userid, …) >>> ses.put() # next request:  >>> ses = Session.get_by_key_name(cookie)  <Session object>  # for sure Most likely won't hurt If hurts:  Entity groups/ancestor queries  Primary key queries Some code? Google BigTable is used by: Google Search, Google Maps, Gmail, YouTube, Orkut, Google Earth,...
    10. 10. 10 BillingBilling Google App Engine charges for: Outgoing Bandwidth Frontend & Backend Instances Stored Data (Datastore, Logs Data, Task Queue) Memcache Recipients Emailed SNI SSL certificates PageSpeed bandwidth DB Write Operation DB Read Operation (and more...) Free quotas for each app
    11. 11. 11 Good and badGood and bad ✔New apps ✔Big data – small result sets ✔Google integration ✗Legacy apps ✗Binary code ✗CPU-intensive / background apps ¿Big data - big result sets – runtime analytics • Integrate with Google BigQuery • MapReduce
    12. 12. 12 Q&A Mobile developers needed https://www.offiserv.com/career
    13. 13. 13 Application Versions supportApplication Versions support V1 V2 V2 – 70%V1 – 30% Versioning A/B Testing
    14. 14. 14 Backup: Development setupBackup: Development setup I. Create a free app on your google account: https://appengine.google.com/ II. Download SDK: http://goo.gl/hoK5tk III. Create WSGI python app IV. Create app.yaml configuration file V. Run app at http://localhost:8000: dev_appserver.py ­­port=8000 <app­name> VI. Upload app google credentials appcfg.py update app-name VII. http://app-name.appspot.com
    15. 15. 15 Backup: The SandboxBackup: The Sandbox An application cannot:  Open a socket  Access another host - except URL Fetch Service  Respond slowly – 60 secs  Write to the filesystem - reading is OK  Run other programs  Run binary (C) extensions – pure Python only

    ×