[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:
- alice and bob are both connected to and able to send messages to each other via tunnelbroker
- alice sends a message to bob via tunnelbroker but gets no response, so she resets the connection and tries sending the message again
- 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