Professional Documents
Culture Documents
Pragmatic Software Development in Q/KDB+: Ajay Rathore
Pragmatic Software Development in Q/KDB+: Ajay Rathore
Pragmatic Software Development in Q/KDB+: Ajay Rathore
Development in q/kdb+
Ajay Rathore
My preferred tools for kdb+/q
development
Sublime Text3
Maven
Git
Jenkins
Docker
Sublime Text3
<dependency>
<groupId>com.kdb.ajay</groupId>
<artifactId>logging-library</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>dist</classifier>
<type>zip</type>
</dependency>
\l code/logging.q
This will result in following sequence of events, first of all maven will
build project zip artifact and put it inside project build directory which
by default is project-root/target/
After that maven-resource plugin will run in the prepare-package
phase and will copy all files inside src/main/docker dir to target/docker
and project build artifact from target to target/docker dir, it will also
replace any property place holders via resource filtering. Now
everything we need to build docker image is inside target/docker dir
Next we invoke maven-antrun-plugin in package phase. It will perform
two tasks, first it sets up appropriate file permission on
target/docker/build.sh and then run that script to produce docker
image.
build.sh
docker run -v
/Users/ajay/deploy/kdb-tick/data/marketdata:/home/ajay/services/kdb-t
ick/data/marketdata --name marketdata -td -p 5000:5000 -p
5001:5001 -p 5002:5002 ajayrathore/kdb-tick-marketdata
The above container will launch a standard kdb tick triplet with
tickerplant on port 5000, realtime on port 5001 and hdb on port 5002.
Historic data is mounted from localhost using docker -v flag.
References
Maven
Git
Jenkins
Docker