views:

203

answers:

3

Any one one know of the best practices to be followed when implementing an application in the cloud?

I would like to build an application, which is cloud independent. So, a DAC should be able to work against S3 / AppEngine / Azure just by changing a configuration. Is there any framework or best pattern to be followed so that code is Cloud provider independent.

EDIT: I would like to understand on how we can abstract various components such as DAC / session management etc. so, that in future (when cloud providers starts supporting other languages) we would be able to move from one vendor to another. As I understand we need to use AppEngine's model instead of Django model and App engine's forms instead of Django. These tend to lock to the app with the provider. Is there any way to avoid doing this?

A: 

Seems to me that there is not a lot of commonality between the different offerings. (for example, the 3 you mentioned....)

  • S3 is more of a machine image type solution, think ESX server in the cloud, so your apps are just deployed to an instance of a machine image, Linux or Windows.
  • AppEngine is a hosted app environment for either Python or Java apps (Java support added just recently)
  • Azure (compute) is more analogous to a hosted ASP.NET web app with a bunch of additional services (messaging, blob storage etc)

So while there is some commonality, I don't think app migration between most of these offerings are all that straight forward. However I also don't think its impossible.

EDIT: Actually I lie, S3 is not a machine image solution, I was confusing that with EC2. S3 is a datastorage solution that has nothing to do with hosted applications. (apart from perhaps being a hosted app's storage solution).

Tim Jarvis
A: 

AppEngine implements the the J2EE container specification along with JDO and JPA for data access. So, if you go with Java, you can pretty easily move a J2EE app to or from AppEngine. With EC2, you have to manage the server yourself which means you would be installing and configuring your own J2EE server like JBoss. You would have to deal with clustering and scaling too. AppEngine does all that for you. Azure is strictly for .NET.

Michael Valenty
I'm not sure that moving a random J2EE app to appengine is "pretty easy". JDO on top of app engine is very different than JDO on top of a SQL database.
Peter Recore
A: 

Right now, I think your goal of being able to move an application between those 3 clouds with just a configuration change is not feasible. You would probably have a hard time writing efficient code that would run on appengine (python or java) and also run on ASP.net. (unless someone has gotten django running on azure which would be awesome)

You might have a shot at getting one codebase to work on 2 of the 3 - either appengine and EC2, or Azure and EC2. Out of all 3, amazon's EC2 is the lowest level service, and therefore most flexible (it also requires more administration on your part to get running). You could run a windows box with asp.net and Sql server to match your azure environment, or you could run a java stack to approximate your appengine environment.

Peter Recore