FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Client support for targeted signals

Open WillieHabi opened this issue 1 year ago • 1 comments

Client side changes needed to support targeting signals to a specific client id.

These changes follow the server changes to support targeted signals #19519

ADO Task 7026

WillieHabi avatar Jun 04 '24 13:06 WillieHabi

@fluid-example/bundle-size-tests: +4.94 KB
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 457.99 KB 459.17 KB +1.18 KB
azureClient.js 555.23 KB 556.55 KB +1.33 KB
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 258.67 KB 259.83 KB +1.16 KB
fluidFramework.js 405.21 KB 405.22 KB +14 Bytes
loader.js 134.04 KB 134.12 KB +86 Bytes
map.js 42.13 KB 42.14 KB +7 Bytes
matrix.js 146.41 KB 146.42 KB +7 Bytes
odspClient.js 523.37 KB 524.64 KB +1.26 KB
odspDriver.js 97.55 KB 97.57 KB +21 Bytes
odspPrefetchSnapshot.js 42.61 KB 42.62 KB +14 Bytes
sharedString.js 163.13 KB 163.14 KB +7 Bytes
sharedTree.js 395.72 KB 395.73 KB +7 Bytes
Total Size 3.3 MB 3.3 MB +4.94 KB

Baseline commit: e58c4818375c8aa15c6f3bcfd632fb741031c0db

Generated by :no_entry_sign: dangerJS against d1f86c482022c2f35707bd11dfb62969b446da50

msfluid-bot avatar Jun 04 '24 16:06 msfluid-bot

We now look at all incoming signals to see if they are coming in sequential order. If a signal sequence number(s) is skipped, we log a 'SignalLost' event and continue to monitor for both new signals and out of sequence signals. Once we receive an out of order signal (previously logged as lost), we log a 'SignalOutOfOrder' event.

The sliding 'signal tracking window' is defined by [minimumSignalSequenceNumber, trackingSignalSequenceNumber]. If a targeted signal is sent, the local signal sequence is now broken, so we will ignore all previously sent outbound signals (minimumSignalSequenceNumber = trackingSignalSequenceNumber = 'nextSignalExpected'). We do a similar 'tracking window reset' on reconnect, since we might have missed signals in flight while disconnected.

We still log the roundtrip time for every 100th broadcast signal (broadcastSignalSequenceNumber was added to avoid degenerate case of attempting to track any targeted signal RTT).

@jason-ha

WillieHabi avatar Jul 25 '24 01:07 WillieHabi