Kdb+ and the Internet of Things/Big Data

Kdb+ and the Internet of Things/Big Data

InDetail Kdb+ and the Internet of Things/Big Data An InDetail Paper by Bloor Research Author : Philip Howard Publish date : August 2014 Kdb+ has proved itself in what is unarguably the most demanding big data market: financial trading and risk management. The company is now targeting other environments. Philip Howard Kdb+ and the Internet of Things/Big Data Executive summary Kdb+ is a column-based relational database Key findings with extensive in-memory capabilities, devel- oped and marketed by Kx Systems. Like all In the opinion of Bloor Research, the following such products, it is especially powerful when represent the key facts of which prospective it comes to supporting queries and analytics. users should be aware: However, unlike other products in this domain, kdb+ is particularly good (both in terms of • Data is stored in sequentially ordered performance and functionality) at processing, columns. Note that other column-based manipulating and analysing data (especially databases are not typically ordered in this numeric data) in real-time, alongside the fashion so you would expect performance for analysis of historical data. Moreover, it has operations such as sorts to be much faster extensive capabilities for supporting time- when using kdb+. As is usual with column- series data. For these reasons Kx Systems has based databases it is not necessary to define historically targeted the financial industry for indexes because columns are self-indexing trading analytics and black box trading based (and this even more true in this case, thanks on real-time and historic data, as well as real- to the sequential ordering). However, you time risk assessment; applications which may define indexes if you wish to. are particularly demanding in their perfor- mance requirements. The company has had • Kdb+ supports compression at comparable significant success in this market with over levels to other vendors. That is, up to around a hundred major financial institutions and 10x depending on the type of data. hedge funds deploying its technology. In this paper, however, we want to explore the use of • In-memory processing is genuinely kdb+ for big data and Internet of Things based in-memory: it is not just a cache. However, use cases. the system has been designed so that both pure in-memory and hybrid in-memory/disk Fast facts based processing are optimised. Kdb+ is a column-based, hybrid in-memory • The support for time series in kdb+ is espe- database with stream processing capabili- cially relevant to many Internet of Things ties, primarily designed for analytic work- applications such as smart metering, loads. In so far as in-memory capability is preventative maintenance and other envi- concerned, we refer to it as “hybrid” because ronments where large quantities of data it uses in-memory processing as much as it need to be collected at regular intervals and can but recognises that in some cases it may then analysed. Note that native support for be impracticable to load all relevant (typi- time series is extremely rare across data- cally historic) data into memory and that you base products. therefore need to employ techniques that will not only leverage memory-based processing • We are pleased to hear that Kx has recently but optimise performance when not all the implemented geospatial capabilities, as data can fit into memory. This is similar to many Internet of Things applications are the approach taken by IBM with its DB2 BLU both time and location based. Acceleration, as an example. The product’s stream processing capabilities (which means • The q language is significantly more efficient that you can analyse very large quantities of than other languages that you might use information in-flight, in real-time) arise from (both procedural and declarative) for anal- the fact that kdb+ is tightly integrated with ysis purposes. It allows very complex busi- the product’s development language, q. This ness logic to be developed quickly. However, is a vector (array) processing language that is its use does imply a learning curve. Alter- much more efficient than SQL and can be used natively there are specific C# and JavaScript to develop analytic applications as well as for interfaces that are provided as a part of query purposes. kdb+. There are interfacing capabilities for a host of other languages and environ- ments, including (but not limited to) Python, R, Matlab, Excel, and Mathematica. A Bloor InDetail Paper 1 © 2014 Bloor Research Kdb+ and the Internet of Things/Big Data Executive summary • Because programming is typically in q rather The bottom line than SQL, most business intelligence tools will not run natively with kdb+. However, Kx Kx Systems was founded more than 20 years Systems has partnered with Datawatch and ago, although the precursor to kdb+ (kdb) was that company’s Panopticon product can be not introduced until 1998. In the fifteen years used for visualisation purposes. In addition, since then the company and its product have a number of Kx’s partners have built busi- earned a well-deserved reputation in the finan- ness intelligence front-ends to the product. cial services market. That, in itself, speaks As a lowest common denominator, kdb+ volumes: hedge funds and other financial insti- supports ODBC. tutions have been processing ‘big data’ since before the term came into common parlance • Kdb+ is scalable, does not require a large and Kx Systems has been a leading provider investment in hardware, is relatively simple to that market. Today, Bloor Research believes to maintain, performs extremely well and is that the company is well placed to exploit the highly available. capabilities of kdb+ in other big data markets and, especially, with respect to the Internet of Things. In fact, Kx Systems has already started to make inroads in this area, as we will discuss (by means of case studies) in due course. Our view is that Kx Systems has, perhaps seren- dipitously, built a platform that makes it ideal for many big data analytic requirements. © 2014 Bloor Research 2 A Bloor InDetail Paper Kdb+ and the Internet of Things/Big Data The product Kdb+ runs on Solaris, Windows and Linux plat- Historically, there was an optional product forms and is currently in version 3.1. In addi- called kdb-tick that was specifically tion to the standard kdb+, which is 64-bit, designed for ingesting and analysing (stream there is also a free 32-bit version. This runs processing) stock tick information. However, on almost anything, including a Raspberry Pi! this has now been folded into kdb+. There is also a fast loading capability. The standard version has a parallel archi- tecture for deployment across multiple The solution supports commodity servers and partitions (and, notably, you can implement storage devices in any topology (local, remote, different indexes on different partitions) and SAN, NAS, flash, SSD, HDD), providing flex- has a distributed capability so that it can scale ibility in cost-effectively adding capacity when across a clustered environment. This archi- required. tecture helps to support the product’s failover capabilities, which are supplemented by full logging facilities and automatic recovery. Load balancing and replication are both provided. The product includes its own web server, which is used to support web-based queries that utilise either a standard URL link or which may derive from applications such as Micro- soft Excel. The results are returned to the user’s browser either in HTML or XML format, or they can be exported to an Excel spread- sheet. Unicode is supported. A Bloor InDetail Paper 3 © 2014 Bloor Research Kdb+ and the Internet of Things/Big Data Architecture There are really two parts to kdb+: the q with kdb+. Because of the conciseness of the language and the database. We will discuss code, programs tend to consist of relatively each in turn. few lines, which makes debugging relatively simple. Code is interpreted but the interpreter The q language takes up not much more than 100K and this makes it easy for the environment to support The origins of q lie in a programming language many simultaneous processes. This small called APL. This was a language used from the footprint not only means that installation is early days of computing, primarily to process very fast, it also reduces the risks and costs numerical data. In 1988, while he was at associated with upgrades and maintenance. Morgan Stanley, Arthur Whitney developed A+ as a replacement for APL in order to support The database non-mainframe environments. However, while this crunched numbers more efficiently As has already been stated data is stored than APL, it was a proprietary development in compressed format in a columnar data- on behalf of Morgan Stanley. So, in 1993, base. Enough has been written (by both Bloor Arthur co-founded Kx Systems and devel- Research and others) about the advantages oped a further and more powerful replace- of column-based databases for analytics that ment language, called k. This was extremely we do not need to reiterate those arguments efficient but equally terse and it was very diffi- here. However, it is worth commenting on the cult for non-experts to read or understand so, approach kdb+ takes to in-memory processing. during the first decade of this century Arthur There are, essentially, three methods of imple- developed a more verbose version of k, called menting so-called in-memory databases. One q. While you can still use k almost all kdb+ is essentially to take a cache-based strategy customers use q, which, while still implying and call it in-memory, which it isn’t. The a learning curve, is much easier to use and second is to assume that all relevant data understand: for example, it has common func- can fit into memory.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us