cancel
Showing results for 
Search instead for 
Did you mean: 

RE: [personal kdb+] peach type error

david_demner
New Contributor
X-Originating-IP: 174.7.128.233User-Agent: Workspace Webmail 5.15.9Message-Id: <20150831110650.85f80dae80d1d2f2e266ec6278e6cbe8.3dd5974ce5.wbe@email07.europe.secureserver.net>From: "David Demner \(AquaQ\)" To: personal-kdbplus@googlegroups.comSubject: RE: [personal kdb+] peach type errorDate: Mon, 31 Aug 2015 11:06:50 -0700Mime-Version: 1.0

Sockets/handles with peach

A handle must not be used concurrently between threads as there is no locking around a socket descriptor, and the bytes being read/written from/to the socket will be garbage (due to message interleaving) and most likely result in a crash. Since v3.0, a socket can be used from the main thread only, or if you use the single shot sync request syntax as
q)`:localhost:5000 "2+2"

peach forms the basis for a multithreaded hdb, for illustration purposes considering the following query

{select max price by date,sym from trade where date=d} peach date
this would execute a query for each date in parallel. The multithreaded hdb with par.txt hides the complexity of splitting the query up between threads and aggregating the results.

-------- Original Message --------
Subject: [personal kdb+] peach type error
From: Roni Hoffman <hoffmanroni@gmail.com>
Date: Mon, August 31, 2015 11:03 am
To: Kdb+ Personal Developers <personal-kdbplus@googlegroups.com>

Hello,

Wondering if someone can tell me whats wrong with this.  I have 2 slaves

this works

{ (neg .z.w)  [((count x) ; x)] } each (100000 cut (select from trade where date=2015.07.23, sym in `AAPL`GOOG))

but this gives a type error

{ (neg .z.w)  [((count x) ; x)] } peach (100000 cut (select from trade where date=2015.07.23, sym in `AAPL`GOOG))


other peach queries work


--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbplus+unsubscribe@googlegroups.com.
To post to this group, send email to personal-kdbplus@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.
1 REPLY 1

hoffmanroni
New Contributor III
Right, ok I see, thanks.