Skip to content

Asyncdispatch#103

Open
Patrickguest1998 wants to merge 12 commits into
DataIntellectTech:mainfrom
Patrickguest1998:Asyncdispatch
Open

Asyncdispatch#103
Patrickguest1998 wants to merge 12 commits into
DataIntellectTech:mainfrom
Patrickguest1998:Asyncdispatch

Conversation

@Patrickguest1998

@Patrickguest1998 Patrickguest1998 commented Jun 16, 2026

Copy link
Copy Markdown

di.asyncdispatch (new, standalone)
The async multi-process query coordinator extracted from the gateway. Handles queuing queries, dispatching to available servers, collecting async results, applying join functions, timeout management, and error handling.

Standalone value: any process that needs scatter-gather across multiple backends.

Key data structures:

queryqueue / pending and active queries
results / per-query result accumulator (queryid -> servertype -> result)
clients / connected client tracking

Pluggable hooks (the consumer sets these, not hardcoded):

formatresponse / {[status;sync;result] ...} customise result delivery
availableservers / {[excludeinuse] ...} customise server selection
getnextqueryid / {[] ...} customise scheduling (default: FIFO)
Injected deps: logging, timer (optional, for timeouts).
No framework dependency required.

Screenshot 2026-06-16 151600

Comment thread di/asyncdispatch/test.csv
run,0,0,q,ad.setgetnextqueryid[{()}],1,,override scheduler to never pick a query
true,0,0,q,0~count ad.getnextqueryid[],1,,overridden scheduler is used
run,0,0,q,ad.setcallbacks[`myresult;`myerror],1,,override callback symbols
true,0,0,q,(`myresult;`myerror)~(.m.di.0asyncdispatch.resultcallback;.m.di.0asyncdispatch.errorcallback),1,,callback symbols updated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests all have stubbed responses as far as I can see. Can you we add running up a new process to test against instead of stubbing?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep will do

Comment thread di/asyncdispatch/init.q Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants