Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am developing a web application written in Clojure using the Compojure framework. My question is, should I deploy to Amazon EC2 or Google App Engine?

I've read this article on running Clojure code on GAE, but I am still a bit concerned about the limitations on GAE. I am going to be running sandboxed Clojure code, which means I might end up needing to tinker with the JVM security policies.

With EC2, I'll obviously have full control of everything. The downside is that this means more of an effort from a sys admin perspective.

I'm not sure which option makes more fiscal sense. I am not expecting too much traffic initially, and suspect that I'll operate pretty close to the "free" tier/quotas on either service.

I've had a lot of success working with EC2 in the past, but at the same time I'd love to get some experience with Google App Engine (which I've never used).

So whats your vote: Amazon EC2 or Google App Engine?

share|improve this question
add comment

5 Answers 5

up vote 3 down vote accepted

While I won't claim enough experience with either environment to answer your question fully, if you're considering Clojure on GAE you may find appengine-magic useful:

https://github.com/gcv/appengine-magic

As an aside, the database limitations, performance, and costs are worth looking at closely with either platform, and may convince you (as it did me) to avoid both. For example, see these stories:

share|improve this answer
    
If I avoid both, what alternatives would you suggest? –  dbyrne Mar 29 '11 at 22:12
    
There's always the VPS route; more overhead initially perhaps, but your deployment should be 95-100% scripted anyway, e.g. on Linode, w/ their StackScripts But it depends on your app needs; if there's a lot of database access (or customization there, e.g. GIS) then the local storage of a VPS could easily beat EC2 or GAE for price and performance. –  limist Mar 30 '11 at 0:51
add comment

A new option you should consider is Heroku - they recently opened up unofficial support for a bunch of languages including clojure:

https://gist.github.com/1001206

Heroku is free for small apps, and you can dynamically add more workers as need grows.

share|improve this answer
    
I've been working on a Clojure app on Heroku recently, and it has been an excellent experience. Highly recommended. –  Lyle Aug 24 '11 at 17:49
add comment

You could also look at amazon's elastic beanstalk, and cloudbees. I can't comment on which of these is best for clojure because I am in the research stage myself. This might be useful in deciding which to go with : Java PaaS shootout :

Summary: This article compares three major Platform as a Service (PaaS) offerings for Java™ developers: Google App Engine for Java, Amazon Elastic Beanstalk, and CloudBees RUN@Cloud. It analyzes each service's unique technical approach, strengths, and weaknesses, and also discusses common workarounds. Learn the basic concepts underlying Java PaaS and understand how to choose a service that suits your development needs.

share|improve this answer
add comment

If it's on a linux box, maybe you can run it off the the Amazon Micro instance for a year for free (one of their offers at the moment).

share|improve this answer
    
Ah sorry, you have mentioned the free tier. Think I might go to sleep... –  burnt_hand Mar 29 '11 at 22:18
add comment

I run a simple application on GAE written in Clojure and it still has only little traffic. I'm struggling with loading requests - the JVM is often unloaded and loading it (with all the dependencies - clojure, clojure-contrib, compojure, ring, cssgen, ...) takes about 10 s, so the first visitor must wait this long. It's not very pleasing, really. And I still haven't found a way to optimize it. I'm considering moving to Amazon EC2, too.

share|improve this answer
    
You should try using a keep-alive cron job. See the Django nonrel branch for an example. –  red-dirt Mar 30 '11 at 9:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.