7

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?

5 Answers 5

3

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:

2
  • If I avoid both, what alternatives would you suggest?
    – dbyrne
    Mar 29, 2011 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, 2011 at 0:51
3

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.

1
  • I've been working on a Clojure app on Heroku recently, and it has been an excellent experience. Highly recommended.
    – Lyle
    Aug 24, 2011 at 17:49
2

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.

1

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).

1
  • Ah sorry, you have mentioned the free tier. Think I might go to sleep...
    – Dan
    Mar 29, 2011 at 22:18
0

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.

1
  • You should try using a keep-alive cron job. See the Django nonrel branch for an example.
    – red-dirt
    Mar 30, 2011 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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