  Nowadays, the Internet of Things (IoT) creates a vast ecosystem of
intelligent objects interconnected via the Internet, allowing them to exchange
information and to interact. This paradigm has been extended to a new concept,
called the Web of Things (WoT), considering that every physical object can be
accessed and controlled using Web-based languages and protocols, such as: the
CoAP protocol which is becoming the most accepted and suitable protocol in this
context. Moreover, the architectures currently proposed for the creation of IoT
environments lack efficient and standard support for the discovery, selection
and composition of IoT services and their integration in a scalable and
interoperable way. To overcome this, in this work, we propose a hybrid and
distributed CoAP-based architecture, considering all these aspects by combining
the Fog Computing paradigm and structured P2P overlay networks. Furthermore, we
describe the different components of our architecture and explain the
interaction between them.
