Blog

Entries categorized as ‘Techniques’

Woven Clouds: OpenID

January 31, 2010 · Leave a Comment

When it comes to building services using the cloud, one often comes across the need to weave different cloud-based offerings together. One example is OpenID. I blogged about it last year. In this post, I would like to take it to the next level and offer a programming pattern for using it with specific examples for Google App Engine. JanRain’s RPX API makes it easy to incorporate.

Ingredients

When you sign up with RPX and register your application, you get:

  1. A application ID,
  2. An iFrame widget and
  3. An API token.

When signing up, the domain names need to be provided. These are domain names from which an authentication request may originate. In our case, that includes localhost and www.example.com.

Recipe

Create a login page and place the iFrame widget on it. The iFrame will point to something like

src="https://example.rpxnow.com/openid/embed?token_url=appRpxURL"

where appRpxURL is a URL served by the application. When a user interacts with the login page, RPX calls the application at this URL with a token and the application is expected to turn around and request information about the user. This Google App Engine code fragment illustrates the interaction (to access it, you will need to use an OpenID login). At this point, the application knows the user id. This part is documented in a number of places on the web.

Integration

In a number of the applications we develop at Early Stage IT, the user id is stored in a session variable using GAE Utilities for the remainder of the session. The above-cited code fragment shows this also. The application is still responsible for determining what the user is entitled to do. The first thing to do in handling a user request is to verify that the user has the requisite application capability. This is illustrated in the last part of the sample code.

When the user logs out, clear the cookies by calling theSession.terminate()

If you use it…

…please cite this blog post. Feedback — positive or negative — gratefully accepted.

Categories: Techniques
Tagged: , ,

Google App Engine Hackathon

October 14, 2009 · Leave a Comment

App Engine Logo

Google App Engine

This Hackathon will introduce software engineers to Google App Engine. It will be free of charge, first-come-first-served but preference will be given to software engineers in the web development area.

Event Details:

  • Location: Aprigo, 460 Totten Pond Rd suite 660, Waltham, MA. I would like to thank Aprigo for their sponsorship of this event.
  • Date: November 6, 2009
  • Time: 9:00 am to 4:00 pm
  • Meeting capacity: 10 people
  • Food/drink: bring your own / buy in the building.
  • Sign up: Eventbrite.

It is not an introduction to web programming or a Google Apps session. It is assumed you know server-side web development — perhaps ASP, JSP or PHP. Please note, this session will be based on Python. Still, it is not a programming language class — the emphasis will be on learning the available APIs which are common between Java and Python on GAE. If you have any questions about whether you will get much out of the hackathon, please contact us.

Agenda
The idea is to familiarize everyone with the basic App Engine APIs.
1 hr – Getting Started – What is App Engine
1.5 hrs – Coding
15 mins – Introduction to Users API
1.5 hrs – Coding/lunch
15 mins – Introduction to UrlFetch and Mail APIs
1.5 hrs – Coding
15 mins – Introduction to Images and Memcache
1 hr – Coding
45 mins – Let attendees present the apps they worked on/wrap up
Prep Work
Attendees should plan to bring their own laptop.
Prior to the session, it would be helpful to have walked through the Hello World example:
http://code.google.com/appengine/docs/python/gettingstarted/
The Development Environment section of the above link suggests downloading Python 2.5 and the App Engine SDK. Please download these ahead of time.
The Download App Engine SDK page also has instructions on downloading and

Agenda The main goal is to familiarize everyone with the App Engine and how you can use it to build your web application “in the cloud”.

  • 1 hr – Getting Started – What is App Engine
  • 1.5 hrs – Coding
  • 15 mins – Introduction to Users API
  • 1.5 hrs – Coding/lunch
  • 15 mins – Introduction to UrlFetch and Mail APIs
  • 1.5 hrs – Coding
  • 15 mins – Introduction to Images and Memcache
  • 1 hr – Coding
  • 45 mins – Let attendees present the apps they worked on/wrap up

Prep Work

  • Attendees should plan to bring their own laptop.
  • The Development Environment section of the above link suggests downloading Python 2.5 and the App Engine SDK. Please download these ahead of time.
  • The Download App Engine SDK page also has instructions on downloading and setting up a development environment such as Eclipse. This is not mandatory.
  • It is helpful to have walked through the Hello World example ahead of time. We will be going over it again in the first couple of hours of the session so it is optional, not mandatory, to have done this.

Example Applications. Attendees are welcome to bring their own application ideas to work on during the Hackathon. For the main example, we will work on an application in the spirit of Cafe Survey. Another possibility is to create a wiki or a blog application.

Categories: Techniques · Training
Tagged: ,

Cloud Development

July 25, 2009 · Leave a Comment

What are some of the hurdles we have encountered with Cloud Development? What mechanisms have we used to overcome them? The problems posed by the different cloud platforms are different. I will be writing on this topic in a series blog posts. I expect to blog on these topics. If you know of others, please let me know. These list items will get hyperlinked over time.

  1. Cloud Development for Google App Engine
  2. Cloud Development for Amazon EC2
  3. Managing software delivery from outsourcers
  4. Managing evolution of database configurations
  5. Performance and Stress Testing
  6. Security Testing

In this introductory post, I want to cover activities that cross all platforms. The premise of Cloud Development is that the company does not own any hardware. Under these circumstances, how does software development get done? (more…)

Categories: Requirements · Techniques · Technology Strategy
Tagged: , , , , , , , ,

Accessing Amazon Web Services from Google App Engine

January 3, 2009 · Leave a Comment

Amazon.com has put together a set of services (AWS) that allow you to rent, not buy, your infrastructure. They are extremely competitive and competent. Despite the use of the word simple in the naming of these services, simple they are not. Echoing Einstein perhaps: things should be as simple as possible but no simpler.

A gem: Amazon knows a thing or two about payments and money transfer; no surprise that Amazon FPS (flexible payment system) should be a unique part of the offering.

When it comes to writing applications, Google App Engine (GAE) is more constrained but ramp-up is easier and more amenable to agile development — a necessity for Early Stage companies.

How can we leverage the robustness of AWS from the simple (but constrained) environment of GAE? We tried to call FPS services from GAE to see. The remainder of this post is about tips and tricks for doing so. Fair warning, it’s a bit technical. (more…)

Categories: Requirements · Techniques
Tagged: ,

Building a Web Site

December 15, 2008 · 2 Comments

Do you want to build a web site or a web application?

Alternative Methods for Building Web Sites

If all you want is a web site displaying information about your company, consider these alternatives for building and hosting your web site yourself:

  1. Google Sites. Some folks consider it “simplistic” but it is sure to grow in scope and sophistication.
  2. Microsoft Small Business.
  3. Yahoo Small Business.
  4. A comprehensive list of other services available.  These provide the “iron” & the tools and you can build the services using standard web technologies.

There are also a number of firms that will do it for you for a fee. Search for the words “website creation service”. Among the more interesting ones we found:

  1. IRCUSA. Prices vary from $250 (1 page) to $3000 (~12 pages).
  2. Register.com. $12.95/month. Cheap but ugly.
  3. Richard Waller. About $1000 for a 6-page web site.
  4. GoDaddy. About $65/month.

(If you research any of the options further, or find an interesting new one, please post a comment and let us know. Thanks in advance.)  In any case, you will need to come up with what the web site will say, unless you want to hire a marketing company to do it with you.

(more…)

Categories: Techniques
Tagged: ,