Hi,
I’m a bit confused about the code of running the kdb+tick demo on this page: http://code.kx.com/wiki/Startingkdbplus/tick
Under “6.5 running the demo”, there is the example code. The code is attached as follows,
-
tickerplant - the tick.q script defines the tickerplant, and runs on port 5010:
..$ q tick.q -p 5010
-
feed - connects to the tickerplant and sends a new batch every 507 milliseconds:
..$ q feed.q localhost:5010 -t 507
-
rdb - the r.q script defines the real time database:
..$ q tick/r.q -p 5011
-
show - the show process, which does not need a port:
..$ q cx.q show
=====my questions=====
From my understanding, a new q instance is opened in step 2, and it loads file feed.q and listens on port 5010, is that right? (I’m not sure if “localhost:5010” can be interpreted as “listen on port 5010”)
Also what’s the difference between “localhost:5010” and “-p 5010”?
the following is the last several lines of code in tick.q. I put my interpretion to the right, could you please correct me if I’m wrong?
/run
>q tick.q sym . -p 5010 /tick <– start a new q instance on port 5010, which is the tickerplant process, and then load tick.q into this q instance.
>q tick/r.q :5010 -p 5011 /rdb <– start a rdb process on port 5011 that listens to port 5010
>q sym -p 5012 /hdb <– start a hdb process on port 5012
>q tick/ssl.q sym :5010 /feed <– start a new q instance that listens to port 5010
Any suggestions and help are appreciated!
Thanks,
Xinyu