@ -32,7 +32,6 @@ ToxID’s are difficult to share without having an existing textual
communication connection (anything you can copy from or paste
to). Sharing ToxID’s in other ways is problematic.
When it comes to multi-device support, at the present time we are
lagging behind well-known centralized messenger systems. A few
examples are Google Hangouts, Facebook Messenger, and Skype. Every one
@ -40,25 +39,27 @@ of these syncs messages to every device which connects to their
network. If you need an address, number, or entire friend list it’s a
simple login away.
Not the goal of this project but an important benefit, Multi-Device support would solve some of the issues sharing a ToxID: it would allow the clients to connect with mobile devices (NFC, QR codes, other) and be available anywhere.
Not the goal of this project but an important benefit, Multi-Device
support would solve some of the issues sharing a ToxID: it would allow
the clients to connect with mobile devices (NFC, QR codes, other) and
be available anywhere.
## Prerequisites
### Data Syncing (Friends and Messages):
Devices may go online and offline. It’s required that an online device be able to keep other devices in the “device group” in sync, Updating both friends and messages.[a][^1][b][^2]
Devices may go online and offline. It’s required that an online device be able to keep other devices in the “device group” in sync, Updating both friends and messages.(a)[^1](b)[^2]
### Contact Syncing
Contacts (called friends in the Toxcore API) are synced across all
devices using a transactional method. As a pair the devices decide
which will have the primary role, and which will take
secondary. Throughout the entire syncing process, the primary device
will send it’s data, followed by a “done” packet. The secondary will
then send its data, followed by its own “done” packet. The primary
device will then send a “commit” packet, and will then commit the data
from temporary storage, into active use. Once receiving the “commit”
which will have the primary role, and which will take secondary.
hroughout the entire syncing process, the primary device will send
it’s data, followed by a “done” packet. The secondary will then send
its data, followed by its own “done” packet. The primary device will
then send a “commit” packet, and will then commit the data from
temporary storage, into active use. Once receiving the “commit”
packet, the secondary device will do the same.
Either Client can send an Error packet at either time, which will then
@ -108,8 +109,15 @@ Security and safety is the primary concern, however this needs to be tempered wi
### Device IDs
Device IDs need to be unique and never changing. On each connect, each client should query each friend they connect to, to verify if they support multi-device AND are in a group. This can be done by asking for the deviceID at ```__device0```. If there is a device at that address; then enumerate for each other device.
Devices will be found by the string_to_id service using the protected `__device[0-9]+` group. (Toxcore must protect strings that start with two underscores such as “__[string]”, and not allow a client to use them in the string_to_id API.)
Device IDs need to be unique and never changing. On each connect, each
client should query each friend they connect to, to verify if they
support multi-device AND are in a group. This can be done by asking
for the deviceID at ```__device0```. If there is a device at that
address; then enumerate for each other device. Devices will be found
by the string_to_id service using the protected `__device[0-9]+`
group. (Toxcore must protect strings that start with two underscores
such as “__[string]”, and not allow a client to use them in the
string_to_id API.)
Starting with ```__device0```, the client will attempt to resolve the
@ -153,7 +161,10 @@ friend/contact list, and the selected amount of history text history
to the new device.
A max limit of devices will need to be chosen later to limit worst case usage of enumerating devices. (Additional protocol requirements will be detailed later, i.a. security limitations, verifiable, master device, slave device, deauthed devices.)
A max limit of devices will need to be chosen later to limit worst
case usage of enumerating devices. (Additional protocol requirements
will be detailed later, i.a. security limitations, verifiable, master
device, slave device, deauthed devices.)
## Message sending
@ -170,8 +181,8 @@ received the message, and may stop. This will protect the sender from
having to maintain a list of who needs what message, and leave the
additional data syncing up to the receiving client.
It is considered the job of the receiving client to keep all the other devices in sync with the rest of the group.
It is considered the job of the receiving client to keep all the other
devices in sync with the rest of the group.
### Alternatives Considered
@ -195,7 +206,7 @@ Effective and secure history syncing across devices.
How to add a user to your contact list
* By Primary ToxID[f][^6][g][^7]
* By Primary ToxID(f)[^6](g)[^7]
* By any deviceID
* Something else?
@ -253,8 +264,6 @@ Conversations that need to be added to the spec:
```
### Feature Requests:
(Requested publicly, no suggestions have been reviewed or accepted yet.)
@ -266,30 +275,30 @@ Conversations that need to be added to the spec:
## Footnotes
* [a][^1] Does this design document define a way in which friends (and perhaps groups) are to be synced? And how would friend/group syncing work across multi-devices that don't have a common time base?
* (a)[^1] Does this design document define a way in which friends (and perhaps groups) are to be synced? And how would friend/group syncing work across multi-devices that don't have a common time base?
* [b][^2] I haven't fully decided on the final spec for this question.
* (b)[^2] I haven't fully decided on the final spec for this question.
Currently my plan is to retain information about changes as a numerical delta, and use the largest delta. But as I haven't started on this section, really I have no idea.
* [c][^3] What about in the case of an A/V call? Does that get broadcast to call connected clients or only the last 3? A tox client running on a mobile device that had not sent a user-generated message missing a call would be bad.
* (c)[^3] What about in the case of an A/V call? Does that get broadcast to call connected clients or only the last 3? A tox client running on a mobile device that had not sent a user-generated message missing a call would be bad.
* [d][^4] I'm likely to drop that idea in total.
* (d)[^4] I'm likely to drop that idea in total.
Currently toxcore sends everything to all devices.
* [e][^5] With other services such as Discord, when a call comes in depending on what is on, I could have two PCs, a laptop and cellphone all ring, but whatever device I answer on obviously gets the call.
* (e)[^5] With other services such as Discord, when a call comes in depending on what is on, I could have two PCs, a laptop and cellphone all ring, but whatever device I answer on obviously gets the call.
* [f][^6] how is primary toxID different from any other ID? which device is the primary one? as far as I understood they are all equal.
* (f)[^6] how is primary toxID different from any other ID? which device is the primary one? as far as I understood they are all equal.
* [g][^7] I'm not sure there's going to be anything like a primary ID in the final source. When discussing it, the idea of a master device came up as a security tool. But the longer I consider it, the less I think it'll help at all
* (g)[^7] I'm not sure there's going to be anything like a primary ID in the final source. When discussing it, the idea of a master device came up as a security tool. But the longer I consider it, the less I think it'll help at all
* [h][^8] Does it make sense to think about sending the file to both
* (h)[^8] Does it make sense to think about sending the file to both
clients, if the user accepts on multiple devices? Especially for
bigger files or multiple recipients a P2P protocol (e.g. torrent)
may be useful.
* [i][^9] Yeah, I've given that a little thought. The current idea
* (i)[^9] Yeah, I've given that a little thought. The current idea
floating around has been to implement something torrent like inside
group chats. Maybe we could use that as well? As far as multiple
devices, what I think is best is transfer the file to the first to
@ -297,7 +306,7 @@ Currently toxcore sends everything to all devices.
way the sender doesn't have to spend the extra data for the
receivers convenience.
* [j][^10] I like that idea. Especially if one thinks about those users
* (j)[^10] I like that idea. Especially if one thinks about those users
on a phone with limited traffic. You wouldn't want to use all your
available data just so others can sync. You could add a button on
top of lets say a picture saying "sync with my other devices" to
@ -305,4 +314,5 @@ Currently toxcore sends everything to all devices.
just sending it once should be a lot easier. I'd consider media sync
between my devices as a nice-to-have.
* [k][^11] Could it be a good idea to allow sync incomplete downloaded files from device A to device B and then start downloading from device B
* (k)[^11] Could it be a good idea to allow sync incomplete downloaded
files from device A to device B and then start downloading from device B
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.