-
Notifications
You must be signed in to change notification settings - Fork 2
Prototype
At the moment, can't get electron-windows-installer to create an installation .exe, so the best we can do is provide the distribution as a .zip file. To test, a kdb server must also be running and be set up to handle WebSocket connections.
-
Install kdb+: https://code.kx.com/q/learn/install/ . Note this requires a license key file for non-commercial use, which will be sent on request.
-
When installation is complete, start a q server in a terminal window to reveal the q) prompt
-
Listen on port 5005 (the prototype app is currently hard-coded to send requests to this port on locahost):
q) \p 5005
-
Set up the web socket message handler for asynchronous communication and format response as JSON:
q) .z.ws:{neg[.z.w].j.j @[value;x;{`$ "'",x}];}
For an explanation of this, see https://code.kx.com/q/wp/websockets/ -
Next, download the current
kdb-studio-2-proto-win32-x64.zip
file and uncompress to a suitable location. -
Open
kdb-studio-2-proto.exe
. Assuming the app window displays, click on Connect to connect to the KDB server listening on port 5005. You should see the message 'Connected' in the output pane. -
It should now be possible to send q statements to the server and see the response; these should be tabulated where appropriate.
Following example here: https://code.kx.com/q4m3/1_Q_Shock_and_Awe/#117-example-trades-table
Note that in the prototype as it stands, each command must be sent separately to the server (replace any existing statement and click Go)
dts:2015.01.01+1000000?31
tms:1000000?24:00:00.000000000
syms:1000000?`aapl`goog`ibm
vols:10*1+1000000?1000
pxs:90.0+(1000000?2001)%100
trades:([] dt:dts; tm:tms; sym:syms; vol:vols; px:pxs)
trades:`dt`tm xasc trades
trades:update px:6*px from trades where sym=`goog
trades:update px:2*px from trades where sym=`ibm
Then to get the first 200 rows for example:
200#trades
The results should appear in an interactive table.