Well, at least nothing appears easy to me when selecting the deployment configuration for ScrewTinny – my Python-based competitive marketing intelligence app.
I had planned to deploy ScrewTinny to Google App Engine and I’ve actually been very happy with how easy it is to get up and running with it on my Arcanicity Index project (more of that later). However, I found the process of generating HTML in a Python app akin to pulling my own teeth out. So I looked at templating techniques where embedded code is replaced at run-time which looked like it might be a bit more bearable. I read that Django templates are supported by Google App Engine, so I decided to take a look at Django.
Django features an object relation mapper that I really like the idea of. It’s sits on top of a MySQL database and allows me to programmatically deal with objects while it handles the persistence and retrieval to and from the underlying SQL database. But then I read that whilst Django can be deployed to Google App Engine (and it’s views are supported natively), it appears that Google’s database strategy doesn’t allow the object mapper to work.
I can understand how something like Google App Engine isn’t going to provide a generic SQL database as it wouldn’t get near the scale that was required. But it’s frustrating to have to look elsewhere if I want to use Django’s ORM.
I was urged to look at a branch of Django called Django-norel that seems to run over non-SQL databases – including the Google App Engine’s Bigtable – but I can’t take the risk that this would end up as a dead end project (even though the people responsible for this project suggest that Django-norel is going to make its way back into the main Django source code trunk).
So then I wondered whether I could run Django outside of the Google App Engine infrastructure and so asked my current host (The excellent – so far) ICDSoft and they told me that it was possible but they didn’t support the WSGI gateways that are needed. Neither, they tell me do they support web2py (which was another alternative I thought about trying) as it needed to run a background process and my shared hosting plan does not allow this. I believe that it’s possible to run web2py on Google App server but it only appears to have a Database Abstraction Layer that leaves me mapping my objects to SQL tables and back again.
So where next?
Well I’m going to take a look at Amazon EC2. I’ve signed up for an account and in theory it looks like I can start a machine image, run Django – or anything I choose, and interact with it via Amazon SQS. So when I get a bit of time I’ll dive into that.
I wish I were a proper programmer. I’ll keep you updated.