-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: no return routing and wait for ping #946
fix: no return routing and wait for ping #946
Conversation
Signed-off-by: Timo Glastra <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #946 +/- ##
==========================================
- Coverage 87.68% 87.67% -0.01%
==========================================
Files 475 475
Lines 11406 11414 +8
Branches 1937 1938 +1
==========================================
+ Hits 10001 10007 +6
- Misses 1338 1340 +2
Partials 67 67
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great Timo!
You mentioned during the WG call this morning that it does seem a little hacky. Would it be appropriate to add a new decorator or add to the return route decorator to address this specific use case, as that way it might not be as hacky? Thoughts?
Could you elaborate a bit on what you mean? |
Yeah, so let's say that in theory the other agents wants to send us a message after a trust ping/connection completion, they potentially could use the HTTP reply, so it's not that we don't want them sending a response it's that they aren't closing the socket in a timely manner when they don't want to send a response.
This field to indicate that we don't want the other party to keep the socket open unless they intend to send a response/another message. |
Interesting. Well the question arises for me, what does keep-alive mean then. This implies a message is always instantly processed and a message may be returned directly, or the socket will be closed. Maybe we should approach it more as the keep alive header in HTTP: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive? I think ACA-Py's implementation shouldn't hang on to the http connection after a message has been processed, which means this wouldn't be an issue anymore. For now I'll merge this as is as it's an improvement in itself. Let's keep looking at other options. |
Good thoughts!
Are you saying we should approach it as in the meaning behind the "keep_alive" field in the transport decorator should more mimic the HTTP keep alive header or as in we should be specifying this at the HTTP level (and standardize when using DIDComm over HTTP)?
Agreed on both accounts |
This PR adds some improvements to return routing. Mainly it adds two things:
As mentioned in openwallet-foundation/acapy#1853, this reduces the connection + request mediation flow time from ~17 seconds to around 1.5 seconds :)