Stack4Things: an OpenStack-based framework for IoT