QoS-based formation of software architectures in the Internet of Things