A practical guide to writing CouchDB plugins