Real-Time Cube (RTC) Aggregation – Thoughts and Code (Rx)
I’ve spent a bit of time thinking about in-memory cubes since my last posting. The net out is the following that shows a hierarchical tree holding the dimensions, coupled with leaf nodes that support the measures. Similar to WPF and the logical tree/visual tree, the in-memory cube has a dimension/aggregator tree – there can be n dimension trees within the cube. The aggregator tree leverages Rx to satisfy a number of requirements:
- Allow notification of updates
- Measure storage
- Support dynamic aggregations – as previously posted
I also want to to satisfy the requirements of:
- RTC built on top of a distributed cache
- RTC probably wants to leverage a database as backing storage (risk warehouse)
Which leads to this random thought process:

Given the above, from a RTC perspective I want to add measures for various dimensions, observe at various levels, and aggregate. So taking the above thoughts, I want to maybe do something like this:
_cube = new RTC<int>(configuration);
_cube.Add(1, new RTCLocation("region|london.desk1.book1","product|fx"));
_cube.Add(2, new RTCLocation("region|london.desk1.book2","product|fx"));
_cube.Add(3, new RTCLocation("region|london.desk1.book3","product|swap"));
_cube.Add(4, new RTCLocation("region|london.desk2.book4","product|swap"));
_cube.Add(5, new RTCLocation("region|london.desk2.book5","product|fx"));
_cube.Add(6, new RTCLocation("region|london.desk2.book5","product|fx"));
var resultfx = _cube.GetValues(new CubeLocation("region|london", "product|fx"));
var resultswap = _cube.GetValues(new CubeLocation("region|london", "product|swap"));
var q = (from fx in resultfx.Scan((value, acc) => acc + value)
from swap in resultswap.Scan((value, acc) => acc + value)
select fx + swap).Replay(1);
q.Connect();
q.Subscribe(val => Console.WriteLine("Total {0}", val));

[...] the measure at the intersection of several hierarchies). Anyway, I’m not going to go into any more depth as far as the nitty-gritty of the coding is concerned, but here are a few interesting [...]
Castles in the Air « iGlossolalia said this on March 24, 2010 at 4:47 pm |