All Projects → KxSystems → javakdb

KxSystems / javakdb

Licence: Apache-2.0 license
Using Java with kdb+

Projects that are alternatives of or similar to javakdb

kafka
kdb+ to Apache Kafka adapter, for pub/sub
Stars: ✭ 38 (-7.32%)
Mutual labels:  interface, kdb, q
rkdb
R client for kdb+
Stars: ✭ 37 (-9.76%)
Mutual labels:  interface, kdb, q
automl
Automated Machine Learning Framework for kdb+
Stars: ✭ 22 (-46.34%)
Mutual labels:  kdb, q
q-mode
Emacs mode for editing q scripts and communicating with inferior q/qcon buffers
Stars: ✭ 21 (-48.78%)
Mutual labels:  kdb, q
jupyterq
Jupyter kernel for kdb+
Stars: ✭ 87 (+112.2%)
Mutual labels:  kdb, q
docs
Source for documentation site
Stars: ✭ 73 (+78.05%)
Mutual labels:  kdb, q
ml.q
Machine Learning for kdb+/q
Stars: ✭ 25 (-39.02%)
Mutual labels:  kdb, q
ml
Machine-learning toolkit
Stars: ✭ 48 (+17.07%)
Mutual labels:  kdb, q
kdb nim
Nim Kdb type-safe bindings
Stars: ✭ 13 (-68.29%)
Mutual labels:  kdb, q
q4q
Source Code for "Q for Quants"
Stars: ✭ 22 (-46.34%)
Mutual labels:  kdb, q
docs-v1
Source of code.kx.com/q
Stars: ✭ 33 (-19.51%)
Mutual labels:  kdb, q
kdb-tick
Latest source files for kdb+tick
Stars: ✭ 73 (+78.05%)
Mutual labels:  kdb, q
vscode-q
vscode kdb+/q extension
Stars: ✭ 34 (-17.07%)
Mutual labels:  kdb, q
Gradio
Create UIs for your machine learning model in Python in 3 minutes
Stars: ✭ 4,358 (+10529.27%)
Mutual labels:  interface
DataAbstractions.Dapper
A light abstraction around Dapper and Dapper.Contrib that also maintains the behavior IDbConnection.
Stars: ✭ 37 (-9.76%)
Mutual labels:  interface
Robot Gui
A three.js based 3D robot interface.
Stars: ✭ 181 (+341.46%)
Mutual labels:  interface
Wiki
Wikipedia Interface for Node.js
Stars: ✭ 180 (+339.02%)
Mutual labels:  interface
Fluent-Design-For-Web
Windows 10 Inspired UI For Web
Stars: ✭ 28 (-31.71%)
Mutual labels:  interface
Django Colorfield
color field for django models with a nice color-picker in the admin. 🎨
Stars: ✭ 238 (+480.49%)
Mutual labels:  interface
Lookingglass
Intuitive and configurable search interface for document archives.
Stars: ✭ 176 (+329.27%)
Mutual labels:  interface

Java

javakdb

Travis (.com) branch Coverage

KDB+ IPC interface for the Java programming language. This will allow your application to

  • query kdb+
  • subscribe to a kdb+ publisher
  • publish to a kdb+ consumer
  • serialize/deserialize kdb+ formatted data
  • act as a server for a kdb+ instance

Releases

Latest release can be downloaded here. The github master branch will contain the latest development version for testing prior to release (may contain planned major version changes).

Documentation

📂 Documentation is in the docs folder.

Building from source

Java 1.8 (and above) is recommended. Please ensure that your JAVA_HOME environment variable is set to the version of Java you have installed (or the one preferred if you have multiple versions).

You will also need Apache Maven installed. Run the following to check you have it set up and configured correctly

mvn -version

In order to build the library, run the following within the directory where the pom.xml file is located (from the downloaded source).

mvn clean compile

If you wish to deploy the library to your machines local repository, in order to be used by other maven projects on your machine, run the following

mvn clean install

Please refer to the Apache Maven documentation for further details

Code examples

Supplied with the code is a series of code examples. The following describes each with an example of how to run from Maven (note: Maven is not required to run the applications, but used here for convenience).

mvn clean install should be performed prior to running.

GridViewer

Creates a Swing GUI that presents the contents of a KDB+ table (Flip). It shows the mapping of the Flip class to a Swing TableModel. The contents of the table are some random data that we instruct KDB+ to generate.

Prerequisite:

  • a kdb+ server running on port 5001 on your machine i.e. q -p 5001

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.GridViewer"

QueryResponse

Instructs the remote kdb+ process to execute q code (kdb+ native language) and receives the result. The same principle can be used to execute q functions. Example of a sync request.

Prerequisite:

  • a kdb+ server running on port 5001 on your machine i.e. q -p 5001

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.QueryResponse"

SerializationOnly

Example of code that can be used to serialize/deserialize a Java type (array of ints) to kdb+ format.

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.SerializationOnly"

Server

Creates a Java app that listens on TCP port 5010, which a kdb+ process can communicate with. It will echo back sync messages and discard async messages. The following is an example of running kdb+ from the same machine (i.e. running the q executable and typing commands at the q prompt) that will communicate with the Java server.

q
q)h:hopen `::5010
q)h"hello"
q)neg[h]"hello"

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.Server"

Feed

Example of creating an update function remotely (to capture table inserts), along with table creation and population of the table. Table population has an example of single-row inserts (lower latency) and bulk inserts (better throughput and resource utilization).

Prerequisites:

  • a kdb+ server running on port 5010 on your machine i.e. q -p 5010.
  • as this example depends on a .u.upd function being defined and a table name mytable pre-existing, you may wish to run the following within the kdb+ server (in normal environments, these table and function definitions should be pre-created by your kdb+ admin).
q).u.upd:{[tbl;row] insert[tbl](row)}
q)mytable:([]time:`timespan$();sym:`symbol$();price:`float$();size:`long$())

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.Feed"

TypesMapping

Example app that creates each of the kdb+ types in Java, and communicates with kdb+ to check that the type has been correctly matched with its q type (kdb+ default language). Prints the Java type and corresponding q type.

Prerequisite:

  • a kdb+ server running on port 5010 on your machine i.e. q -p 5010.

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.TypesMapping"

Subscriber

Example app that subscribes to real-time updates from a table that is maintained in kdb+.

Prerequisite:

  • a kdb+ server running on port 5010 on your machine. The instance must have the .u.sub function defined. An example of .u.sub can be found in KxSystems/kdb-tick, an example tickerplant. You can execute this tickerplant process by running q tick.q (the default port is set to 5010).

Run command:

mvn exec:java -pl javakdb-examples -Dexec.mainClass="com.kx.examples.Subscriber"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].