Hi,How can one subscribe to a ticker-plant table, for a set of valuesdefined by a where clause, from a client c++ program?The kdb+ documentation mentions “.u.sub[table_name;symlist]” tosubscribe, but this only takes a symbol list.Say I want to subscribe only for a certain exchange’s data( sayNASDAQ, for Symbols GOOG and MSFT), how can I do it using thisfunction?Also, is there anyway to unsubscribe a subscription? Is that possibleusing the “.u.del[handle;table_name]”, how does one fetch the 'handle’value in a c++ client program.Regards,Nav
In-Reply-To: <05c16e89-0f4f-432f-bcc8-804c18626ecf@t11g2000prh.googlegroups.com>Sensitivity: NormalImportance: NormalSubject: Re: [personal kdb+] Subscribing to a ticker plantTo: personal-kdbplus@googlegroups.comFrom: “Manish Patel” <manni.patel>Date: Thu, 17 Sep 2009 10:29:21 +0000WW91IHdvdWxkIGhhdmUgdG8gbW9kaWZ5IC51LnN1YiBhbmQgLnUucHViIHRvIHdvcmsgZm9yIGFkZGl0aW9uYWwgY29uZGl0aW9ucy4gQW5kL29yIG1vZGlmeSB1cGQgdG8gY2hlY2sgZm9yIHRoZSBjb25kaXRpb25zLg0KDQpBIGxlc3MgZWxlZ2FudCBzb2xuIHRoYXQgd291bGRuJ3QgaW52b2x2ZSBtb2RpZmljYXRpb24gd291bGQgYmUgdG8gaW5jbHVkZSBtYXJrZXQgYXMgcGFydCBvZiB0aGUgc3ltYm9sLCBlZyBuYXNkYXFHT09HDQoNClNlbnQgdXNpbmcgQmxhY2tCZXJyea4gZnJvbSBPcmFuZ2UNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IE5hdiA8bmF2LmFuZHJhc3RlQGdtYWlsLmNvbT4NCkRhdGU6IFRodSwgMTcgU2VwIDIwMDkgMDI6NDk6MDggDQpUbzogS2RiKyBQZXJzb25hbCBEZXZlbG9wZXJzPHBlcnNvbmFsLWtkYnBsdXNAZ29vZ2xlZ3JvdXBzLmNvbT4NClN1YmplY3Q6IFtwZXJzb25hbCBrZGIrXSBTdWJzY3JpYmluZyB0byBhIHRpY2tlciBwbGFudA0KDQoNCkhpLA0KDQpIb3cgY2FuIG9uZSBzdWJzY3JpYmUgdG8gYSB0aWNrZXItcGxhbnQgdGFibGUsIGZvciBhIHNldCBvZiB2YWx1ZXMNCmRlZmluZWQgYnkgYSB3aGVyZSBjbGF1c2UsIGZyb20gYSBjbGllbnQgYysrIHByb2dyYW0/DQoNClRoZSBrZGIrIGRvY3VtZW50YXRpb24gbWVudGlvbnMgIi51LnN1Ylt0YWJsZV9uYW1lO3N5bWxpc3RdIiB0bw0Kc3Vic2NyaWJlLCBidXQgdGhpcyBvbmx5IHRha2VzIGEgc3ltYm9sIGxpc3QuDQpTYXkgSSB3YW50IHRvIHN1YnNjcmliZSBvbmx5IGZvciBhIGNlcnRhaW4gZXhjaGFuZ2UncyBkYXRhKCBzYXkNCk5BU0RBUSwgZm9yIFN5bWJvbHMgR09PRyBhbmQgTVNGVCksIGhvdyBjYW4gSSBkbyBpdCB1c2luZyB0aGlzDQpmdW5jdGlvbj8NCg0KQWxzbywgaXMgdGhlcmUgYW55d2F5IHRvIHVuc3Vic2NyaWJlIGEgc3Vic2NyaXB0aW9uPyBJcyB0aGF0IHBvc3NpYmxlDQp1c2luZyB0aGUgIi51LmRlbFtoYW5kbGU7dGFibGVfbmFtZV0iLCBob3cgZG9lcyBvbmUgZmV0Y2ggdGhlICdoYW5kbGUnDQp2YWx1ZSBpbiBhIGMrKyBjbGllbnQgcHJvZ3JhbS4NCg0KUmVnYXJkcywNCk5hdg0KDQo</manni.patel>
Hi,Is there any way to stop or un-subscribe from a subscription?Also, assume that there is a client application(c++), subscribing to atickerplant. The tickerplant has received some data already (X rows)from the feed, after which the client application is kicked off. It isobserved that the client application receives data from the point iswas started. However, it does not receive the X rows that was sent tothe tickerplant by the feed before the client application was started.Is there any way for the client application to get those rows as well.In case of a real time database, RTD, retrieves from the ticker-plantthe location of the log and the number of messages observed so far. Isthere some way to retrieve this information in the c++ application.Regards,NavOn Sep 17, 3:29?pm, “Manish Patel” <manni.pa…> wrote:> You would have to modify .u.sub and .u.pub to work for additional conditions. And/or modify upd to check for the conditions.>> A less elegant soln that wouldn’t involve modification would be to include market as part of the symbol, eg nasdaqGOOG>> Sent using BlackBerry? from Orange>>>> -----Original Message-----> From: Nav <nav.andra…>> Date: Thu, 17 Sep 2009 02:49:08> To: Kdb+ Personal Developers> Subject: [personal kdb+] Subscribing to a ticker plant>> Hi,>> How can one subscribe to a ticker-plant table, for a set of values> defined by a where clause, from a client c++ program?>> The kdb+ documentation mentions “.u.sub[table_name;symlist]” to> subscribe, but this only takes a symbol list.> Say I want to subscribe only for a certain exchange’s data( say> NASDAQ, for Symbols GOOG and MSFT), how can I do it using this> function?>> Also, is there anyway to unsubscribe a subscription? Is that possible> using the “.u.del[handle;table_name]”, how does one fetch the ‘handle’> value in a c++ client program.>> Regards,> Nav- Hide quoted text ->> - Show quoted text -</nav.andra…></manni.pa…>
Date: Tue, 22 Sep 2009 13:37:14 +0800Message-ID: Subject: Re: [personal kdb+] Re: Subscribing to a ticker plantFrom: Aaron Davies <aaron.davies>To: personal-kdbplus@googlegroups.comthe simplest way to unsubscribe is to close the connection. beyondthat, it shouldn’t be too hard to send some q commands to thetickerplant to explicitly delete your subscription from the statestored in the .u workspace; this could be implemented as an unsub callin the tickerplant if you find that more convenient.take a look at r.q, the implementation of the q real-time database. itcovers how to query the tickerplant for the log file and replay itsdata.On Tue, Sep 22, 2009 at 1:27 PM, Nav <nav.andraste> wrote:>> Hi,>> Is there any way to stop or un-subscribe from a subscription?>> Also, assume that there is a client application(c++), subscribing to a> tickerplant. The tickerplant has received some data already (X rows)> from the feed, after which the client application is kicked off. It is> observed that the client application receives data from the point is> was started. However, it does not receive the X rows that was sent to> the tickerplant by the feed before the client application was started.> Is there any way for the client application to get those rows as well.> In case of a real time database, RTD, retrieves from the ticker-plant> the location of the log and the number of messages observed so far. Is> there some way to retrieve this information in the c++ application.>> Regards,> Nav>> On Sep 17, 3:29?pm, “Manish Patel” <manni.pa…> wrote:>> You would have to modify .u.sub and .u.pub to work for additional conditions. And/or modify upd to check for the conditions.>>>> A less elegant soln that wouldn’t involve modification would be to include market as part of the symbol, eg nasdaqGOOG>>>> Sent using BlackBerry? from Orange>>>>>>>> -----Original Message----->> From: Nav <nav.andra…>>> Date: Thu, 17 Sep 2009 02:49:08>> To: Kdb+ Personal Developers>> Subject: [personal kdb+] Subscribing to a ticker plant>>>> Hi,>>>> How can one subscribe to a ticker-plant table, for a set of values>> defined by a where clause, from a client c++ program?>>>> The kdb+ documentation mentions “.u.sub[table_name;symlist]” to>> subscribe, but this only takes a symbol list.>> Say I want to subscribe only for a certain exchange’s data( say>> NASDAQ, for Symbols GOOG and MSFT), how can I do it using this>> function?>>>> Also, is there anyway to unsubscribe a subscription? Is that possible>> using the “.u.del[handle;table_name]”, how does one fetch the ‘handle’>> value in a c++ client program.>>>> Regards,>> Nav- Hide quoted text ->>>> - Show quoted text -> >>– Aaron Daviesaaron.davies@gmail.com</nav.andra…></manni.pa…></nav.andraste></aaron.davies>
Hi Aaron,Thanks for the suggestion! On the q side the following … “take alook at r.q, it covers how to query the tickerplant for the log fileand replay its data” happens simultaneously/as an atomic op (or atleast so it seems). On the other hand, within a c++/java app thiswould probably involve 2 separate queries (one for replaying the dataand another for subscribing). If replaying happens first followed bysubscription (we potentially lose some data … as replaying will takesome time and subscribing after that means the intermittent data islost). On the other hand, if subscribing happens first followed byreplaying we get dupes (from the data intersection of logs/subscription updates). Is it possible to fire both things as an atomicoperation using the java/c++ interface?Regards,vcdOn Sep 22, 10:37?am, Aaron Davies <aaron.dav…> wrote:> the simplest way to unsubscribe is to close the connection. beyond> that, it shouldn’t be too hard to send some q commands to the> tickerplant to explicitly delete your subscription from the state> stored in the .u workspace; this could be implemented as an unsub call> in the tickerplant if you find that more convenient.>> take a look at r.q, the implementation of the q real-time database. it> covers how to query the tickerplant for the log file and replay its> data.>>>>>> On Tue, Sep 22, 2009 at 1:27 PM, Nav <nav.andra…> wrote:>> > Hi,>> > Is there any way to stop or un-subscribe from a subscription?>> > Also, assume that there is a client application(c++), subscribing to a> > tickerplant. The tickerplant has received some data already (X rows)> > from the feed, after which the client application is kicked off. It is> > observed that the client application receives data from the point is> > was started. However, it does not receive the X rows that was sent to> > the tickerplant by the feed before the client application was started.> > Is there any way for the client application to get those rows as well.> > In case of a real time database, RTD, retrieves from the ticker-plant> > the location of the log and the number of messages observed so far. Is> > there some way to retrieve this information in the c++ application.>> > Regards,> > Nav>> > On Sep 17, 3:29?pm, “Manish Patel” <manni.pa…> wrote:> >> You would have to modify .u.sub and .u.pub to work for additional conditions. And/or modify upd to check for the conditions.>> >> A less elegant soln that wouldn’t involve modification would be to include market as part of the symbol, eg nasdaqGOOG>> >> Sent using BlackBerry? from Orange>> >> -----Original Message-----> >> From: Nav <nav.andra…>> >> Date: Thu, 17 Sep 2009 02:49:08> >> To: Kdb+ Personal Developers> >> Subject: [personal kdb+] Subscribing to a ticker plant>> >> Hi,>> >> How can one subscribe to a ticker-plant table, for a set of values> >> defined by a where clause, from a client c++ program?>> >> The kdb+ documentation mentions “.u.sub[table_name;symlist]” to> >> subscribe, but this only takes a symbol list.> >> Say I want to subscribe only for a certain exchange’s data( say> >> NASDAQ, for Symbols GOOG and MSFT), how can I do it using this> >> function?>> >> Also, is there anyway to unsubscribe a subscription? Is that possible> >> using the “.u.del[handle;table_name]”, how does one fetch the ‘handle’> >> value in a c++ client program.>> >> Regards,> >> Nav- Hide quoted text ->> >> - Show quoted text ->> –> Aaron Davies> aaron.dav…@gmail.com- Hide quoted text ->> - Show quoted text -</nav.andra…></manni.pa…></nav.andra…></aaron.dav…>
I suggest that before anyone accidentally publishes sections of licensed code or commercially sensitive information about kdb+tick, if you are a licensed user (and you must be if you are using tick), you should move this discussion to the k4 listbox, which is for commercially licensed users of Kx products.
The google group is for discussions related to the non-commercial 32bit version, which does not include tick, taq or other Kx products.
thanks,
Charlie Skelton
Kx Systems
Apologies about that. Didn’t realise that!Regards,vcd.On Sep 25, 4:34?pm, Charles Skelton <char…> wrote:> I suggest that before anyone accidentally publishes sections of licensed> code or commercially sensitive information about kdb+tick, if you are a> licensed user (and you must be if you are using tick), you should move this> discussion to the k4 listbox, which is for commercially licensed users of Kx> products.> The google group is for discussions related to the non-commercial 32bit> version, which does not include tick, taq or other Kx products.>> thanks,> Charlie Skelton> Kx Systems>>>> On Fri, Sep 25, 2009 at 1:14 PM, vcd <vcdo…> wrote:>> > Hi Aaron,>> > Thanks for the suggestion! On the q side the following … “take a> > look at r.q, it covers how to query the tickerplant for the log file> > and replay its data” happens simultaneously/as an atomic op (or at> > least so it seems). On the other hand, within a c++/java app this> > would probably involve 2 separate queries (one for replaying the data> > and another for subscribing). If replaying happens first followed by> > subscription (we potentially lose some data … as replaying will take> > some time and subscribing after that means the intermittent data is> > lost). On the other hand, if subscribing happens first followed by> > replaying we get dupes (from the data intersection of logs/> > subscription updates). Is it possible to fire both things as an atomic> > operation using the java/c++ interface?>> > Regards,> > vcd>> > On Sep 22, 10:37 am, Aaron Davies <aaron.dav…> wrote:> > > the simplest way to unsubscribe is to close the connection. beyond> > > that, it shouldn’t be too hard to send some q commands to the> > > tickerplant to explicitly delete your subscription from the state> > > stored in the .u workspace; this could be implemented as an unsub call> > > in the tickerplant if you find that more convenient.>> > > take a look at r.q, the implementation of the q real-time database. it> > > covers how to query the tickerplant for the log file and replay its> > > data.>> > > On Tue, Sep 22, 2009 at 1:27 PM, Nav <nav.andra…> wrote:>> > > > Hi,>> > > > Is there any way to stop or un-subscribe from a subscription?>> > > > Also, assume that there is a client application(c++), subscribing to a> > > > tickerplant. The tickerplant has received some data already (X rows)> > > > from the feed, after which the client application is kicked off. It is> > > > observed that the client application receives data from the point is> > > > was started. However, it does not receive the X rows that was sent to> > > > the tickerplant by the feed before the client application was started.> > > > Is there any way for the client application to get those rows as well.> > > > In case of a real time database, RTD, retrieves from the ticker-plant> > > > the location of the log and the number of messages observed so far. Is> > > > there some way to retrieve this information in the c++ application.>> > > > Regards,> > > > Nav>> > > > On Sep 17, 3:29 pm, “Manish Patel” <manni.pa…> wrote:> > > >> You would have to modify .u.sub and .u.pub to work for additional> > conditions. And/or modify upd to check for the conditions.>> > > >> A less elegant soln that wouldn’t involve modification would be to> > include market as part of the symbol, eg nasdaqGOOG>> > > >> Sent using BlackBerry? from Orange>> > > >> -----Original Message-----> > > >> From: Nav <nav.andra…>> > > >> Date: Thu, 17 Sep 2009 02:49:08> > > >> To: Kdb+ Personal Developers> > > >> Subject: [personal kdb+] Subscribing to a ticker plant>> > > >> Hi,>> > > >> How can one subscribe to a ticker-plant table, for a set of values> > > >> defined by a where clause, from a client c++ program?>> > > >> The kdb+ documentation mentions “.u.sub[table_name;symlist]” to> > > >> subscribe, but this only takes a symbol list.> > > >> Say I want to subscribe only for a certain exchange’s data( say> > > >> NASDAQ, for Symbols GOOG and MSFT), how can I do it using this> > > >> function?>> > > >> Also, is there anyway to unsubscribe a subscription? Is that possible> > > >> using the “.u.del[handle;table_name]”, how does one fetch the ‘handle’> > > >> value in a c++ client program.>> > > >> Regards,> > > >> Nav- Hide quoted text ->> > > >> - Show quoted text ->> > > –> > > Aaron Davies> > > aaron.dav…@gmail.com- Hide quoted text ->> > > - Show quoted text – Hide quoted text ->> - Show quoted text -</nav.andra…></manni.pa…></nav.andra…></aaron.dav…></vcdo…></char…>