So Summer 17 brings the new Apex Metadata API. What I am trying to do is start a deployment from a Visualforce page, and then display the results on the page once the deployment has completed.
One thought I had was to create a platform event, have the Visualforce page subscribe to it, and then publish it from the callback. There would be no need to do any polling. Except it seems that when the callback publishes an event, nothing happens. The callback is being called, the platform event works outside of the callback, DML works inside of the callback, but platform events do not seem to work inside of the callback. There are no errors in the debug log.