Description
Problem
Currently, the kernel protocol over ZMQ in the back-end is "forwarded" to the front-end over a WebSocket. This brings a lot of complexity to the front-end, which has to speak this protocol.
With JupyterLab moving to RTC, the (notebook) UI becomes merely a shared document editor: the user enters some text in a cell, asks for execution, sees outputs being populated, clears outputs... There is no need for the front-end to e.g. interpret IOPub messages in order to display results, all this could be done in the back-end and directly modify the shared document, which would automatically update in the front-end.
Proposed Solution
We could create a much more simple REST API for kernels, which would consist of e.g. "POST execute request", etc.
All kernel state information (idle, busy, dead, restarting...) could go to the new event system.