Edge-centric Distributed Discovery and Access in the Internet of Things