A Multi-Agent Approach for the Deployment of Distributed Applications in Smart Environments Book chapter (October 2016)