Mechanisms of self-organization in pervasive computing