Architecture Update #722
Replies: 3 comments
-
This sounds interesting @jakubkoci! Maybe we can spend some time on it during the WG call tomorrow and derive actionable issues from it! Some initial thoughts on your points:
I think this is exactly how didcomm v2 works, and therefore not a bad thing. By defining a select number of protocol as core protocols, we can keep the core didcomm functionality 'lean', while allowing for extension in non-core protocols. The DIDComm v2 spec defines a few protocols as native to the spec, so we could easily include those in the
TBH my thoughts would be the direct opposite of this. Although connections are a core part of DIDComm v1, there's no notion of connections in didcomm v2. There's just dids, which form a relation. So it wouldn't make sense to me to add a dependency from dids to conenctions. I do agree though that a didcomm module that has a method |
Beta Was this translation helpful? Give feedback.
-
Really? AFAIK the way you establish connections in DIDComm V2 is different than in DIDComm V1 -- e.g. it can be done as part of sending a message (0-RT) vs. as using a specific protocol. However, AFAIK, there is still the concept of a connection. You still have to track other metadata about the DID, including the DIDs each side uses in communicating with the other. How do you see it? |
Beta Was this translation helpful? Give feedback.
-
As you don't need a connection anymore to send a message (just two dids is enough), I think a connection can become something optional. Sure it's useful and probably something we want to keep. But because it's something optional I would say it's something separate from dids and didcomm, but more an agent feature. Let's say we have the following code. By sending a message like this, the await agent.didcomm.sendMessage(message, connection.theirDid, connection.myDid) You probably still want to know whether a relationship (connection) exists when receiving messages so you know the combination of dids is known to you, but is something optional that could be built on top of the didcomm module In AFJ we don't check whether the connection is active before sending a message to the message handler. Then in the handler of a message you can choose to assert a relation exists (currently using BTW I asked this in the DIDComm user group discord, to see what they think: https://discord.com/channels/900385725462229022/911224279885033533/969170888647905310 |
Beta Was this translation helpful? Give feedback.
-
As a developer, I want to separate parts of the framework into a standalone module with clear boundaries (API) so that it fits in my head, I can understand a smaller amount of code to maintain and enhance it.
Folder structure:
dids
,crypto
,ledger
,wallet
maybetransport
.Ideally, I would like to have
didcomm
module without dependency on other protocols. The problem is with connections. We are using connections inside objects I want to move todidcomm
. But, connection protocols, like any other protocol, need to send a message viadidcomm
module. I have the following solutions/approaches in my mind:protocols
todidcom/protocols
. That would allow to hide implementation details and introduce strict one-way dependency fromprotocols
todidcomm/protocols
. Then, we can calldidcomm.sendMessage(message, toDid, fromDid)
from other modules.The problem is it creates a concept where there are some protocols inside didcomm, but the rest of the protocols are just in protocols. Should that be rather organized in a way
credentials/protocols
,proofs/protocols
? How would anyone understand where to put another type of protocol and how to name it?Removing dependency
connections
->dids
, adding dependencydids
->connections
and resolve DIDDocument needed insidedidcomm
viadids
module.Eventually add some
Connections
interface todidcomm
and implement it insideconnections
.The concept of
common
vs.infrastructure
is still questionable. Does it bring any benefit to separate those? I like the idea when infrastructure represents something without any dependency inwards (to other parts of the framework).Explanation of responsibilities of protocol implementation
Other small bits to reconsider:
core/src/types.ts
have dependencies to a lot of other parts of the framework, but it should be rather a leaf.Beta Was this translation helpful? Give feedback.
All reactions