Google App Engine: Randomish Numbers Generator

May 6, 2008

Got 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= 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/ Also wrote a simple app.yaml using the helloworld example. From /usr/local/google_appengine can then run this simple test app using:

./ /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 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 to upload the application.

./ 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!


7 Responses to “Google App Engine: Randomish Numbers Generator”

  1. BleedSnoot Says:

    I like that WordPress has associated the word feces with your blog…

  2. boldlentil Says:

    Let that be a lesson – blogging about toxoplasmosis may have unanticipated side-effects.

  3. pfmagic Says:

    Heh heh heh
    He said feces.
    Heh heh heh

  4. boldlentil Says:

    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.

  5. pfmagic Says:

    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

  6. […] Google App Engine: Randomish Numbers Generator […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: