Handling promises resolvers with an in-memory Map
object
#2638
Unanswered
jordanthornquest
asked this question in
Q&A
Replies: 1 comment
-
(Full disclosure, I'm also asking the same question on the Hono Discord.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello folks,
I am developing an app that's using a structure similar to the one below:
The project I'm building requires starting a request from one client and "confirming" the request from another client. This means that client A must reach out to the
/hello-request
endpoint, and client B must use/hello-confirm/:helloId
to resolve the request. This also works under the assumption that client B would be sent thehelloId
value in a separate step.Understandably, this kind of callback-driven request structure isn't ideal. However, it is the design I must use in the constraints of my current project.
Broadly, I have 3 questions:
Map
object that can be passed between routes and submodules should work, but I'm unclear if there are any mutability or concurrency issues I might run into.pendingRequests
from the top-level in-memory storage?Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions