Live Query Reflex for Asynchronous Identification #1963
dmgolembiowski
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's pretend that an EdgeDB user is writing both concurrent and asynchronous code, and they need a way to deterministically map some client message to the corresponding server message over the EdgeDB protocol, but the reader and writer use cooperative fibers.
This should be possible if they encode some enum state pattern into the queries themselves, but that alone is not enough. Two independent fibers, A and B, may run the same query C, but their application owner distributes a workload to poll the results of C.
She needs a reliable way to know which fiber to return f(C) to.
A similar motivation for this would be for EdgeDB to support message brokering in a simultaneously concurrent and async server.
Here's where my idea comes in:
and the query would return:
Existing Implementation
Currently you have to do something like the following to get a similar effect:
which returns:
Beta Was this translation helpful? Give feedback.
All reactions