….::: VOX POPULI :::….
“Ministers… cannot in any country be uninfluenced by the voice of the people.”
Vox Populi (Latin for “Voice of the People”) aims to provide useful information on interactive communication technologies and social networking tools that can be used by government officials to improve services to citizens and taxpayers. This is the voice of Government 2.0.
19th
MAY
Building an Open311 Application
Posted by Mark Headd under Cell Phones, CouchDB, Development Tools, Open Government, Twitter
Earlier this year, I had an idea to build a Twitter application that would allow a citizen to start a 311 service request with their city.
At the time, there was no way to build such an application as no municipality had yet adopted a 311 API that would support it (although the District of Columbia did have a 311 API in place, it did not - at the time - support the type of application I envisioned).
That changed recently, when San Francisco announced the deployment of their Open311 API. I quickly requested an API key and began trying to turn my idea into reality.
My idea resulted in an application that I soft launched last week. TweetMy311 is now live and can be used in the City/County of San Francisco to report 311 service requests. The project website has a detailed description of how it works, but its very close to my original idea.

More good news on the Open311 front came recently when it was announced that San Francisco and the District of Columbia had come to agreement on a shared Open311 standard. This means that apps built to work with the San Francisco 311 API will also work with the 311 API in Washington DC. I’m working on enabling TweetMy311 for Washington DC now, and hope to have this service live there in a few weeks.
Ultimately, I hope people use my application, that they like it, and that it makes it easier to report an issue to their municipality. I did, however, have some other motives in developing this application that I think are equally important.
Are You Experienced?
Since 311 APIs are rare, and (right now) applications that use 311 APIs are also rare, I think there is value in being able to capture the experience of developing an Open311 application from scratch. This information can provide tremendous value to the governments that deploy 311 APIs (what works, what doesn’t, what can be improved, etc.), and for developers thinking about building an Open311 application.
I hope to use TweetMy311 to provide feedback to governments that deploy 311 APIs (and to those thinking about deploying one) so that they can get a sense of how the experience works from a developer that has used one. At the end of the day the ease of use of an API, the quality of documentation, the ability to test applications in a meaningful way and a number of other factors will determine how many developers decide to take the step and become a “civic coder” by building an Open311 application.
Getting to Open
For me, the use of open source technologies in TweetMy311 was important. This project provided a great opportunities to learn more about a technology that I have become fascinated with of late - CouchDB. TweetMy311 is a NoSQL application that uses CouchDB at its core. It runs on Ubuntu Linux with Apache and was built with the PHP scripting language (I guess that makes it the CLAP stack - CouchDB, Linux, Apache, PHP)
Building with open source technologies was important because I hope to be able to share the code I have developed with interested governments that want to learn how an Open311 application is put together. I also believe it’s important because I think the Open311 initiative can be a great mechanism for encouraging the use of open source technologies.
Leading up to this project, I developed a small PHP library for interacting with the San Francisco Open311 API. I make use of this library in TweetMy311 and any other developer that wants to use it in their project is free to do so. I plan on branching this library soon so that it can work with the new version of the Open311 standard.
Give it a twhirl
So if you live in San Francisco and you want to give TweetMy311 a twhirl, check out the description on the project website. I’d appreciate any feedback - positive or negative - because ultimately I think it will make the project better.
I had a great experience developing TweetMy311, and I learned a lot. I’m looking forward to sharing my experience with interested governments and other developers.
7th
APR
Upgrading to CouchDB 0.11
Posted by Mark Headd under CouchDB, Development Tools, Open Source
Just a few days ago, CouchDB version 0.11 was released - this new version is packed full of cool new features as outlined on the Couch.io blog. It’s also the first release without the Alpha or Beta label attached to it.

