( )⚙ D2902 wireproto: define frame to represent progress updates

This is an archive of the discontinued Mercurial Phabricator instance.

wireproto: define frame to represent progress updates
ClosedPublic

Authored by indygreg on Mar 19 2018, 7:59 PM.

Details

Summary

Today, a long-running operation on a server may run without any sign
of progress on the client. This can lead to the conclusion that the
server has hung or the connection has dropped. In fact, connections
can and do time out due to inactivity. And a long-running server
operation can result in the connection dropping prematurely because
no data is being sent!

While we're inventing the new wire protocol, let's provide a mechanism
for communicating progress on potentially expensive server-side events.

We introduce a new frame type that conveys "progress" updates. This
frame type essentially holds the data required to formulate a
`ui.progress()` call.

We only define the frame right now. Implementing it will be a bit of
work since there is no analog to progress frames in the existing
wire protocol. We'll need to teach the ui object to write to the
wire protocol, etc.

The use of a CBOR map may seem wasteful, as this will encode key
names in every frame. This *is* wasteful. However, maps are
extensible. And the intent is to always use compression via
streams. Compression will make the overhead negligible since repeated
strings will be mostly eliminated over the wire.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Mar 19 2018, 7:59 PM
indygreg edited the summary of this revision. (Show Details)Mar 26 2018, 12:39 PM
indygreg updated this revision to Diff 7295.
indygreg edited the summary of this revision. (Show Details)Mar 26 2018, 2:13 PM
indygreg updated this revision to Diff 7311.
indygreg updated this revision to Diff 7438.Mar 30 2018, 4:32 PM
durin42 accepted this revision.Apr 3 2018, 11:36 AM
This revision is now accepted and ready to land.Apr 3 2018, 11:36 AM
This revision was automatically updated to reflect the committed changes.