Friday, July 11, 2008

OLAP component: Mondrian+JPivot or Flex OLAPDataGrid ?

Recently I've been spending a few hours digging into OLAP cube components (a special table to analyse large and multi-dimmentionnal data in Business Intelligence). I wanted to produce a nice demo with an OLAP cube plugged to the OpenERP (by far the best open source ERP) database.

I actually saw a guy demoing such an OLAP Flex component along with Openbravo ERP (looking nice but the details were provided): http://opensourceerpguru.com/
Anyway I just wanted to achieve the same but using OpenERP (I feel much more comfortable with it's elegant and efficient architecture, not to tell about the features nor the business model) this time and eventually JRuby on Rails, my best Swiss knife to pull the data to the OLAP viewer.

So at first I've been stunned by the OLAP Flex component (called OLAPDataGrid) . It looks really nicer than the old fashion Mondrian JPivot. So I decided to give it a try. First time with Flex and back to the half open source crapp since long ago. So I had to follow all the Adobe crapp flow: create a fucking account, read all their commercial crapp, agree with their whatever license and finally download the stuff and start playing with it. Then I remarked that all my FlexBuilder nice OLAP samples were coming with a "Flex Data Vizualisation Trial" watermark. OK, time to remeber, FlexBuilder is not open source yet, so let's go with the Flex SDK, back to the Adobe legacy crapp, download again and try again (I heard that the SDK was open source, or sort of).

Then I tried to compile my mxml component with the following command line:

flex_sdk_3/bin$ ./mxmlc /home/rvalyi/DEV/olap_test/src/olap.mxml
Loading configuration file /home/rvalyi/Desktop/flex_sdk_3/frameworks/flex-config.xml
/home/rvalyi/DEV/olap_test/src/olap.mxml(162): Error: Could not resolve to a component implementation.

id="myMXMLCube"

/home/rvalyi/DEV/olap_test/src/olap.mxml(195): Error: Could not resolve to a component implementation.


WTF ???

Googled the error message and got the official answer from an Adobe employee on a forum here: http://www.codeverge.net/item.aspx?item=101509

The OLAPDatagrid component is available only in the Flex Builder Professional
version. For the first problem, the one where you are building a Flex + LCDS
2.5.1 project, the answer is that the LCDS 2.5.1 doesn't include the
OLAPDatagrid component and that is way you are getting the errors on runtime.


You f****** b*st*rds! you got me! So that how I lost a few hours trapped by the Adobe half open source policy, go hell!

Mondrian or Flex OLAPDataGrid?
Well, back to Mondrian and JPivot...

OK, for sure Mondrian and JPivot aren't really something optimal and I feel more like it's a bloated non HTTP compliant piece of code, but hey it's free and it just works. So until Tiny.be release their awesome open source "TinyBI framework" (for October?) I'll stick with it. I'll hardly try Flex and Flash again, I promise.

Finally I should say that I really don't know anyway how that Flex component would deal with a large database as it seems it's an in memory client side OLAP solution only. Even if it were to change, I'm not sure I would feel comfortable in feeding the right data pieces as the OLAP component requires them and finally all the existing samples don't come with drill down, slicer and rotation widgets, so I'm not sure how easily one can interact with the cube.

May this post save your time.