Subscribe to KDB+ with MATLAB as the client

Hi All,

I was wondering if it is possible to subscribe to a Tickerplant with a MATLAB Client using the KX interface.

I have tried:

k = kx(‘192.168.1.78’,6000,‘feed:pass’);

rc = exec(k,‘.u.sub[`trade;`MFST.O`IBM.N]’,0);

to subscribe to the demo created by AquaQ Analytics.but rc never returns any data.

Thanks

Jon

There needs to be a function which will receive incoming async messages on the handle. 

The Perl equivalent (using this interface http://search.cpan.org/~markpf/Kx-0.039/lib/Kx.pm) is:

$res = $k_r->recv

The Python equivalent (using DevNets Exxeleron/qPython interface https://github.com/exxeleron/qPython) is:

msg = q.receive(data_only = True, raw = False)

You can effectively call these “receive” commands in a loop to continually receive the messages sent by the tickerplant. 

The question is whether or not the Matlab library has it and it doesn’t look like it does. Perhaps you could write your own? The R interface to kdb similarly doesn’t have a “receive” function out of the box, as I discovered here: https://groups.google.com/forum/#!searchin/personal-kdbplus/R$20receive/personal-kdbplus/vFK3FYxgshI/4dUdwRtcBQAJ

  

>>> I was wondering if it is possible to subscribe to a Tickerplant with a MATLAB Client using the KX interface.<o:p></o:p>

<o:p> </o:p>

AFAIK it is not possible because exec is implemented as a sync request. You make a request and you expect a response. <o:p></o:p>

<o:p> </o:p>

Do you plan to implement something in matlab to listen to a tickerplant?<o:p></o:p>

<o:p> </o:p>

Kim<o:p></o:p>

<o:p> </o:p>

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Jon S
Gesendet: Samstag, 16. Juli 2016 08:02
An: Kdb+ Personal Developers
Betreff: [personal kdb+] Subscribe to KDB+ with MATLAB as the client<o:p></o:p>

<o:p> </o:p>

Hi All,<o:p></o:p>

<o:p> </o:p>

I was wondering if it is possible to subscribe to a Tickerplant with a MATLAB Client using the KX interface.<o:p></o:p>

<o:p> </o:p>

I have tried:<o:p></o:p>

<o:p> </o:p>

k = kx(‘192.168.1.78’,6000,‘feed:pass’);<o:p></o:p>

rc = exec(k,‘.u.sub[`trade;`MFST.O`IBM.N]’,0);<o:p></o:p>

<o:p> </o:p>

to subscribe to the demo created by AquaQ Analytics.but rc never returns any data.<o:p></o:p>

<o:p> </o:p>

Thanks<o:p></o:p>

<o:p> </o:p>

Jon<o:p></o:p>

<o:p> </o:p>


Submitted via Google Groups

Thanks guys,

looks like I will have to write my own with the assistance of the examples you have provided.

And, Yes, I intend to write something to listen to a tickerplant.

Thanks again,

Jon