By Fintan Quill
Released in 2009, the Go programming language created by Google has been increasing in popularity year on year. The compiled language, which has many of its roots in C, recently jumped from 95 to 20 in the TIOBE programming language index in 2016.
Google has several secretive internal projects developed in Go. There are also many large scale projects being implemented outside of Google, with the most notable being the container software Docker.
Created by Kx tech team member Sergey Vidyuk, the kdbgo project allows bi-directional communication between kdb+ & Go, allowing Kx technology to be accessed more easily by thousands of programmers in different geographies & industries.
To get started, ensure Go is installed and correctly configured. For kdbgo first install the glog & gouuid dependent libraries as follows:
go get github.com/golang/glog go get github.com/nu7hatch/gouuid
Then finally install the kdbgo package itself:
go get github.com/sv/kdbgo
There you have it, you’re ready to Go.
There are sample test files within the kdbgo project. I have also created a separate sample test file.
This test file shows how to:
- create a connection
- return different kdb+ data types
- async call
- single insert
- bulk insert
- primitive prettyprint functions for dictionaries, tables and keyed tables
To try this, simply run the following command:
go run test.go
This can be run using the command:
go run listener.go