What’s more exciting, CouchDB version 0.11 is a feature-freeze release candidate for the upcoming version 1.0. So if you’ve played around with CouchDB and have an old instance laying around, now is the time to upgrade.
If you’ve read my previous series on using CouchDB to build cloud telephony applications with Voxeo’s Tropo platform, and you used my instructions for setting up CouchDB on Ubuntu 8.04, then upgrading to CouchDB version 0.11 will be a piece of cake. (Note - the mirror you download from may be different than below. Go to the download page to find the best one):
Before upgrading, make sure that any customizations you’ve made to the CouchDB configuration are in /usr/local/etc/couchdb/local.ini. The upgrade process will overwrite any changes you have made in default.ini.
$ sudo /usr/local/etc/init.d/couchdb stop
You should probably run make uninstall on the previous version of CouchDB before starting.
If you see leftover files in /user/local
$ find /usr/local -name \*couch* | wc -lYou should probably get rid of them:
$ find /usr/local -name \*couch* | xargs rm -rf$ wget http://www.trieuvan.com/apache/couchdb/0.11.0/apache-couchdb-0.11.0.tar.gz
$ tar -zxvf apache-couchdb-0.11.0.tar.gz
$ cd apache-couchdb-0.11.0/
$ ./configure && make && sudo make install
$ sudo /usr/local/etc/init.d/couchdb start
$ curl -X GET http://127.0.0.1:5984You should see:
{”couchdb”:”Welcome”,”version”:”0.11.0″}
Note - if you see an error that says {"error":"error","reason":"eacces"} when trying to create a database or insert documents, you may need to re run some commands listed in the previous install instructions:
$ sudo chown -R couchdb /usr/local/etc/couchdb
$ sudo chown -R couchdb /usr/local/var/lib/couchdb
$ sudo chown -R couchdb /usr/local/var/log/couchdb
I’m in the process of finishing up a project that will make use of the Open311 API deployed by the City of San Francisco and it shall be SQL-free - now that I have CouchDB 0.11 installed, I’m ready to finish up.
Stay tuned - this project is going to kill!
25th
MAR
Tropo Goes Global
Posted by Mark Headd under CouchDB, Development Tools, Twitter, VoIP
A couple of months back, I wrote a post about how nontraditional communication channels - IM, SMS, social networks, etc. - are changing the way that businesses and governments interact with their customers. These channels are “nontraditional” because they are not typically utilized to provide customer service, or to take orders.
That is changing, and the announcement today from Voxeo about their new Tropo service is both evidence of that change, and the catalyst for even more change.

I’ve always been impressed with Tropo, and not long ago I worked on a series of posts demonstrating how to utilize the Tropo platform with the utterly awesome NoSQL database CouchDB.
The newly reworked Tropo adds an impressive array of new features. It’s not all that unusual any more to see cloud telephony services offering SMS support - it makes sense, and its right in line with what I have been saying about how nontraditional communications channels are becoming more important. Tropo goes way beyond this by adding support for an array of IM networks and also for Twitter (the 800 lb gorilla of nontraditional communication channels).
The international support for Tropo is also impressive - they provide international numbers for inbound calls, and can also handle outbound dialing to international numbers. Phone applications can use international TTS engines to render content to non-English users. Even more impressive, Tropo’s speech recognition capabilities (which have always separated it from other cloud telephony providers) can now support a number of foreign languages - UK English, Dutch, French, German, Italian, Mexican Spanish or Castilian Spanish.
Tropo is an impressive platform for a number of reasons. It used to be very hard (and, in some respects, still is) to build a great phone application. The Tropo platform allows developers to build great phone applications, and to leverage the investment in these apps by extending them to other channels and other countries.
A single code base serving different customers on multiple channels. That’s powerful.
And now, with the release of the new Tropo service, a single code base can serve multiple channels in multiple countries in multiple languages.
The times they are indeed a-changin’.
12th
JAN
NoSQL Telephony with Tropo and CouchDB
Posted by Mark Headd under CouchDB, Development Tools, Open Government, Tutorials
In the last two posts, I’ve provided a basic overview of how to create cloud telephony applications using the Tropo platform and CouchDB.

