Friday, April 16, 2010

Cloud application (AppEngine) or server (Rackspace, amazon)?

Flexibility vs Productivity vs Creativity
Starting out building an application the thing we don't know is the path the application is going to go. Like the CAP theorom that states pick two of the three options (Constancy, Availability, Partition Tolerance) we have to pick two of Flexibility, Productivity and Creativity. 

Take Hardware Off The Table
We have enough to worry about with all the laptops, monitors and cell phones but add rack of servers and we are really not happy. These type of resources are also very cost prohibitive especially for a startup or poorly funded project. Physical servers, switches, battery backups, facility (with special sprinkler system), security systems on physical access to equipment, power redundancy, network redundancy and capacity are all things that are enjoyable engineering tasks but a complete distraction from focusing on the project.

Hosted Server Overhead
Amazon user experience for managing servers is horrible so I am only going to talk about what I think the viable option is something like Rackspace. Come down to 3 things:
  • Setup - still need to manage configuration and setup of all the services that are running database, web servers ect. Even a small deployments can get complex quickly and require lots of resources.
  • Deployment - getting code actually onto the servers (this is harder than it sounds especial with web servers, databases, message queues ect)
  • Scaling - If your application is at all useful then people will want to use it and so you will need to figure out how to add more web servers, databases (RDBMS big piles of pain and expensive consultants licking there lips)
Hosted Application Constraints
AppEngine since that is the most popular and I have and am currently using I will point out some of the issues. 
  •  Development and testing can only use a very limited sample data set because of the way the development environment is. 
  • Simple and easy crojob that taskqueue is not. (probably going to end up using cron hitting a url anyway)
  • It is very expensive when the traffic hits!
  • Limited on which software libraries can use!
How about Hybrid
What constraints that AppEngine places will limit creativity and flexibility however is very productive. Rackspace allows for maximizing flexibility and creativity on tools to solve the problem but puts a large burden on productivity. A hybrid approach might be exactly what the doctor ordered. Starting out with AppEngine and migrating to a solution like Rackspace as the needs arise to be more flexible and creative.