Integration of NodeConnectionManager for Vaults domain #338
Labels
development
Standard development
r&d:polykey:core activity 1
Secret Vault Sharing and Secret History Management
Specification
The
VaultManager
should be able to use theNodeConnectionManager
to receive connections.We have 2 choices as to how to do this. Either by composition or encapsulation.
In composition, methods of
VaultManger
expect the caller to produce a node connection to be passed in to do the work against.In encapsulation,
VaultManager
takes theNodeConnectionManager
, and creates its own connections internally to use.Either way, they will end up using
NodeConnectionManager.withConn
.Refer to #225 as to how to do this.
If we choose to do composition, the job of composition is in our service handlers.
If we choose to do encapsulation, then it's all bundled inside
VaultManager
.Composition is fundamentally more flexible, it allows the orchestrators/service handlers to potentially coordinate over multiple nodes when performing operations. It is more future proof. If we do this, we should extend the model to other managers like
NotificationManager
later.Currently this is using the encapsulation style. The
VaultManager
holds a reference to theNodeConnectionManager
and passes it to the twoVaultInternal
functions that specifically need it.Additional context
Tasks
NodeConnectionManager
API.The text was updated successfully, but these errors were encountered: