Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Improve Upload Experience: Part II
Merged fintohaps opened 1 year ago

Further improvements to the upload experience. See commits inlined below.

cli: upload-pack events and spinners

Introduce a set of types for initialising and updating a set of spinners for upload-pack events. The spinners react to the events that are emitted from the upload-pack process in the worker.

Each set of spinners are for a given remote since the protocol may interact with multiple remotes at the same time when announcing.

The spinners are lazy when first constructed and are only constructed once an upload-pack event is provided for a given remote.

The events expected for the spinners are: enumerating objects, counting objects, compressing objects, and the throughput of sending the bytes to the receiving end.

node: simplify upload-pack reader joining

The join method is equivalent to the custom loop that was written for joining the reader thread in upload-pack.

node: reduce default upload-pack timeout

The default upload-pack timeout can be reduced by noticing the fact that if the stdout stream is still sending data, then the reader thread can stay alive.

This is achieved by keeping a timer that gets set everytime the upload-pack writer sends data. If the reader then runs into a timeout, it can check if this timer has elapsed the timeout as well, otherwise it can loop back and read again. This will either lead to waiting long enough that the EOF message is received, or both streams timeout.

From empirical testing, this can result in the timeout being exceeded but the EOF message not being received, if the pack data is large enough that the receiving side takes more time to write it to disk. However, this means that the upload should, in theory, have completed successfully either way.

The --timeout option is also used in the git-upload-pack process for good measure.

fintohaps opened with revision 6e8552ea on base 85aeb2e0 +420 -24 1 year ago

Further improvements to the upload experience. See commits inlined below.

cli: upload-pack events and spinners

Introduce a set of types for initialising and updating a set of spinners for upload-pack events. The spinners react to the events that are emitted from the upload-pack process in the worker.

Each set of spinners are for a given remote since the protocol may interact with multiple remotes at the same time when announcing.

The spinners are lazy when first constructed and are only constructed once an upload-pack event is provided for a given remote.

The events expected for the spinners are: enumerating objects, counting objects, compressing objects, and the throughput of sending the bytes to the receiving end.

node: simplify upload-pack reader joining

The join method is equivalent to the custom loop that was written for joining the reader thread in upload-pack.

node: reduce default upload-pack timeout

The default upload-pack timeout can be reduced by noticing the fact that if the stdout stream is still sending data, then the reader thread can stay alive.

This is achieved by keeping a timer that gets set everytime the upload-pack writer sends data. If the reader then runs into a timeout, it can check if this timer has elapsed the timeout as well, otherwise it can loop back and read again. This will either lead to waiting long enough that the EOF message is received, or both streams timeout.

From empirical testing, this can result in the timeout being exceeded but the EOF message not being received, if the pack data is large enough that the receiving side takes more time to write it to disk. However, this means that the upload should, in theory, have completed successfully either way.

The --timeout option is also used in the git-upload-pack process for good measure.

fintohaps pushed revision 2 a7717f12 on base 6dd52c94 +928 -143 1 year ago

Changes:

  • rebased
  • handle errors in the upload pack spinners
fintohaps pushed revision 3 00d7162d on base 6ab3bfcb +959 -159 1 year ago

Changes:

  • rebased
fintohaps pushed revision 4 5c1d22f8 on base 25c6660a +867 -159 1 year ago

Changes:

  • rebased on 55e905613ddf81fb04c69ab6fa6f4fd99622d789
fintohaps pushed revision 5 ee7c137d on base 3b342ab3 +456 -22 1 year ago

Changes:

  • rebased on 3b342ab385810fd3e67ec1fb05f45b27ba50bc36
fintohaps pushed revision 6 a3e8270e on base cb2cbf01 +175 -22 1 year ago

Changes:

  • Remove extra spinners since they didn’t work as the author expected :(
  • Simplify the terminal output to display the number of remotes being uploaded to and the transmitted bytes/throughput, as well as when an upload is finished for a peer.
fintohaps pushed revision 7 6997e3a6 on base d839418c +149 -24 1 year ago

Changes:

  • Removed inner timeout semantics between upload-pack threads
did:key:z6MksFqX...wzpT pushed revision 8 712829e6 on base 3fe6bbe1 +149 -24 1 year ago

Rebase, small fix.

did:key:z6MksFqX...wzpT merged revision 712829e6 at 064ece32 1 year ago