High level API and backend for writing web apps that use push messaging