So having thought this over more I think such a service, which I have named Proxied, would have the following:
- Login/Registration/Session as a service capability - Proxied would have the ability to establish a user session per Proxied application, so that other Proxied API calls could be limited to logged in users
- True to its name Proxied would proxy calls to any api, ensuring they return JSONP
- For many API's some sort of authentication is needed, in those cases Proxied would store your API credentials and do whatever signing is needed for that API.
I think a specific example is probably most helpful.
Say you want to build a new HackerNews like web app, you'll need
- Login system
- Database to store submitted links
- Database to store up-votes, down-votes, karma
To do this with a static page web application and Proxied we'd use the Proxied login system to create user sessions and then a cloud database server (say SimpleDB, or MongoHQ) to store the data. We'd create whatever tables (or no tables for NOSQL) we need to in the cloud DB, and then figure out what the cloud DB API endpoint url(s) would be for updating the tables, we'd set those endpoint URLs in Proxied along with our cloud DB credentials, and signing methodology (OAUTH or whatever). Proxied would then produce a JSONP accessible endpoint (or better yet, with clever CNAME's, JSONP wouldn't be necessary) that would proxy the call to the cloud DB API to update our application's data. In Proxied we could set the cloud DB proxy endpoint(s) to be accessible only by logged in users, therefore restraining willy nilly use of our cloud DB by nefarious folks.
Basically one would use Proxied to setup API endpoints for what, in a traditional webapp, would be the controller (in Rails parlance) endpoints on your own server. For a RESTFUL architecture you'd have Proxied endpoints to GET/PUT/DELETE/POST your data to a cloud service. As you add more data tables (or non-tables for NOSQL), you'd add more endpoints in Proxied to service that data.
At this point you can just write the app as a static web page that uses Javascript to update the application data as necessary. Need to crunch data? Well that should be done offline anyway, using Map-Reduce or the like, just update the cloud DB with your crunching results and make that available through Proxied.
Nothing restrains you from using more than one web page, but all the pages would be static. I'd then host the web pages on Amazon S3 thereby obviating the need for ANY server at all on our part, and ensuring the application is scalable (to the degree the underlying services are scaleable).
What I want to know is whether this is a service that developers would use? If so, how much would you be willing to pay for it?