In the first post of this series, I walked through a quick install of CouchDB and provided information on getting a Tropo account set up. In the second post, we created a simple auto attendant Tropo script in PHP that populates a CouchDB database with a call record for each inbound call that is transferred.
I’ll conclude the series with information on how to retrieve information from a CouchDB instance for use in a cloud telephony application, and talk about design documents. This post will also introduce the reader to the concepts of CouchDB Views and Show Functions - powerful tools that can be harnessed to create truly cutting edge cloud phone apps.
First, let’s create a CouchDB database to hold our call settings.
Creating a Call Settings Database
As mentioned in the previous CouchDB posts, you can create a new call settings database using curl from the command line, or using the Futon GUI.
$ curl -X PUT http://your_new_couchdb_ip:5984/call_settings
You should see a response from CouchDB like this:
{”ok”:true}
You can add a record to the call settings database the same way. This time, however, we’ll append the URL for our CouchDB database with a document ID, in this case ‘1000′ - this is the extension that a caller to our cloud telephony app will dial. We’ll use the document ID and and the CouchDB REST API to get all of the settings we’ll need to conduct the transfer - these settings can be seen in the document structure below (feel free to add others to meet your needs or preferences).
$ curl -X PUT http://your_new_couchdb_ip:5984/call_settings/1000 -d ‘{”first_name”:”Joe”,”last_name”:”Blow”,”phone”:”17777777777″,”title”:”Master of Disaster”,”ring_tone”:”audio/ring.wav”}’
You should see a response from CouchDB like this:
{”ok”:true,”id”:”1000″,”rev”:”1-0cf5a7c3a70ac5760f1a5d8dcb8b48d2″}
Let’s add a few more documents to our call settings database (replacing the telephone numbers below with real ones that you want callers to transfer to) and then view all of the documents that we have created.
$ curl -X PUT http://your_new_couchdb_ip:5984/call_settings/2000 -d ‘{”first_name”:”Harry”,”last_name”:”Smith”,”phone”:”18888888888″,”title”:”President of the World”,”ring_tone”:”audio/ring.wav”}’
$ curl -X PUT http://your_new_couchdb_ip:5984/call_settings/3000 -d ‘{”first_name”:”Martin”,”last_name”:”Scorsese”,”phone”:”19999999999″,”title”:”The Departed”,”ring_tone”:”audio/ring.wav”}’
You can view all of the documents in a CouchDB database using the HTTP GET method:
$ curl -X GET http://your_new_couchdb_ip:5984/call_settings/_all_docs
You should see a response from CouchDB like this:
{”total_rows”:3,”offset”:0,”rows”:[
{"id":"1000","key":"1000","value":{"rev":"1-0cf5a7c3a70ac5760f1a5d8dcb8b48d2"}},
{"id":"2000","key":"2000","value":{"rev":"1-ee2f09516df8b191a89791b01828d788"}},
{"id":"3000","key":"3000","value":{"rev":"1-a1399e8218ae75e1efb73ba3f87862ff"}}
]}
Now we need to modify our Tropo PHP script to retrieve the settings we want to use with each transferred call.
Note, for now we’ll keep the logic simple - if a caller enters an extension that does not exist we’ll get a specific HTTP response back from CouchDB - something in the 400 class of responses. If this happens, we’ll just end the call - in the real world you’d want to do something a little more friendly, but you can sort that out when you build your own cloud telephony application.
Modifying the Tropo Script
So, our new Tropo script looks like this:
Note that the getPhoneNumberByExtension() method no longer returns a hard coded phone number - it is using the 4-digit extension entered by the caller to access our CouchDB database using the REST API. The response from CouchDB is a document in JSON format, that we can easily parse using PHP’s handy json_decode() function.
I’ve also modified the value of the $callLog variable to correctly capture some of the variables exposed in the Tropo environment (i.e., the session ID of the call, and the caller ID - see this thread for more information).
So now we have a working cloud telephony application built on Tropo that uses CouchDB to get its call settings, and also to write a call record for billing, reconciliation, etc.
As cool as this is, there is still a lot more we can do with CouchDB in our cloud telephony apps. Note the constants declared at the top of the Tropo script - the last two are blank; one for a design document name, and one for a show function.
define(”COUCH_DB_DESIGN_DOCUMENT_NAME”, “”);
define(”COUCH_DB_SHOW_FUNCTION_NAME”, “”);
Let’s talk about those concepts now, and explore how they could be used in a cloud telephony application.
Getting more out of CouchDB - Design Documents, Map/Reduce and Show Functions
As the title of this post suggests, we’re building cloud-based phone applications without SQL. CouchDB doesn’t use SQL - instead it uses a Map/Recuce framework to index documents in a database.
Map functions can be used to emit a key-value listing of documents in a CouchDB database. Reduce functions are used to aggregate the key-value pairs emitted by a Map function. Map/Reduce functions (or Views) live inside of a special document in a CouchDB database called a “design document“, which has a document ID prefixed with “_design/”.
For example, suppose we have a special design document in our database called “_design/extensions” with a View called “getExtensions” - our View is made up of a Map function and (optionally) a Reduce function. Let’s assume our View has only a Map function to return data on extensions with valid phone numbers to transfer a caller to.
function(doc) {
if(doc.phone.length == 11 && doc.phone.substr(0,1) == ‘1′) {
emit(doc._id, doc.phone);
}
}
Our Map function (which is written in JavaScript, and stored in our design document) has one parameter - doc. This function is called for each document in our database, and the doc parameter represents the document itself. As can be seen, we simply examine each document in the database to see if it has a valid phone number (11 digits, starting with 1).
Views are accessed using a specific URI structure (do note, however, that the REST API for querying Views can change significantly between CouchDB versions), and the response is a set of key-value pairs formatted as JSON.
http://{server_ip_address}:5984/{database_name}/_design/{design_document_id}/_view/{view_name}
$ curl -X GET http://your_new_couchdb_ip:5984/call_settings/_design/extensions/_view/getExtensions
You should see a response from CouchDB like this:
{”total_rows”:3,”offset”:0,”rows”:[
{"id":"1000","key":"1000","value":"17777777777"},
{"id":"2000","key":"2000","value":"18888888888"},
{"id":"3000","key":"3000","value":"19999999999"}
]}
You can check to see if your Map function is working properly by adding a document with an invalid phone number.
$ curl -X PUT http://your_new_couchdb_ip:5984/call_settings/4000 -d ‘{”first_name”:”Richard”,”last_name”:”Kimble”,”phone”:”4444444″,”title”:”The Fugitive”,”ring_tone”:”audio/ring.wav”}’
Accessing the getExtensions view will return the same results as before, as the phone number for the new document does not pass validation. Using design documents and Views, cloud telephony developers can use CouchDB to build grammars for user input which will significantly enhance the usability of the sample application we’ve used during the last few posts.
But there is even more potential with another piece of functionality in CouchDB - show functions. Show function also live in design documents, alongside Views. Show functions allow a developer to return specifically formatted content from a CouchDB instance, not just data in JSON format.
A basic show function that can be used to return information from our CouchDB database in the format of a SRGS grammar might look like this.
function(doc, req) {
var grammer = ‘<?xml version=\”1.0\”?><grammar xmlns=\”http://www.w3.org/2001/06/grammar\”>’;
grammar += ‘<rule id=\”R_1\”><one-of>’;
grammar += ‘<item>’ + doc.phone + ‘<\item>’;
grammar += ‘</one-of></rule></grammar>’;
return grammar;
}
Like Views, Show Functions are accessed using a specific URI structure.
http://{server_ip_address}:5984/{database_name}/_design/{design_document_id}/_show/{show_function_name}/{document_id}
Note that the Show function above is different from the Map function discussed earlier in that it takes two parameters - doc and req. As before, the doc parameter represents the document the function is called against. The req parameter represents a parameter that is sent in with the HTTP request, which can be used inside the function to render output. So a Show function canbe accessed using the above URL with an optional parameter as well, like so.
http://{server_ip_address}:5984/{database_name}/_design/{design_document_id}/_show/{show_function_name}/{document_id}?{parameter}={some_value}
Conclusion
I hope this series of posts has provided a helpful overview of CouchDB, with an emphasis on how it can be used to build cloud telephony applications.
Cloud telephony platforms like Tropo, CloudVox, CallFire and others provide enormous flexibility to developers in building and deploying sophisticated cloud telephony applications.
Pair these tools with CouchDB and you’ve got a powerful combination for building full featured, easy to maintain cloud-based phone apps.
6th
JAN
Relaxing on the Couch with Tropo and CouchDB
Posted by Mark Headd under CouchDB, Development Tools, Open Source, Tutorials
This is the continuation of a series that will describe how to build voice applications with the Tropo cloud telephony platform and CouchDB.

