KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Query Routing/ Load Balancing / asynchronous callbacks Re: Query Routing/ Load Balancing / asynchronous callbacks

  • simon_watson_sj

    Member
    May 11, 2022 at 12:00 am

    Hey David – updates!

    I think the Query Router white paper might have a couple of quirks that are me causing issues. (Although at the moment I feel like the guy in the 2000’s who blames Bill Gates when he stuffs up is VB code)

    I think the main issue is this:

    returnRes:{[res] uh:first exec uh from queryTable where sq=(res 0); // (res 0) is the sequence number if[not null uh;(neg uh)(res 1)]; // (res 1) is the result queryTable[(res 0);`ret]:.z.p }

    In particular:

    (neg uh)(res 1)

    I think res causes a `Type failure because it needs to be a string. I’ve tried:

    (neg uh) .Q.s1 (res 1)

    but that doesn’t return anything that shows up anywhere. Interestingly, if I do something like (neg uh)”foo:123″;(neg uh)””;

    from the gateway, then I do get a variable called foo with that value on the client.

    My next attempt will be to either adjust the query process so it assigns return data to a variable or go through the async paper again and see what the standard method is.

    I will let you know how I go.

    Simon