Integrate pentaho accelerator into apache tomcat

Dear,
We have bought a license of flexmonster a while ago (march 26). We now would like to use the pentaho accelerator for better user experience.
However, we already are running a mondrian server using a Apache Tomcat with local extensions. But I see the accellerator is a closed source package that is running as its own daemon. This currently makes it impossible to integrate for us.
Would it be possible to receive the sourcecode of the accelerator? This way we can implement the changes required on our end.
Let me know if any other information is needed, thank you for your response,
Martijn van den Broek
Software Engineer
Basesoft Solutions B.V.

8 answers

Public
Tanya Gryshko Flexmonster June 27, 2018

Hello, Martijn,
Thank you for writing to us!
Our development team needs some time to consider possible options for this case. We will contact you when we have any updates on the subject.
Regards,
Tanya

Public
Martijn June 28, 2018

Thank you. Feel free to contact me at martijn@basesoft.com

Public
Martijn July 5, 2018

Hi Tanya, any news on this?

Public
Dmytro Zvazhii Flexmonster July 5, 2018

Hello Martijn,
Thank you for giving us some time. We have prepared a sample project for you. Please find an attached zip file. In that project, you can find flexmonster-proxy-core.jar library which can be included into the existing project. Also, there are FlexmonsterProxyServletImpl for Mondrian 3 and FlexmonsterProxyServletImpl4 for Mondrian 4 which extend the FlexmonsterProxyServlet . Before loading the data you need to apply the necessary configuration. Please find the properties that need to be defined:
FlexmonsterProxyServlet.catalogsPath ="./";
FlexmonsterProxyServlet.connectionString = Jdbc=jdbc:postgresql://localhost:5432/fsb?user=postgres&password=Password;JdbcDrivers=org.postgresql.Driver;
CacheManager.memoryLimit = 1 * 1024 * 1024;
CacheManager.enabled = true;
Also here is the example urls for Mondrian 3 proxyUrl: "http://localhost:8080/flexmonster-accelerator-demo/flexmonster/mondrian3/"
and also for the Mondrian 4 proxyUrl: "http://localhost:8080/flexmonster-accelerator-demo/flexmonster/mondrian4/" .
Let us know if everything works fine for you.
Regards,
Dmytro 

Public
Martijn July 6, 2018

Hi Dmytro, this looks very promising. I’ll have a play with next week and we’ll let you know. Thank you!

Public
Martijn July 25, 2018

Hi Dmytro, I finally found the time to look into this. Thank you again for making this possible.
I managed to run your example project into tomcat and it seems its now communicating with flexmonster. However, when loading a query, it ends up with an JS error.
The Handshaking request goes well, I see it sending: 

{"componentVersion":2.57,"componentVersionLabel":"2.5.7","acceleratorMinVersion":2.416,"signature":"Xkqy6XOojrxLFaYvv/nSrZ40evg="}

and the server replies with: 

"{\"version\":\"2.5.6\"}"

Then in the DiscoverDimensions call it sends:

{"catalog":"blackbox.settings.docker.FoodMart","cubeUniqueName":"Sales","credentials":null,"customData":"","localeIdentifier":"","effectiveUserName":"","roles":"","signature":"r7HmkaPoXjPjHKDtfuvgUSQfKF0="}

The server replies with:

"{\"data\":[{\"caption\":\"Measures\",\"uniqueName\":\"[Measures]\",\"type\":2},{\"caption\":\"Store\",\"uniqueName\":\"[Store]\",\"type\":3},{\"caption\":\"Store Size in SQFT\",\"uniqueName\":\"[Store Size in SQFT]\",\"type\":3},{\"caption\":\"Store Type\",\"uniqueName\":\"[Store Type]\",\"type\":3},{\"caption\":\"Time\",\"uniqueName\":\"[Time]\",\"type\":1},{\"caption\":\"Product\",\"uniqueName\":\"[Product]\",\"type\":3},{\"caption\":\"Promotion Media\",\"uniqueName\":\"[Promotion Media]\",\"type\":3},{\"caption\":\"Promotions\",\"uniqueName\":\"[Promotions]\",\"type\":3},{\"caption\":\"Customers\",\"uniqueName\":\"[Customers]\",\"type\":3},{\"caption\":\"Education Level\",\"uniqueName\":\"[Education Level]\",\"type\":3},{\"caption\":\"Gender\",\"uniqueName\":\"[Gender]\",\"type\":3},{\"caption\":\"Marital Status\",\"uniqueName\":\"[Marital Status]\",\"type\":3},{\"caption\":\"Yearly Income\",\"uniqueName\":\"[Yearly Income]\",\"type\":3}],\"sessionId\":1532515372}"

But then, I see an error in the browser:

VM249705:17904 Uncaught TypeError: Cannot read property 'length' of undefined
at z24.ID (<anonymous>:17904:47)
at v1A.Y4JJ.c6y.Kd.Kd.call.catalog [as Nc] (<anonymous>:17889:19)

It seems that K24 is undefined in the method ‘z24.prototype.ID’. This is minified/obfuscoded code so I cant debug this further. Do you have any idea what could be wrong? 

We are running the latest flexmonster clientside (version 2.5.7)
 

Public
Martijn July 27, 2018

I looked a bit further into this. It seems that the response is double JSON encoded (as seen in my previous response). 

Looking at FlexmonsterProxyServlet.discoverDimensions, I see its return type is String and it has a @Produces({“application/json”}) decorator. This seems to cause the double encoding. 

If I change the return type to DiscoverDimensionsResponse (and keep the @Produces), it does provide a clean JSON response. So shouldn’t all these path methods have a proper return value? 

Small notice: in your pom.xml, you had com.sun.jersey jersey-bundle set to version 1.8 which gave strange errors. I upgraded that to 1.19.4 to keep it in sync with jersey-server and jersey-core. 
 

Public
Ian Sadovy Flexmonster July 27, 2018

Hello Martijn,
 
Thank you for the detailed answer.
You are right, double encoding is not correct.
Please find the jar without @Produces({“application/json”}) decorator.
Hope it helps.
 
Regards,
Ian

Please login or Register to Submit Answer