2020.10.11 03:13 PM
Hi All,
I'm trying to start up kdb with multiple processes to use to write scripts with KDB developer. I understand that the processes that are set up need to be done so outside of the master process.
I have attempted to do this with a function in my .bashrc that creates 7 instances which are expecting a maximum of 8 processes. I then start up a final process with developer. When I do this and try to connect, my OS informs developer that the connections are refused. Could you advise on the correct way to start 8 processes to use with IPC in KDB? This is my multiple process startup function in .bashrc:
mq() { echo "Spawning 7 q processes"; q -s -8 -p 20001; q -s -8 -p 20002; q -s -8 -p 20003; q -s -8 -p 20004; q -s -8 -p 20005; q -s -8 -p 20006; q -s -8 -p 20007; }This is the code in .bashrc to start developer:
# Assumes user name is claude and opens Q with 8 threads. (to build separate processes use a negative number) alias q='rlwrap -r q -s -8' # Developer set to open with 8 threads. (to build separate processes use a negative number) alias developer='source /pathToDir/developer/config/config.profile; rlwrap -r q /pathToDir/developer/launcher.q_'This appears to work with each process loading scripts and printing success (so 7 results).
To start all this up, I open one terminal and type mq then open another terminal and type developer . Once in developer, I assign a handle to each process like this:
{hopen("::",string[20000+x])}each 1+til 7
Then the system tells me that the connection is refused.
How should I do this?
Thanks and regards,
Simon
PLEASE NOTE CORRECTION TO PREVIOUS CUT AND PASTE OF CONNECTION STRING FOR HOPEN
2020.10.12 07:06 AM
2020.10.12 09:06 AM
2020.10.13 01:47 AM
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.