Page MenuHomePhabricator

[Tunnelbroker] add MessageToDeviceRequest message
ClosedPublic

Authored by kamil on Oct 12 2023, 4:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 10:35 AM
Unknown Object (File)
Sun, Nov 10, 5:01 AM
Unknown Object (File)
Sat, Nov 9, 9:53 AM
Unknown Object (File)
Sat, Nov 9, 9:42 AM
Unknown Object (File)
Sat, Nov 9, 8:39 AM
Unknown Object (File)
Sat, Nov 9, 4:46 AM
Unknown Object (File)
Fri, Oct 18, 9:02 PM
Unknown Object (File)
Oct 2 2024, 1:06 PM
Subscribers

Details

Summary

Issue: ENG-5149.

Protocol diagram: notion doc.

  1. We want to send request to Tunnelbroker to send message to device.
  2. We add clientMessageID because Tunnelbroker has to know which message to confirm later.
  3. Using clientMessageID - not simple messageID because Tunnelbroker will assign another ID based od timestamp (messages needs to be sorted).
  4. Adding this ID will also fix problem when two separate Tunnelbroker instances will get message for the same recipient in exactly the same time.

Depends on D9461

Test Plan

Run tests (both message and Tunnelbroker integration tests)

Diff Detail

Repository
rCOMM Comm
Branch
tb-work-3
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
michal added inline comments.
services/tunnelbroker/src/websockets/session.rs
171–173 ↗(On Diff #31960)

Not directly related to the diff but I find this easier to read

shared/tunnelbroker_messages/src/messages/mod.rs
19 ↗(On Diff #31960)

I remember we talked about weird serde behaviour with ordering of the enum variants. Do you think it would be worth to add a code comment for this?

This revision is now accepted and ready to land.Oct 13 2023, 7:07 AM

address review

services/tunnelbroker/src/websockets/session.rs
171–173 ↗(On Diff #31960)

adressed here

shared/tunnelbroker_messages/src/messages/mod.rs
19 ↗(On Diff #31960)

right, added