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

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

If you can't read please download the document

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

OffiServ

Google App EngineAlek Kowalczyk

1.10.2013

www.offiserv.com

LAMP vs GAE

LAMP 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

a

GAE Dev Env

Python libs:

Services:

Task QueuesUsers & OAuthXMPP

MemcacheLogsMail

Development server

Languages:

Missing

Preview

HRD High Replication Datastore

Schema-lessDynamic properties

Watch out missing
or type-varying columns!

Database Access:

ORM:

DB API older

NDB newer advanced caching

GQL

Low level API

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

>, >> ses = Session(cookie=cookie, user=user)

>>> ses.put()

# next request:

>>> ses = GqlQuery(SELECT * FROM Session WHERE cookie=:1, cookie).get()

None # or if lucky...

>>> ses = Session.all().filter('cookie', cookie).get()

None # or if lucky...

>>> ses = Session(key_name=COOKIE, user=userid, )

>>> ses.put()

# next request:

>>> ses = Session.get_by_key_name(cookie)

# for sure

Most likely won't hurt

If hurts:

Entity groups/ancestor queries

Primary key queriesSome code?

Google BigTable is used by:
Google Search, Google Maps,
Gmail, YouTube, Orkut,
Google Earth,...

Billing

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

Good 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

Q&A

Mobile developers needed

https://www.offiserv.com/career

Application Versions support

V1V2V2 70%V1 30%

Versioning

A/B Testing

Backup: Development setup

Create a free app on your google account:
https://appengine.google.com/

Download SDK:
http://goo.gl/hoK5tk

Create WSGI python app

Create app.yaml configuration file

Run app at http://localhost:8000:
dev_appserver.py --port=8000

Upload app google credentials
appcfg.py update app-name

http://app-name.appspot.com

Backup: 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

Kliknij, aby edytowa format tekstu konspektuDrugi poziom konspektuTrzeci poziom konspektuCzwarty poziom konspektuPity poziom konspektuSzsty poziom konspektuSidmy poziom konspektusmy poziom konspektuDziewity poziom konspektu