From eac78d76a9e6e6b35fafa99e2cc76e313d06383a Mon Sep 17 00:00:00 2001 From: emdee Date: Wed, 21 Sep 2022 23:44:46 +0200 Subject: [PATCH] Update 'MultiDevice Announcements POC' --- MultiDevice-Announcements-POC.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 MultiDevice-Announcements-POC.md diff --git a/MultiDevice-Announcements-POC.md b/MultiDevice-Announcements-POC.md new file mode 100644 index 0000000..71f1150 --- /dev/null +++ b/MultiDevice-Announcements-POC.md @@ -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. \ No newline at end of file