Overview of kdb+ architecture

So far, I have covered quite a few intermediate topics without covering the basics. In this post, I would like to take a step back and talk about general architecture of kdb+. A simple kdb+ setup includes a feed handler (fh), a ticker plant (tp), a real-time database (rdb), and a historical database (hdb). These processes work together to manage the data flow.

Feed Handler

Before you can start capturing data, you first need a feed handler to get you that data. In case of stock data, there are ssl feed handlers that can be used. A feed handler’s job is to parse incoming data from the source (i.e. Reuters) and push it to a ticker plant.

Ticker Plant

A ticker plant is like a middle-man between the feed handler and subscribers (real-time database). It receives the parsed data from fh, updates its tables (trade, quote etc) and then pushes that data to its subscribers. As soon as the data is pushed, the tp deletes the data from its tables so you won’t find any data stored there. However, tp does keep a log of all the data updates. In case of disaster recovery, one can replay the tp log and recover the lost data.

Real-time Database

An rdb is a subscriber to tp. It is designed to receives updates from tp in real time. Unlike a tp, rdb actually stores its data throughout the day and then saves it to a historical database at the end of day. As soon as the data is transferred, rdb deletes all of its data.

Any time an rdb starts, it first looks for a tp log to see if there are any messages that it should read from there first. Once it has read that data, it starts receiving latest updates from tp.

In my EBook and articles, I focus on this idea. online levitra https://www.unica-web.com/films2007.pdf As prolactinoma involves too much production of prolactin hormone, it majorly affects the online viagra canada female reproductive system. Types of plastic surgery ? Octoplasty (ear surgery) ? Rhinoplasty ( nose reshaping) ? Forehead lift ? Dermabrasion ? Mastopexy ( breast lift) ? Abdominoplasty (tummy tuck) ? Rhytidectomy (face lift ) ?Liposuction ? Blepharoplasty (eyelid surgery) ? Octoplasty (ear surgery) ? Rhinoplasty ( nose reshaping) ? Forehead lift ? Dermabrasion ? Mastopexy ( breast lift) ? Abdominoplasty (tummy tuck) prices cialis ? Rhytidectomy (face lift ) ?Liposuction ? Blepharoplasty. Organisations therefore use the viagra professional for sale MVPI to confirm that you’re safe to do so.

Historical Database

An hdb saves all the historical data. It receives new data at the end of day when it is transferred from rdb. At its core, this is all that an hdb does but how it stores the data is very interesting and I will cover that in a separate post.

Besides these 4 common processes, you can have other as well. You can have real-time subscribers (besides an rdb) and chained ticker plants.

Real-time Subscribers

A real-time subscriber is just a process that subscribes to data in real time and an rdb is a type of real-time subscriber. Along with an rdb, you can have a stats process that also receives real time updates like an rdb but instead of simply storing that raw data, it generates stats on it. For example, you can have a process that calculates max, min, high, low stats on trade data as soon as it arrives.

Chained Ticker Plants

A real-time subscriber can do more than just receive updates and store them. It can also have its own subscribers. When that happens, it becomes a chained ticker plant. The name is quite self-explanatory. An example of a chained ticker plant would be a stats process that pushes the stats to clients as soon as it calculates them.

There are many frameworks out there that come with most of these processes coded and ready to be used straight out of the box. There is a very simple setup provided by kx itself called kdb+ tick. You can play around with the code and see how it works. Have fun!

Leave a comment

Your email address will not be published. Required fields are marked *