Design an API layer that lets Tonal communicate state changes to a cloud backend with minimal latency.