HomePhabricator
Diffusion Comm be453da5796e

[services] new tunnelbroker rpc for bidi streaming - design

Description

[services] new tunnelbroker rpc for bidi streaming - design

Summary:
we need tunnelbroker to create a connection id for each device connection that it sends to clients in messages from devices. an example to illustrate why:

  1. alice and bob are both connected to and able to send messages to each other via tunnelbroker
  2. alice sends a message to bob via tunnelbroker but gets no response, so she resets the connection and tries sending the message again
  3. bob receives both messages sent from alice via tunnelbroker. both the messages have the same fromDeviceID but bob doesn't know that one of them can be discarded since it's a duplicate

if tunnelbroker assigns a unique connection id to all of its connections, it can pass messages from alice to bob with its connection id for alice. this way, if bob receives a message from alice's device with a different connection id, bob knows how to reconcile this (whether to ignore it or initialize a new socket)

Test Plan: n/a

Reviewers: ashoat, atul, karol-bisztyga, geekbrother, palys-swm

Reviewed By: ashoat, palys-swm

Subscribers: Adrian, benschac

Differential Revision: https://phabricator.ashoat.com/D3073

Details

Provenance
varunAuthored on Feb 2 2022, 9:52 AM
Reviewer
ashoat
Differential Revision
Restricted Differential Revision
Parents
rCOMMe504fd23f894: [web] [fix] header word mark font
Branches
Unknown
Tags
Unknown