A survey on distributed coordination mechanisms in ubiquitous computing