hyperledger / aries-cloudagent-python

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
404 stars 511 forks source link

How to maintain multiple web socket session opposite of a single connection id in aca-py mediator for multi-Device Message Delivery #3196

Open Arif-Shahriar028 opened 3 weeks ago

Arif-Shahriar028 commented 3 weeks ago

Using wallet backup and restore concept (in bifold wallet), I am using same wallet with same data in two mobile devices. In my expectation, if any agent sends a message to my wallet agent, then both of the device should get the messege (via acapy mediator). But only one device is receiving the message because of mediator's websocket session management.

So in aca-py mediator, for a connection id, I want to maintain multiple websocket session so that if any agent send message to my mobile wallet, both mobile should receive the message.

I have read a documentation in hackmd about the architecture of this session handling process, but there is not much information for clear understanding.

How can I maintain a list of sessions associated with each connection ID where each session corresponds to a different device?

I have added a simple illustration of my thought:

image

swcurran commented 1 week ago

Unfortunately, this type of functionality is not currently supported. Private keys needed to decrypt messages sent to an instance of a wallet are not shared across wallets, and as a result, messages are specific to a device. Further, there is not in the current mediator protocols a method for forwarding a single message to more than one wallet instance.

These types of issues do need a solution, but to this point have not been a priority. This is something you might want to bring up at the DIDComm Working Group at the Decentralized Identity Foundation (https://decentralized.identity).