Google App Engine Hackathon San Francisco

Just arrived at 345 Spear St (4th floor, aka the Google floor) for the San Francisco App Engine Hackathon. I’m going to make a best effort at updating this throughout the day, and a more concerted effort to reconcile my notes at the end of the day.

More updates soon, things are starting to roll.

10:03: Google docs presentation up on screens / projectors

10:15: Brief announcement — people are still trickling in so we’re waiting another 10-15 minutes.

10:20: I just uploaded the hello world for my pet application “Engine Snippets” it was as simple as editing app.yaml, cd’ing up one directory and running appcfg.py update enginesnippets (which prompts you for your email, and password) — I’m going to be doing this a lot so I’ve created a bash alias to make my life easy:

alias gaeup=”appcfg.py update ../enginesnippets”

10:30: room filling — slight modification of agenda — All Googlers are introducing themselves — we’re being told to keep our eyes on people with Google or Google App Engine tee shirts. Also, app engine accounts are being handed out.

10:30 Agenda being presented:

  • (10:30 -> 11:10) Getting Started
  • (11:10 -> 11:20) Intro to Googlers
  • (12:30) -> Lunch + debugging (rumors of pizza)

Talking about Mac Engine Launcher (covered last night) — very slick Mac GUI for deploying App Engine applications and integrates with Mac text editors, IDEs

We’ll be hacking on a basic Wiki today, code is available for all here

Talking about DataStore DataTypes, all the usual suspects with a few implentation choices: IntegerProperty, FloatProperty, BooleanProperty, StringProperty, TextProperty, DateTimeProperty, ListProperty, ReferenceProperty, SelfReferenceProperty, UserProperty, BlobProperty, LinkProperty, EmailProperty…etc
You define Models using python class (Similar to Django models) call put() to add to data store (BigTable)

Guido Van Rossum, inventor of Python and Googler is in the room.

object = Wikipage(title=foo)

object.put()

object.delete()

GQL is like a Simple SQL, similar semantics. Google App API handles ORM mapping to defined models. GQL can query with named parameters.

app.yaml is where everything is configured, this is where name and version of application are configured. Handlers (URL Routing) is also defined in app.yaml.

application: appengine-app
version: 1
runtime: python
api_version: 1

handlers:
- url: .*
script: main.py

WSGI uses request handlers to serve pages (very similar to CGI … CGI-NG might have been a better name).

Talking about views, and Http Redirects.

GAE Doesn’t have any required flush, but buffers output and doesn’t stream response (details abstracted by GAE API)

Looking at Django templates — see django documentation, same stuff.

Speaker going fast, going through wiki-example, hard to type at same speed — might have to revisit later.

The DataStore API can auto update DateTimeProperty via auto_now_add=True

11:18:
(Names typed phonetically, many apologies for butchered names)

Dick Wall introduces himself (speaker) — Google Developer Evangelist, currently working

Ryan Berret, DATA STORE

Bret SDK, Python

Alohn Navi Admin Console

Kevin Gibbs TechLead

John UI Designer

Joshn Rebowski Launcher Mac

Dan O’Brian Dev Support (General Questions)

Guido Van Rossum: PYTHON

11:26: Pointing out differences in DataStore vs traditional DB — no schema, only code. Inheritance should work as expected, you define the models via python (See Django), and GAE Api handles ORM mapping to BigTable

11:44: Someone asked about pricing — Googler said it was undecided after limits (see current limits). No time line for announcing pricing — but they say will be competitive with Amazon AWS. This is kind of a big deal, and I’m a little annoyed that there hasn’t been any movement on pricing since the preview launch.

11:52: Awaiting rumored pizza — I’m starting to play around with the local dev server from my project working directory I simply typed the following (see below) and was greeted with pretty errors informing me of all things broken.

dev_appserver.py .

12:00: Just finished Mango Madeness snapple , my fact: Fish Can Drown. My Take: So can products without pricing.

12:05: The pizza is a lie! I feel betrayed, but that will come out in therapy a few years from now. I had to settle for a superb tuna sandwich and delicious salad with walnuts and a balsamic dressing. Overheard: Guido lamenting an Asus Eee Keyboard “I can’t, I just can’t use this…” hands back to owner.

12:25: Playing around with the local dev server I keep on getting the following warnings on STDOUT

WARNING 2008-05-16 19:24:58,045 datastore_file_stub.py] Could not read datastore data from /tmp/dev_appserver.datastore
WARNING 2008-05-16 19:24:58,045 datastore_file_stub.py] Could not read datastore data from /tmp/dev_appserver.datastore.history

Will revisit and fix this later.

12:35: Lunch time talk, covering tools (IDEs…etc) — We’ve already looked at the Mac only App Engine launcher. Mac is obviously well supported for Python, TextMate is the defacto editor. There is a Django-bundle for TextMate. Komodo Edit (ActiveState) not as complete (in terms of code completion) as TextMate, but getting props, and cross platform. Debugging is a bit of a pain point — Apparently Eclipse and PyDEV have good python debugging support. Covering Admin interface on local dev server, browse to: http://localhost:8080/_ah/admin/datastore — Also has interactive console for python, and interface to Data Store.

1:08: Things are picking up again, talking about the user authentication API, and authentication sources (GMail, Google Accounts for your domain…etc)

1:25: Tip on how to generate images from binary data in db.BlobProperty types http://code.google.com/appengine/articles/images.html

1:54: More hacking, here is a thread on Google App Engine best practices

2:40 looking at fetch and mail API as part of wiki example. Google App Engine instances can’t write to files ystem, nor can they open sockets to make network requests, must go through Fetcher api. URLFetch Responses has properties headers, status_code, content, content_was_truncated, and does not follow redirects.

Mail API — must specificy sender (admin of GAE application) can set other properties

2:57: Running into this error when trying to query DataStore API: SystemError: Parent module ‘google.appengine.ext.db’ not loaded — speaking with Bret , this seems to be an issue in the API or possibly (gasp) the interpreter getting into a funky state — restarting the development server cleared it up. Another dude ran into the same issue here

4:00pm: Talking about Google Data APIs — code.google.com/apis/gdata

Python API — usable on Google App Engine — gdata-python-client (via URLFetch API)

Article on using GDATA from Google App Engine

I’m looking at pygments for syntax highlighting — might not be app engine friendly — will have to investigate later.

Looking at GeoDataStore code here

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • Reddit