A low-friction platform for managing state and messaging of IoT devices in the cloud