me-box-archive / databox-netdev

Old Dev version Databox OS container manager and dashboard server (do not use)
MIT License
3 stars 6 forks source link

Async-ify dashboard requests #33

Open yousefamar opened 7 years ago

yousefamar commented 7 years ago

This is not super critical, but just thought I'd make a note of it. (It's also kind of my fault since it's built on shortcuts from the earliest iterations of the CM).

Dashboard requests to the CM are for the most part blocking. One place where this is most noticeable is when installing apps. Now that we use HTTPS everywhere, the CM takes a while to generate certs, and while it's doing that, the dashboard freezes as it waits for a response.

Since we have that Docker event emitter streaming over WS, we might as well have these requests respond immediately, then the Dashboard is free and can wait for a "created" or "started" event to update it's UI. This could be extended to show some sort of "loading" indicator that says what's happening so that the user/dev doesn't think their Databox crashed when it's actually just generating certs.