I am looking at deploying a Clojure web app, and I remember using Heroku for rails which was brilliant. Is there anything similar available for Clojure?
Currently, the closest there is to Heroku for Clojure is... Heroku: https://gist.github.com/1001206
Courtesy of the new Celadon Cedar stack.
As of July 2011, Heroku now officially supports Clojure:
We're very excited to announce
official support for Clojure, going
into public beta as of today.
http://blog.heroku.com/archives/2011/7/5/clojure_on_heroku/
Google App Engine! GAE supports Java and hence Clojure. I don't have any personal experience of such a project, but this blog seems to have relevent tutorials. Google for it and you'll find some more links like this.
You might also look at stax.net which offers a full Java container deployment (without the restrictions imposed by Google App Engine). CloudBees just bought Stax so Stax will become CloudBees RUN#Cloud service (according to their recent webinar).
You can read how to deploy Clojure on CloudBees here: https://cloudbees.zendesk.com/entries/452746-clojure-deployment-on-cloudbees
Related
I want to create a web app using Django 1.5 or 1.6 using appEngine. I have read about as I have to do it and I have read about Django-nonrel which is very usefull to avoid the issues related with non-relational Database. Unfortunately I have read about the origininal creators project and they have left the project:
GoodBye
However I have seen new avaiables versions of Django AppEngine wich allow to use the 1.4 and 1.5 versions of Django
https://groups.google.com/forum/#!topic/django-non-relational/I06693ZPeME
After I have read every text I am a mess, do anyone redomended me use last version of django non-rel? can I use other framework? don't I use the last verion of Django?
Thank you.
I have developed a fairly complex web app using "normal" Django, not the non-rel flavour. For database storage I use Google Cloud SQL which is basically MySQL in the cloud. It works pretty good. There are some points to consider:
Google Cloud SQL has no "free plan", so it will incur a cost on your project.
Normal Django for GAE is currently at version 1.4 and lags a bit behind development which is if memory serves me right at 1.6. There is a version 1.5 of Django that comes with the GAE SDK but I did not get that work (I did not put any particular effort in it, just changed the Django version in my app.yaml file and it crashed).
As for the first bullet, there's now also a comparable product available from Amazon. I have not yet looked into it (I believe they do offer a free plan which might be interesting to try out), nor compared prices but that might be an alternative should Google Cloud SQL be too expensive. My yearly cost for Google Cloud SQL are between £150 and £200 which is not too bad.
My reason for choosing normal Django over non-rel was basically twofold:
The non-rel project appears abandoned.
The non-rel product is "crippled" in functionality according to some of the docs I read about it and you will not be able to use all of the pre-baked goodies of Django.
I have been working on this project for 7 months now and I find Django on GAE with Google Cloud SQL very stable and productive environments. FWIW, I use PyCharm which has a one click deployment feature which makes deploying my product an absolute breeze. I've been working on IT projects with various technologies for quite some time and the combination of PyCharm, Python, Django, GAE and Google Cloud SQL would be at the top of my list of productive environments.
Of course there are other Python frameworks to consider, like Flask which allow more of a best-of-breed approach but I have no experience with them.
Hope this helps.
I'm using django-nonrel 1.4, though I haven't updated to the latest build yet. It's running smoothly for me.
You do need to recognize that if you use django-nonrel, you have to live by the rules of the GAE HRD, especially the eventually consistent results, and the limited query capabilities.
Django-nonrel is definitely not abandoned! I am using the 1.6 version with much success at Docket Alarm and it is still being actively maintained.
Here are the up-to-date links to the project:
Docs
GitHub
Discussion group
I've been working on a project with Clojure and Noir and I'm enjoying the free hosting on Heroku's cedar stack. I've recently added some UI work in ClojureScript to find that it works locally but crashes on Heroku due to their use of the OpenJDK. The OpenJDK has the Rhino JavaScript engine in a different namespace.
Has anyone heard of a workaround to this problem? Can a version of Rhino with the correct namespace be installed as a project dependency? Or is there an alternative to Heroku that uses the Oracle JDK?
According to this post, the issues with ClojureScript and OpenJDK are supposed to have been resolved on the ClojureScript master branch.
I think this is a feature request for the ClojureScript bug-tracker. Lots of people have this issue (at least I do) so it should get attention.
Heroku is not really intending to support ClojureScript (yet) and does a lot more in terms of hosting than a compiled ClojureScript program really needs. perhaps you can find a provider that will just host javascript and send them the compiled.js instead of a java class that starts it's own java interpreter.
I agree that not using Heroku is a pain because it has the best (of my experiences) integration with git+clojure+leiningen. perhaps either Heroku or the Clojure folks will fix this soon :-/
I am looking for a good production web server/servlet container for my compojure web appliction. What are the pros and cons of using Jetty or Tomcat or other server for a Clojure web app using compojure? Is there any good documentation for using a web server with Clojure for production, or tools?
I would prefer a web server that is flexible, easy to configure and has good documentation on how to configure and use it.
I think there is not yet a pure Clojure Webserver, but I heard that people at Apache were working on something like that. On the meanwhile I have some links I found useful myself.
A commentary on Apache + Jetty: http://briancarper.net/blog/510/deploying-clojure-websites
Take a look at this for implementing your own webserver via servlets: Clojure web application - where do I start?
If you don't already have your own infrastructure to run on, you might consider Heroku, which supports Clojure. See their tutorial Getting Started With Clojure on Heroku/Cedar. It's free to start and very easy to scale.
Chas Emerick has a rather old blog post + slides on doing continous integration on webapps right (Heroku, Pallet, War-file or whatever nescessary to NOT roll your own solution).
I know there have been a lot of questions of this, however those were either few years ago or did not really answer my specific question.
Main:1 - Anyone has any good recommendation, given the following of my needs:
I don't want to use any technology that is restricted within the App Engine infrastructure (e.g I know Google App Engine provides their framework too)
Some tutorial resources where it assumes that the person doesn't know App Engine and Django but with Python basics.
Main:2 - My second main question is that, does Django serves as one of the best web frameworks for hosting under Google App Engine?
I would appreciate anyone who's willing to share your knowledge on this !
Your requirements are unmeetable. Whatever framework you use, you are stuck with the fact that GAE uses Google's proprietary non-relational db. You can use Django along with Django-nonrel to paper over some of the differences, but they'll always be there.
How much of a pain is it to run a Django App on App Engine? Also, does the Datastore work as-is with Django?
I spent some time trying to answer the same question... it seems to me that the most difficult thing to transfer to GAE are django's models... in the sense that they require various modifications and rethinking, mainly because GAE's backend is not a standard relational DB, but google's BigTable. I found a nice intro to this here:
http://www.youtube.com/watch?v=rRCx9e38yr8
Anyways, it's worth downloading one of those 'patches' and have a go with it!
For me the best solution is the 'app-engine-patch'. I downloaded the sample project and it worked straightaway! (Mind that you need to have GAE's SDK installed separately) A killer-feature for me is the fact that the django-admin and many other classic django functionalities have been ported too!!!
http://code.google.com/p/app-engine-patch/
The documentation is still quite minimal in my opinion, but it's good enough to get you going. It'll help you to skim though the official GAE docs though!
Just Yesterday (depending on your time zone), Google released a new SDK for Python on Appengine that supports django 1.0 out of the box.
You need to use django-nonrel (source).
You will still find loads of issues:
Many2Many relations not supported
Fake joins increase number of queries
App Engine doesn't allow any python lib with socket or C dependencies (sentry, lxml...)
You can try to get early access to CloudSQL.
Otherwise you are not constraint to use App Engine, you can think about using:
Heroku
Gondor
Cheaper and more control with support requirement files like pip.
31.01.2012, Google released App Engine 1.6.2 that supports Django out-of-the box.
App Engine includes version 0.96 of Django out-of-the-box, but it is quite crippled.
App Engine Helper and app-engine-patch supposedly fix this problem to some degree, but I haven't tried either myself.
http://code.google.com/appengine/articles/appengine_helper_for_django.html
http://code.google.com/appengine/articles/app-engine-patch.html
The amount of pain depends on how much existing code you want to reuse. Unfortunately because of the Datastore does not support SQL, you often cannot just take any django-pluggable app and use it on your GAE project.
App-engine-patch http://code.google.com/p/app-engine-patch/ looks to be ahead of the other django helpers in bringing the standard applications (Sites, ContentTypes, Flatpages) over to GAE. I have used app-engine-patch on several gae projects, and once you understand how to port a django-sql model to a django-gae model and converting sql to datastore queries things can be done very quickly - but there is always a learning curve.
appengine-helper tries to bridge the Datastore gap by providing a model so you don't have to change your model superclasses, but I've found that you end up having to change ManyToMany relationships and any sql anyway, so the advantage ends up being minimal. ae-patch has a roadmap to try to provide an ae-datastore backend, but it probably won't happen for a while.
Google has now launched their Cloud SQL storage. That is actually MySQL 5.5 in the cloud. IMO that's a very nice way to migrate your Django app into the cloud. They have a free trial up to June 1, 2013.
If you need some tips how to set up your Django project for Appengine and Cloud SQL I've written a tutorial for that.