Google App Engine: Randomish Numbers Generator
May 6, 2008Got my invite to try out Google App Engine.
Logged in and downloaded version 1.0.1.
But then noted I also had to update python. Downloaded and installed 2.5.2.
Then installed the App Engine.
Read through the helloworld example and noted the page about GQL or Google’s “SQL-like language for retrieving data entities from the App Engine scalable datastore” (but without the joins)
Elsewhere there is the App Engine blog, a comparison to EC2 and a port of the engine to EC2.
Now to do some quick coding, an online randomish numbers generator.
import random print 'Content-Type: text/html' print '' print '' print '<a href=http://boldlentil.wordpress.com target="_blank">' print '<b>Randomish Numbers</b>' print '</a><p>' stop = 25 i = 1 while i <= stop: print random.random() print '<br>' i = i + 1
Wrote this to tools/app-engine/boldlentil/1/boldlentil.py. Also wrote a simple app.yaml using the helloworld example. From /usr/local/google_appengine can then run this simple test app using:
./dev_appserver.py /Users/boldlentil/tools/app-engine/boldlentil/1
Checking http://localhost:8080/ the app returns a screen of randomish numbers. So far so good. The simple user guide goes on to describe the web application framework but I can’t wait, let’s see if I can get this uploaded as is. Jump to http://appengine.google.com/ and now it’s time to select an Application Identifier and an Application Title. But it’s probably a good time to read the Google App Engine Terms of Use. Can’t be under 13 years old. OK. Also “the Service is provided to you without charge for up to 500MB of disk storage, 10GB incoming bandwidth per day, 10GB outgoing bandwidth per day, 200 million megacycles of CPU per day and 2,000 emails per day.” Sounds good. Finally, “by submitting, posting or displaying the Content on or through the Service you give Google a worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute such Content for the sole purpose of enabling Google to provide you with the Service in accordance with its privacy policy.” Sounds good.
You upload python and they get Content. I guess randomish numbers are content.
So next up creating an application Bold Lentil and using appcfg.py to upload the application.
./appcfg.py update /Users/boldlentil/tools/app-engine/boldlentil/1
Finally use gmail email and login to complete the upload.
Now to test it here.
It worked - and testing it only used 14.95 of my 199608.00 Gigacycles. Slick!
Tags: coding, GQL, App Engine, google, randomish numbers



May 6, 2008 at 9:42 am
I like that WordPress has associated the word feces with your blog…
May 6, 2008 at 9:59 am
Let that be a lesson - blogging about toxoplasmosis may have unanticipated side-effects.
May 6, 2008 at 11:42 am
Heh heh heh
He said feces.
Heh heh heh
May 6, 2008 at 12:05 pm
Example app works = plus one point
Pop-up sponsored links elicit repeated snark = minus one point
Zero sum post, now I could turn off the feature but -heh heh heh- it’s amusing in that automated non-sequitur sort of way.
May 6, 2008 at 12:26 pm
Your comment engine removed my custom tags. It should have been:
tag - beavis
Heh heh heh
He said feces.
Heh heh heh
end tag - beavis
May 8, 2008 at 1:30 am
[...] Google App Engine: Randomish Numbers Generator [...]
May 8, 2008 at 9:44 pm
[...] Google App Engine: Randomish Numbers Generator [...]