set the state of something using couchdb as your state store