Open orthecreedence opened 3 years ago
Main concerns so far:
<public key I am sharing with>
. Now we're getting into node gossip as part of the protocol, yikes. Or perhaps we don't, and we the put the onus on users to sync their shares to the nodes handling the sharee's sync items. Seems more reasonable as a v1.
node.turtlapp.com/daryl
) that resolves to an ip:port that the share system can use to send the share (this type of lookup system would help in the case where we have a lot of traffic and need to partition users onto different headless nodes).Wow, looks like an awesome feature, but not clear to me. Node - is a "new server"? May we consider the node as replacement for server? Or we assume that clients by themselves are nodes and can communicate with each other directly (phone and desktop as example)?
Or we assume that clients by themselves are nodes and can communicate with each other directly (phone and desktop as example)?
Yes, exactly. Each client would be a node, capable of directly communicating with any other Turtl client/node. This eliminates the need for a server altogether.
I'm putting this here for two reasons: one is to gauge interest, and the other to start spitballing ideas.
I have been thinking a lot lately about decentralizing Turtl: the federating of multiple servers so people can really own their own data. But thinking it through further, federation isn't even the most useful model. Really, the connections between instances are generally a handful of personal devices and also sharing with other people. This lends itself to a more p2p model.
In effect, I think I have this distilled down to a somewhat coherent plan (very open to suggestions):
I'm still thinking about the protocol between nodes, but I think in general it sets up some kind of key exchange:
abc
xyz
chan-sync-xyz
chan-sync-abc
from there, each node would subscribe to each others pubsub channels (thinking 0mq might be useful here, at least to get this off the ground). from there, any changes in data would create a sync record, which is packaged as a message object:
Each
Message
is signed with the originator's private key (and verified by receiver), then forwarded to all interested parties (determining who is interested is undefined right now...public key is an easy one, but not sure about active shares...they would have to be queried, aka, activity on space X by user Y should not just be forwarded to all channels owned by Y, but all channels where X is shared with someone, and shares should store a public key that can be used to set up and encrypt a channel).Nodes store processed MessageID for however long, and if a node comes across a MessageID it has already processed it throws it out. The storage period should line up with the amount of time that sync messages are stored, and if a client is out of sync for longer than that period, it should (after sending any outgoing sync records) re-download the entire profile.
Would love thoughts, ideas suggestions, etc. The goal here is to make Turtl work even in limited connectivity