Closed Bug 1168852 Opened 10 years ago Closed 9 years ago

Define a v1 schema for the data channel for use with text chat

Categories

(Hello (Loop) :: Client, defect, P1)

defect
Points:
3

Tracking

(Not tracked)

RESOLVED FIXED
Iteration:
43.2 - Sep 7

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Whiteboard: [chat][not a code change])

We should decide on a v1 schema for the data channel, so that we have a reference document when talking between different parts of Loop. It should define the basic standard for: - Text messages - Notifications - In-chat link context transfer as well as allow for future expansions.
Rank: 20
Flags: firefox-backlog+
Whiteboard: [chat]
Assignee: nobody → standard8
Iteration: --- → 41.2 - Jun 8
Rank: 20 → 12
Priority: P2 → P1
Iteration: 41.2 - Jun 8 → 41.3 - Jun 29
Iteration: 41.3 - Jun 29 → 42.1 - Jul 13
Iteration: 42.1 - Jul 13 → 42.2 - Jul 27
Iteration: 42.2 - Jul 27 → 42.3 - Aug 10
Iteration: 42.3 - Aug 10 → 43.1 - Aug 24
Ok, here's a first version: https://wiki.mozilla.org/Loop/Architecture/Data_Channels I know we're going to add more formats soon, so I'm trying to be generic as possible. Adam, Mike: Can you update the document with any changes you think necessary or just note them here?
Flags: needinfo?(mdeboer)
Flags: needinfo?(adam)
Iteration: 43.1 - Aug 24 → 43.2 - Sep 7
(In reply to Mark Banner (:standard8) from comment #1) > I know we're going to add more formats soon, so I'm trying to be generic as > possible. > > Adam, Mike: Can you update the document with any changes you think necessary > or just note them here? The concern I have with this proposed design is that, while it's just fine for text messaging, it's quite chatty for high-frequency updates, like the ones we'll start to see when we add mouse pointer position information. The most minimal change I can think of here would be shortening the name "contentType" to something like "o" (for "operation" -- or choose your favorite letter). This would shorten mouse events to something like: {"o":"m","p":"872,347"} But that's still a little on the chatty side (~24 bytes per pointer position change). I really don't know what best current practices for sending this kind of thing on datachannels are, but my inclination would be to figure out a way that would allow sending binary information here, at least for mouse events.
Flags: needinfo?(adam)
Valid concern. I can see us having a over-the-wire protocol and a chat message structure protocol as separate entities when the need arises. Because one other future use-case would be p2p file transfer. You know, the thing Opera tried to solve once. Perhaps it's a good idea to already make this distinction in the proposed spec. We can also adjust it as we move forward with cursor sharing.
Flags: needinfo?(mdeboer)
My idea for pointer position, is that we'd open up multiple data channels. One for text/context changes, which could use the structure described, one for the pointer position change, then possibly more as required. That would also mean that, in theory (I assume), sending text data on one channel wouldn't be delayed until any backlog of pointer data on a different channel had cleared (which is what would happen if there was just one channel). I've updated the document to try and reflect the multiple data channel & different data types a bit better: https://wiki.mozilla.org/Loop/Architecture/Data_Channels Obviously, I'm not defining the pointer types yet until we get closer to working with them.
Flags: needinfo?(adam)
(In reply to Mark Banner (:standard8) from comment #4) > I've updated the document to try and reflect the multiple data channel & > different data types a bit better: > > https://wiki.mozilla.org/Loop/Architecture/Data_Channels > > Obviously, I'm not defining the pointer types yet until we get closer to > working with them. This seems reasonable.
Flags: needinfo?(adam)
Ok, great, I'll call this done.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [chat] → [chat][not a code change]
You need to log in before you can comment on or make changes to this bug.