Multi-device support is progressing well for #HolosSocial. The tricky part: each device runs its own #ActivityPub server, with its own local data, signing its own activities. Keeping several servers in sync both ways, without duplicating everything, without losing actions on the way, and without two of them handling the same activity at the same time, was the main problem to solve. It also had to stay reliable when a device goes offline for hours or days.
(1/3)
The trick to avoid duplicating everything: the relay keeps one shared copy of incoming activities, and each device tracks where it is in it on its own. Nothing is lost when a device comes back online. Actions done on one device (likes, follows, posts...) sync to the others through the relay. When a device replies to an activity, it checks first that another one didn't already handle it, to avoid doubles or conflicts.
(2/3)
The relay only knows each device by a generated ID and a name. It relays activities but doesn't hold your keys or followers. When signing in on a new device, the app will offer to scan a QR code from the first one to share the account key, with safeguards against ending up with the same account but new keys and no data. It will be possible to see which devices are attached and online, with options to rename or revoke. Work on the relay side is complete, the app side is nearly there.
(3/3)