You are reading content from Scuttlebutt
@andrestaltz %ggO48IXDSNyOIh55EwScgRPQo30K1BKB4b5ZUIruXeI=.sha256

#ssb-dev #a2a

(Usually I send messages like this as PMs to @Mix @mix and @arj @Mobile arj but I think it's okay to post it publicly as it may spawn new ideas)

I'm thinking again about A2A (app-to-app SSB "inter-process communication) and it's tricky, there is no one approach that works the same in all operating systems. Might have to make an A2A spec individually for each OS. I considered SSB URIs, then I considered random TCP ports, then I considered IPC like unix socket and other things.

Recap: the problem at hand is "how to bootstrap app A given that you already have app B installed, and that these apps cannot read the same folders". As a concrete example, suppose you have iOS (the most restrictive OS) and you have Manyverse installed. Then you install another app TicTacToe, and you would like to use your social graph from Manyverse's database to kickstart TicTacToe's feed and database, so that TicTacToe will import all the contacts and make it easy to start a game with a friend.

First I thought about using SSB URIs that contain a little bit of bootstrapping data, and addresses for both apps to connect to each other and transfer more data. But URIs are tricky because you may have two apps for the same URI scheme and one may be set by default, and that's the realm of the OS. Say you have Manyverse and Planetary installed, and then you want to bootstrap TicTacToe and you press an SSB URI. You have very little choice, you don't know if the OS will open Manyverse or Planetary and there's no UI that allows you to pick (I suppose).

Then I considered random ports. Like Manyverse can set up a TCP server on a random port, displays the port to the user, and then the user has to manually input the port inside TicTacToe. But the UX of this is a bit worse, and the security may be worse too because some other machine may try to be a client on that port.

Then I abstracted away from these details and thought "this is just inter-process communication (IPC)", so we should just use the best IPC method specified by the operating system. On Linux or macOS, it could be unix sockets. On iOS, I don't know, but maybe it could be "App Extensions" like the "Share to" sheet that opens up other apps.

THEN I realized that we shouldn't assume that the two apps are necessarily on the same computer. What if I have Manyverse installed on my phone but TicTacToe is on my computer? I "own" both apps, so the commonality is the owner, not the device. And that was a really important realization because I need to back off from IPC and consider in general the "authentication" process, and it'll have to be done over the network (either LAN or Internet, probably not LAN-only), and we all know how hard it is to have peer-to-peer connections on the internet, unless... we do it via a room.

So at the moment I'm thinking about some new "bootstrapping authentication thing" similar to tokenized room aliases and similar to sign-in with SSB. Nothing concrete yet, but as a note to self, and sharing to the community, wanted to write this.

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
@andrestaltz %rpbAS+wrbQTl7GakjhFzsufo+XPD/n9s8jE8nrmxirY=.sha256

@Mix Android A2A (or whatever else we come up with) will be pertinent to Fusion Identities, but they are not the same thing and we can't use Fusion Identities for everything.

For Fusion Identity to work, the two peers will have to communicate somehow. A2A is about establishing that initial communication with the two peers and signalling that they want to perform Fusion Identity. They might want to perform something else, like maybe TicTacToe wants to be a subfeed of the root metafeed in Manyverse. Subfeeds are different to Fusion Identity. Or maybe there could be a migration process from Manyverse to Bookface, where we want to establish a connection between both, but we want to copy everything from one to the other, and delete the former. These are the different use cases I could think of when one app needs to bootstrap its initial content from another app, there may be even more use cases.

@andrestaltz %wUaG6StHcS4vJkivtf2qr20CyYxKQoI71ptfhtHLmlc=.sha256

would mdns help for auto ports discovery? I haven't thought about that! That's good for LAN, but I'm also looking for a solution that works over the internet (say your phone is on 4G and your computer is on Wi-Fi even thought both are physically near).

@Matt Lorentz (planetary) %8fYTB+tMFf3XPOaRgtUK+H37qKhz4vPMoTVYgIN6iK4=.sha256
Voted #ssb-dev #a2a (Usually I send messages like this as PMs to [@Mix](@G98Xybi
Join Scuttlebutt now