Cloud Awesomeness with Tropo and CouchDB
December 8th, 2010 by Mark HeaddOne of the great things about Tropo is that it lets you run sophisticated communication applications in the cloud.
Tropo makes it easy to build multi-channel applications in the language of your choice and makes deployment and maintenance easy. We take care of all of the hard stuff.
But what if you want to build an application that stores information? Let’s say you want to create a survey application that sends out messages to registered users and asks them to provide the answer to a question. You’ll want to be able to store responses to your survey and examine the replies from users.
Since Tropo is a cloud communication platform, it pairs easily with other cloud infrastructures. This post will cover one way of pairing Tropo with a cloud-based instance of CouchDB.
Get on the Couch
You can get a cloud-based CouchDB instance over at CouchOne. Once you sign up and get your CouchDB, head on over to GitHub and grab the code for this simple survey application.
This application sends out a message on a specified channel and then saves the response to that question in a CouchDB instance. This example uses instant messaging as the channel, but you could easily tailor this script for other channels as well, like SMS.
Make note of the details of your CouchOne instance – make sure you modify the sample application code to use the details of your instance.
Cloud-Based Survey App
Once you get the code for this example, use it to set up an application in your Tropo account. If you want to use it as is (i.e., just using the IM channel), you’ll need to assign a Jabber IM address to your application – this is easy to do in the Tropo application settings.
Once you are ready to test, you’ll need to use one of your outbound tokens from your account. The following video demonstrates how to test the application, how to check CouchDB for new responses and how to monitor CouchDB for responses that come in from users over time (via the _changes API).
Because Tropo is a true cloud communication platform, you can use it in conjunction with other cloud-based infrastructures, like CouchDB from CouchOne.
Tropo + CouchDB = Cloud Communication Awesomeness!
Related posts:

[...] Video source and code for this example. Related Content:No Related Content [...]