I've got a Sproutcore application which uses CouchDB located by Cloudant. In devenv I am using Sproutcore proxy to forward demands to Cloudant (because of single origin policy I clearly can't call a arbitrary hosts from my JavaScript).

An amount become your suggestion on hosting the application. CouchApps loading script is failing with obscure error (please be aware Sproutcore application is about 40 Megabytes of JavaScript and assets).

The one thing about hosting an application that talks straight to couchdb is you are restricted through the same origin policy, therefore the server that delivers your SproutCore application, needs to be on a single domain while you access your couchDB database. In case your host supplies a static file server, you could utilize that, however your best choice is most likely to save it as being a couch application.

The Important Thing with implementing SC like a couch application, is you need to setup the URL's that sc-build creates to suggest towards the correct location. You can do this using the buildfile setting something similar to this:

:url_prefix => '<database>/_design/<designDocument>/'

By doing this the hyperlinks point right location.

You may also setup CouchDB url rewrites to obtain simpler web addresses if you want. Take a look for more discussion about this:


PS: 40mb appears excessively large! have you got many images? I'd get worried should you have had much JS/CSS.

Cloudant hosts its groupings (mainly) on EC2 in america-east-1b or us-west-1b availability zones. If you fail to deploy like a CouchApp gradually alter colocate the application layer alongside your DB cluster. Which will minimize the latency between your web server and also the databases.

This can be done yourself through getting an EC2 instance and managing a web server onto it, or use a 3rd party host that hosts on AWS (e.g. Heroku).

In the two cases, you will have to operate a small proxy out of your web server towards the database. This is exactly why simply hosting on S3 isn't a choice right now.

When you deploy your application to some web server, be sure to make sure that your internet server as well as your database have been in exactly the same AWS availability zone. If they are not, just request Cloudant to maneuver your bank account.