Initiate sbot connection over Unix socket #57
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We currently only offer the ability to connect via TCP with a secret handshake. Local connections can instead be initiated using a socket (e.g.
.ssb-go/socket
).Reporting back on some investigations into this:
The short story is that supporting Unix socket connections will require a non-trivial suite of changes to kuska and golgi.
kuska expects the reader and writer streams to be wrapped in
BoxStreamRead
andBoxStreamWrite
(https://github.com/Kuska-ssb/ssb/blob/master/src/rpc/stream.rs#L143), this means that we can't simply plug aUnixStream
into theRpcReader
andRpcWriter
struct
s.Perhaps the simplest option would be to rename
RpcReader
toRpcTcpReader
andRpcWriter
toRpcTcpWriter
and create a second set of variants forRpcUnixReader
andRpcUnixWriter
.Not so simple, of course, because then changes would also have to be made to
ApiCaller
(https://github.com/Kuska-ssb/ssb/blob/master/src/api/helper.rs#L97) as well asSbotConnection
(15c5e77da6/src/sbot.rs (L33)
) andSbot
in golgi.My current feeling is that this may be an undesirable amount of work (and change) for what is essentially a 'nice to have'. We are already able to communicate successfully over TCP. The main offering of Unix socket communication is a lowering of the overhead; the secret handshake would not need to be executed on each connection, nor would the box stream need to be created.
I am therefore shelving this change for the time being. I may at some point implement a Unix socket-only client just for fun.