Page MenuHomePhabricator

[Tunnelbroker] add MessageToDeviceRequest message
ClosedPublic

Authored by kamil on Oct 12 2023, 4:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 2, 1:06 PM
Unknown Object (File)
Wed, Oct 2, 1:06 PM
Unknown Object (File)
Wed, Oct 2, 1:06 PM
Unknown Object (File)
Wed, Oct 2, 6:01 AM
Unknown Object (File)
Fri, Sep 13, 3:06 AM
Unknown Object (File)
Mon, Sep 9, 1:58 PM
Unknown Object (File)
Sat, Sep 7, 1:50 AM
Unknown Object (File)
Aug 27 2024, 10:55 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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