A Formal Framework for Community Computing