A comprehensive approach to the IoT challenge