Model-driven methodology for rapid deployment of smart spaces based on resource-oriented architectures