Update 'MultiDevice Announcements POC'
parent
ac555c1def
commit
eac78d76a9
21
MultiDevice-Announcements-POC.md
Normal file
21
MultiDevice-Announcements-POC.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
We need to solve the usage of Tox with multiple devices.
|
||||||
|
|
||||||
|
The idea here is to address one simple usecase: a person can have multiple devices and he wants one device to be "active" at any given time. So he pushes an annoucement of what device he is currently using so that others can communicate to the device he is using.
|
||||||
|
|
||||||
|
The POC ignores for now the problem of history sync that this creates. We can address that later perhaps with tools like rsync.
|
||||||
|
|
||||||
|
The proposal assumes that there will be a lag time between him pushing an annoucement and others getting it and being able to find him.
|
||||||
|
|
||||||
|
The POC assumes he pushes on a regular basis and we choose hourly for the moment, if the network can stand it. We assume he pushes only when he is online.
|
||||||
|
|
||||||
|
The idea is to firstly define a PersonaID, much like a ToxID that stays permanent and maps the Person to the active ToxID.
|
||||||
|
|
||||||
|
So the first step is to change all library code and all clients to work with PersonaIDs instead of ToxIDs. A simple step of duplicating all code that deals with ToxIDs to have a 1:1 layer of calls on top that take the PersonaID and consult a table that contains the active ToxID, and then calls the ToxID function.
|
||||||
|
|
||||||
|
For the sake of argument, lets say that the table is initially populated with from all the existing known ToxIDs by deriving a default PersonaID from a ToxID by a simple method. We'll adopt the simplest mechanism although we can do better: the default table contains a PersonaID that is the ToxID with a checksum of all zeros.
|
||||||
|
(we ignore for now the possibility of a real all zero checksum.)
|
||||||
|
|
||||||
|
So we can add this layer of PersonaID->ToxID mapping to the library and all clients right away with no breakage. In time the clients move to showin the PersonaID not the ToxID as primary, and add the ability to see (but maybe not change) the active ToxID.
|
||||||
|
|
||||||
|
So we could get the whole network switched over to accomodating PersonaIDs with no breakage.
|
Loading…
Reference in New Issue
Block a user