-
Hi everyone, something like this: function acceptDIDComm(req: Request, res: Response) { What am I doing wrong? What am I missing in understanding the whole mechanism? :) Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Thank you for raising this! I don't think you are doing something wrong. Our message handling API needs to be reworked. A possible new architecture is this: |
Beta Was this translation helpful? Give feedback.
Thank you for raising this!
I don't think you are doing something wrong. Our message handling API needs to be reworked.
The two types of
MessageHandler
that you very well spotted need to be separated into different plugins, as this messageHandler chain architecture we have now is quite inflexible and confusing.A possible new architecture is this:
One plugin should be just pass-through handlers which should only do some heuristic work to convert a blob of bytes into something with a
type
. Then, based on thistype
, validators and protocol handlers can pick it up and interpret the message.Of course, this is just an idea, and other constructions are also possible.
Please share if you think …