openwallet-foundation / didcomm-mediator-service

36 stars 40 forks source link

Add SocketDock to Aries Mediator Service to make HA Mediator #82

Open swcurran opened 1 year ago

swcurran commented 1 year ago

With the availability of SocketDock (https://github.com/hyperledger/aries-socketdock) to nicely take care of managing WebSocket connections with mobile agents, it would be helpful to implement a version of an Aries Mediator with SocketDock, ideally combined with Redis. Per the diagram for SocketDock:

image

Managing WebSocket connections becomes a matter of tracking SocketDock HTTP addresses for connected agents against the DIDComm address for the agent. Something like this (seems right -- but details left for the implementation):

In implementing this, an effort should be made to make all components stateless so that a full HA (high availability) mediator can be deployed, with all components scalable. That implies a need to use Redis for the queuing and for cache consistency for the DIDComm/HTTP address tracking.

The redis work in this PR #78 will be helpful in implementing this.

The underlying mediator can be any component -- ACA-Py, AFJ, or even a "custom" DIDComm mediator.