In the last post, I detailed how to get a CouchDB instance up and running on Ubuntu, and how to get an account started on Tropo so that you can start building cloud telephony applications. In this post, we’ll create our first CouchDB database and create a simple Tropo application that connects to our CouchDB instance. First, however, we need to tweak the default settings for CouchDB so that we can access our CouchDB instance from the an external environment.
Configuring CouchDB
Recall from the last post that the configuration files for CouchDB are located in /usr/local/etc/couchdb/. Open the local configuration file and take a look at the default settings:
$ sudo vim /usr/local/etc/couchdb/local.ini
In the [httpd] section, you’ll notice the setting for the default port that is used to connect to CouchDB - 5984. You’ll also note the bind_address setting. By default, CouchDB listens only on localhost – you can change this by altering the value of bind_address to a publicly resolvable IP address (you may need to uncomment this setting as well).
However, before proceeding please note that CouchDB does not yet have a built in security model, so anyone that can access the IP address in the configuration file can potentially access your CouchDB instance. We’ll need to take some steps to restrict access to our CouchDB instance – there are several ways of doing this.
First, if you know the IP address (or range of addresses) that will be accessing your CouchDB instances, you can simply use IPTables to restrict access to that IP:
$ iptables -A INPUT -p tcp -s 64.57.102.34 –dport 5984 -j ACCEPT
The above command would restrict access to your CouchDB instance to a single IP address.
Another method for securing a publicly exposed CouchDB instance is to use Apache password authentication. A good overview of this approach can be found here.
After you’ve modified the bind_address setting, restart CouchDB and test connectivity to it:
$ sudo /usr/local/etc/init.d/couchdb restart
$ curl http://your_new_couchdb_ip:5984
Creating our CouchDB Database
Once you have your CouchDB instance up and running, you can create a database in one of two ways. The first, and easiest, is simply to use the curl command. You create a database in CouchDB by using the HTTP PUT method:
$curl -X PUT http://your_new_couchdb_ip:5984/call_logs
You can also create a database (and do lots of management functions in CouchDB) by using the GUI (called Futon). Its located at http://your_new_couchdb_ip:5984/_utils
Building a Simple Auto Attendant Application with Tropo
Now that we have an initial database in our CouchDB instance, lets build a simple Tropo application that will populate it with records (or documents in CouchDB parlance):
This simple application is a basic auto attendant. It asks the caller for a 4-digit extension and then transfers them to a 10-digit PSTN number. At the end of the call, we write a very simple call log document to our new call_logs database using the HTTP POST method.
(One small side note – you can use either the POST or PUT methods to insert a document into a CouchDB database. However, using PUT assumes you want to assign a specific document ID to your document. When you use HTTP POST, CouchDB will automatically assign a document ID. For now, we’ll keep things simple and use POST.)
Much of the functionality in this simple app is just stubbed out for now - i.e., the getPhoneNumberByExtension() method - we’ll build more of this out in later posts.
Modify this file by adding your instance-specifc details to the constant declarations at the top. Do also note that the last two constants can remain blank for now.
define("COUCH_DB_DESIGN_DOCUMENT_NAME", "");
define("COUCH_DB_SHOW_FUNCTION_NAME", "");
We’ll talk about how to use design documents in the next post.
When you load this file up on Tropo and make a test call, you will see your call log document is inserted into the call_logs database. The structure of the document is pure JSON, which is supported quite nicely in PHP (and most every other language that can run on Tropo as well).
In the next post, we’ll examine CouchDB design documents in more detail and modify our simple demo application to get a list of extensions from another CouchDB database and parse the JSON data structure in the getPhoneNumberByExtension() method.
Until then, keep on relaxing….
4th
JAN
Building Voice Applications with Tropo and CouchDB
Posted by Mark Headd under CouchDB, Development Tools, Open Source, Tutorials
The beginning of a new decade is usually the time when there is a lot of reflection on what has changed for the better (and the worse) over the past 10 years.

The end of 2009 saw its fair share of pundits talking about how far we’ve come since the year 2000, but for me the most dramatic change has been to the way that voice applications are developed and deployed. In the past 10 years (hell, in the past 10 months!) we’ve seen a dramatic shift toward cloud telephony with the launch of a number of new services that have fundamentally altered how voice applications can be built.
There has simply never been a more varied and powerful array of tools available for developers to build phone applications with than exists today. Some of the newest and most innovative platforms around for building cloud-based phone applications are listed below:
Over the same period of time there’s also been lots of changes to some of the foundational technologies supporting voice applications (and other kinds of web applications). The NoSQL movement is gaining steam, and there is an interesting collection of new document-oriented databases available for developers to use. One of my favorite is Apache CouchDB.

The thing I find really interesting about CouchDB is that it makes use of an HTTP-based API - pretty much any tool or technology that can communicate via HTTP can be used to interact with a CouchDB instance (hello command line…). In addition, that data structure of the documents stored in a CouchDB instance is JSON. In my mind, this makes CouchDB a very useful choice when building cloud applications, specifically cloud telephony applications.
Who wants to use one of those old relational databases to build a cutting edge cloud phone app? That’s so 2009.
This post and the next several that follow it will detail how to set up a CouchDB instance and to build a cloud telephony application with it using the Voxeo Tropo platform.
For those that don’t know, Tropo is one of the new cloud telephony platforms that lets developers author voice apps quickly and easily using one of several different languages. It’s open source, well documented and supported by Voxeo’s industry leading telephony infrastructure.
So, if you want to start the new decade of right by learning how to build powerful, scalable, full featured voice applications using Tropo and CouchDB, read on.
Getting Started with Tropo
Head on over to Tropo.com and set up a new account (if you don’t have one already). Take a little time to review the documentation for Tropo - I’d recommend running through a few of the sample apps if you have time. They’re fairly self explanatory and provide a solid overview of the different languages that can be used to write a Tropo app - I’ll be using PHP for the example application in this series of blog posts, but you can use any language that Tropo supports.
Deploying and testing an application on Tropo is a snap, and you can even deploy a PSTN number for your application (or you can use the Skype calling number automatically provisioned when you create a Tropo app). More on this in the next post.
Installing CouchDB
The next step in building our cloud telephony application for the new decade is getting CouchDB up and running. The steps listed below detail how to install CouchDB 0.9 on Ubuntu 8.04 (the long-term support version of Ubuntu). A few points before we get started…
This specific combination of Ubuntu and CouchDB is my own preference. I typically run Ubuntu 8.04 when I deploy a new virtual server, but you are free to run whatever version you like, or another Linux distro entirely - its up to you. Depending on the version of Ubuntu you are running, you may be able to get CouchDB 0.9 installed by simply doing sudo apt-get install couchdb.
Keep in mind, though, that the HTTP API for CouchDB can change dramatically between versions - I’ve noticed some significant changes when going from 0.8 to 0.9 - the discussion here will focus on version 0.9 (as does a lot of good documentation on CouchDB available on the web).
If you don’t want to install CouchDB yourself, you may be able to take advantage of one of the growing number of CouchDB hosting services like CloudAnt or Couch.io. Again, its up to you.
To install CouchDB 0.9 on Ubuntu 8.04, using the following steps.
Step 1. Determine what version of Ubuntu is running on your machine:
$ cat /etc/lsb-release
Step 2. Install Erlang - CouchDB 0.9 requires at least Erlang version 5.5.5. If you are running Ubuntu 8.10 or above, you can probably get the required Erlang version by simply doing sudo apt-get install erlang. (Note - The last step in this section may take a while, feel free to go grab a cup of Joe while the source compiles.)
$ sudo apt-get build-dep erlang
$ sudo apt-get install java-gcj-compat java-gcj-compat-dev
$ wget http://www.erlang.org/download/otp_src_R12B-5.tar.gz
$ tar -zxvf otp_src_R12B-5.tar.gz
$ cd otp_src_R12B-5/
$ ./configure && make && sudo make install
Step 3. Install CouchDB dependencies:
$ sudo apt-get install libmozjs-dev libicu-dev libcurl4-openssl-dev
Step 4. Download CouchDB 0.9 Source and install:
$ wget http://apache.mirrors.redwire.net/couchdb/0.9.0/apache-couchdb-0.9.0.tar.gz
$ tar -zxvf apache-couchdb-0.9.0.tar.gz
$ cd apache-couchdb-0.9.0/
$ ./configure && make && sudo make install
Step 5. Create a user for CouchDB (More on this in the CouchDB README.txt file):
$ sudo adduser – –system – –home /usr/local/var/lib/couchdb – –no-create-home – –shell /bin/bash – –group – –gecos “CouchDB Administrator” couchdb
$ sudo chown -R couchdb /usr/local/etc/couchdb
$ sudo chown -R couchdb /usr/local/var/lib/couchdb
$ sudo chown -R couchdb /usr/local/var/log/couchdb
Step 6. Start CouchDB
$ sudo /usr/local/etc/init.d/couchdb start
If you see an error that says:
“Apache CouchDB needs write permission on the PID file: /usr/local/var/run/couchdb.pid”
Do the following, then try starting CouchDB again:
$ sudo touch /usr/local/var/run/couchdb.pid
$ sudo chown couchdb:couchdb /usr/local/var/run/couchdb.pidWhen CouchDB starts successfully, you will see a message that says:
* Starting database server couchdb [ OK ]
Step 7. Test connectivity to CouchDB:
$ curl http://127.0.0.1:5984
You should see:
{”couchdb”:”Welcome”,”version”:”0.9.0″}
The configuration file for CouchDB is located at /usr/local/etc/couchdb/local.ini — in the next post, we’ll modify some of the config settings for our CouchDB instance so that we can access it via HTTP from the Tropo environment.
We’ll also set up our first CouchDB database, add some documents and start coding our new cloud telephony application using Tropo.
Stay tuned…
Friend Connect:
@mheadd Tweets
- RT @damienkatz: RT @tisba: Dead simple: Install #couchdb on #ubuntu (with init scripts to start it automatically) - http://gist.github.c ... #
- [New Blog Post] The Case for Open Transit Data. http://bit.ly/bUy59G #opengov #gov20 #civichacking #netde #
- For those who wonder what open transit data can mean for #Delaware, watch this. http://bit.ly/dwK9eC #SB242 #netde #
- RT @kachok: Interested in WMATA open data? Join their developer's community http://bit.ly/9s37xE #wmata #opendata #gov20 #
- RT @jchris: Not to get into a religious war or anything, but if your open-source project doesn't have a presence on Github, you're doing ... #
Contact Me
Categories:
- Asterisk (14)
- Cell Phones (16)
- CouchDB (6)
- Development Tools (45)
- Digital Divide (8)
- General Discussion (84)
- Linux (10)
- News (20)
- Open Government (48)
- Open Source (35)
- Phone Voting (10)
- Standards (37)
- trixbox (4)
- Tropo (4)
- Tutorials (27)
- Twitter (32)
- VoIP (33)