JANUS: A Framework for Distributed Management of Wireless Mesh Networks