News for hackers. Stuff that matters.
Re:Kdb+ and Python: EmbedPy and PyQ by osrec on Friday November 17, 2017 @07:40PM (#15727114)
I've never quite understood why banks still opt for kdb when (a) hiring staff is ridiculously difficult/expensive and (b) there are so many other cheaper alternatives available. They literally have a strangle hold on every eFX desk in London, and I cannot really figure out why!
Re:Kdb+ and Python: EmbedPy and PyQ by geocar on Friday November 17, 2017 @07:48PM (#15727146)
Maybe you're wrong about (b)?

Sure, I could cobble something about as fast and functional out of postgres, C, awk, and a bunch of other things, but it'd certainly cost more just in developer time than kdb.

Re:Kdb+ and Python: EmbedPy and PyQ by osrec on Friday November 17, 2017 @08:07PM (#15727224)
Your comment made me chuckle. In fact, made me immediately think you were employed by Kx at some point; your profile confirmed this was the case!

I think Kx has built a wonderful business, but as an ex MD at a bulge bracket bank, I would not sanction its use any more. It is expensive, and it's difficult to hire good people to work with it (not every guy with kdb on their CV is great). The product is good, but so are many open source offerings, which are now matching it both in terms of performance and flexibility. Plus hiring good people is significantly easier and cheaper.

Re:Kdb+ and Python: EmbedPy and PyQ by dogruck on Friday November 17, 2017 @08:16PM (#15727251)
As an ex-MD you also know that banks used to not be too price sensitive, so they didn't mind paying a lot for some Kx experts.

Of course, these days, with revenues being squeezed, that's changed.

Re:Kdb+ and Python: EmbedPy and PyQ by osrec on Friday November 17, 2017 @08:50PM (#15727362)
Agree, price is a much bigger factor now.
Re:Kdb+ and Python: EmbedPy and PyQ by oper8or on Saturday November 18, 2017 @12:00AM (#15727839)
What are the open source offerings that you referring to? The ones that provide 1) no-copy analytics 2) i/o stack bypass i.e. memory-map.
Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Saturday November 18, 2017 @07:58AM (#15728784)
The one I linked to in my previous post also produces code that's fast enough to use in the critical path in low-latency trading systems.

As you may know, q's "scalar performance" is not great; similar to Scheme or python due to boxing overhead (as you can see in the linked k.h file below).

Also, the fact that q is untyped has a severe impact on its safe use in large and complex projects.

(ETA: https://github.com/Morgan-Stanley/hobbes)

Re:Kdb+ and Python: EmbedPy and PyQ by oper8or on Wednesday November 22, 2017 @03:35PM (#15760364)
Thank you for your answers. To summarize, we have 1) Hobbes 2) hacked LMDB 3) C++ memory-mapped store of arrays.

Given that options #2 and #3 require some (non-trivial) work, they are not really options.

We left with #1,-- hobbes, which was uploaded to GitHub about 5 months ago and has a whopping team of 2 contributors, both employed by Morgan Stanley.

This is more than nothing, but not much.

I do not have experience with KDB, and looking at the language syntax, not a fan. Integration with Python (depending on implementation) may push KDB towards larger acceptance.

So far I was mostly relying on a variation of the option #3.

Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Thursday November 23, 2017 @01:10AM (#15763164)
You must be able to come up with better criticism than that. Number of people who work on the project, time it's been on github, contributors' employers ... these are completely irrelevant to the question of whether this project is a viable alternative. There's not a single technical argument here! :)

For what it's worth (not much), from a purely superficial standpoint, kdb itself started out as a one or two person project at Morgan Stanley! :D

We've managed to get this thing right in the hot path (not just for analysis off on the side, though that use-case is important too) where a significant portion of global trading happens, in one of the biggest investment banks in the country, and we've had it working in production for four years doing this (before recently open sourcing), having had to make the technical case to many people who are very aware of kdb and what it can do (as far as kdb goes, Morgan Stanley is Mount Doom!).

I mean, I take your point that it's not ubiquitous in the world yet, but in terms of the OP proposition that there are free and technically superior alternatives, it's proof positive.

Re:Kdb+ and Python: EmbedPy and PyQ by osrec on Saturday November 18, 2017 @08:44AM (#15728905)
There are a few. I've used a modified LMDB source in the past with success, employing similar tricks to kdb for performance (i.e. store daily data as contiguous arrays so that reads are quick etc). Either way, implementing a memory mapped store of arrays and operating on it is not too challenging a problem for any good C++ dev.
Re:Kdb+ and Python: EmbedPy and PyQ by alfiedotwtf on Saturday November 18, 2017 @04:40AM (#15728400)
Everyone is hanging on for OP to deliver
Re:Kdb+ and Python: EmbedPy and PyQ by yalph on Saturday November 18, 2017 @10:24AM (#15729283)
So what are those alternatives?
Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Saturday November 18, 2017 @10:50AM (#15729408)
How about hobbes?
Re:Kdb+ and Python: EmbedPy and PyQ by yalph on Saturday November 18, 2017 @01:07PM (#15729983)
I will check thanks but wnated to learn from him. I do not think there are many alternatives by the way. Is this one a full alternative? Does it provide all functionalities of kdb?
Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Saturday November 18, 2017 @06:33PM (#15731294)
It’s better in a lot of ways. It has a type system, can produce much better code, can do cross-process compilation (for multi-process IPC). The FFI/binding process is much simpler, there are more options to record precisely-typed data from applications.

And hobbes is used in major high-volume and low-latency systems at Morgan Stanley (where q originated, as you may know).

Re:Kdb+ and Python: EmbedPy and PyQ by yalph on Sunday November 19, 2017 @01:16AM (#15732550)
Hi thank you very much, I work in the industry and I will definitely take a look at it. You seem to be one of the developers behind this project. Is there any way I can contact you in the future?
Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Sunday November 19, 2017 @11:31PM (#15737815)
Yes I do work on the project at Morgan Stanley. Our group email is [email protected] and we're pretty responsive on that list (as well as on the github page).
Re:Kdb+ and Python: EmbedPy and PyQ by yalph on Saturday November 18, 2017 @11:34PM (#15732276)
How come kx is ok with this one? I heard they sue every moving object around.
Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Sunday November 19, 2017 @01:06AM (#15732531)
Kx does seem to bully people with threats of lawsuits, not sure how often they actually follow through.

hobbes is not a k/q clone, it's much more like Haskell actually. The features that make hobbes especially compelling for its production use-cases, like its complex type system, are features that kdb has never had and probably never will have.

Re:Kdb+ and Python: EmbedPy and PyQ by kthielen on Saturday November 18, 2017 @07:49AM (#15728768)
Re:Kdb+ and Python: EmbedPy and PyQ by dilap on Friday November 17, 2017 @10:18PM (#15727596)
huh, so what do i need to learn to be one of these ridiculously expensive people working w/ kdb?
Re:Kdb+ and Python: EmbedPy and PyQ by ah- on Friday November 17, 2017 @10:26PM (#15727610)
Re:Kdb+ and Python: EmbedPy and PyQ by osrec on Saturday November 18, 2017 @09:01AM (#15728944)
Also, you need to be lucky enough to somehow move into a team that uses kdb heavily (this usually happens via an internal move within an investment bank). Learning it using the tutorials is not the same as implementing it in a live environment, and the tutorials probably won't be enough to get you a job/contract. If you could say something like "I've worked on the FX desk at JP Morgan, where we used kdb daily", you'll be hired everywhere. Basically, you need a bit of luck in the first instance to get into a kdb focused team that can train you - after that, you're sorted!
Re:Kdb+ and Python: EmbedPy and PyQ by beagle3 on Saturday November 18, 2017 @09:02AM (#15728948)
Historically, an APL background was a good indication that you grok the apl/k/j/q mindset, which is very different from the Algol (c/c#/Java/pascal) world and also from the Lisp world.