started on git-annex-shell cluster support

Works down to P2P protocol.

The question now is, how to handle protocol version negotiation for
clusters? Connecting to each node to find their protocol versions and
using the lowest would be too expensive with a lot of nodes. So it seems
that the cluster needs to pick its own protocol version to use with the
client.

Then it can either negotiate that same version with the nodes when
it comes time to use them, or it can translate between multiple protocol
versions. That seems complicated. Thinking it would be ok to refuse to
use a node if it is not able to negotiate the same protocol version with
it as with the client. That will mean that sometimes need nodes to be
upgraded when upgrading the cluster's proxy. But protocol versions
rarely change.
This commit is contained in:
Joey Hess 2024-06-17 15:00:11 -04:00
parent c7ad44e4d1
commit 291280ced2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 87 additions and 62 deletions

View file

@ -215,7 +215,7 @@ data AnnexState = AnnexState
, urloptions :: Maybe UrlOptions
, insmudgecleanfilter :: Bool
, getvectorclock :: IO CandidateVectorClock
, proxyremote :: Maybe (Types.Remote.RemoteA Annex)
, proxyremote :: Maybe (Either ClusterUUID (Types.Remote.RemoteA Annex))
}
newAnnexState :: GitConfig -> Git.Repo -> IO AnnexState