2022.01.18 01:54 AM
Hi Team, I am trying to setup a q service with multithreaded input queue mode to serve data from disk. Disk has partitioned data by a unit, and each query will only access the data from that unit. A unit of data can be added /deleted during runtime informing service about the availability or unavailability of the unit and this will be done by main thread.
I wanted to understand is there any issue in doing this as on site it is mentioned to not to use this mode for serving data from disk : https://code.kx.com/q/kb/multithreaded-input/
Thanks!
2022.01.18 09:52 AM
Hello @devarsh206
Great content for our community! Thanks for sharing.
From reading the documentation, the key take home is that it is inefficient and therefore, not advised.
We welcome further feedback from our fellow community contributors.
Kind regards,
Leah
2022.01.19 01:10 AM
To avoid user queries blocking each other, you can set up a pool of q processes (HDBs) and use socket sharding as per https://code.kx.com/q/wp/socket-sharding/ or a TCP load balancer.
2022.01.19 03:58 AM
Yes, that can be done. But wanted to understand what is the issue in using already available mtim mode.
As by this it will reduce the work and maintenance of load-balancers and gateways.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.