Skip to content

Design Discussions Join Manager v2

chrisjstevo edited this page Oct 15, 2021 · 7 revisions

Design Discussions - Join Manager v2

Currently join logic is the responsibility of two components, the join manager that receives events from source tables, it stores a link between a source table (such as instruments) and a join table (such as instrumentprices) that requires it. In v1 of the Join Manager Esper provides the ability to map source events to their dependent join tables and to generate 1 or n events to propogate the tick:

Use Cases for Join Manager

Left Outer Joins

Tick one to one or many:

Prices

Ric Bid Ask
VOD.L 100 101
BT.L 310 311

Orders

OrderId Ric Quantity
1 VOD.L 1000
2 VOD.L 5000
3 BT.L 7000

In this example assuming order id's 1,2 & 3 have already ticked through the join manager as soon as a new tick comes in for VOD.L, we would expect the input in the join manager to be:

instrumentsEvent: { "prices.ric" -> VOD.L "prices._isDeleted" -> False }

The output from the join manager would be:

{ "prices.ric" -> "VOD.L", "prices._isDeleted" -> False, "orders.orderId" -> 1, "orders._isDeleted" -> False, }

{ "prices.ric" -> "VOD.L", "prices._isDeleted" -> False, "orders.orderId" -> 2, "orders._isDeleted" -> False, }

{ "prices.ric" -> "VOD.L", "prices._isDeleted" -> False, "orders.orderId" -> 3, "orders._isDeleted" -> False, }

Left Inner Joins