In my last post, I gave an idea about how one can make their flex application talk to a Microsoft Analysis Services instance. Flex Analysis service Bridge and HTTP pump together provide a layer in between to enable communication between two.
- An XMLA request like DISCOVER_CUBES is sent to the XMLAService.
- XMLAService takes the request and uses it to create a SOAP request. The created SOAP request is then sent to the HTTP pump.
- HTTP pump (msmdpump.dll) then forwards the request to the Microsoft Analysis Services Instance.
- Microsoft Analysis Services respond to the request and send the SOAP reply to the HTTP pump.
- HTTP pump then forwards the reply to the bridge.
- Bridge then parses the reply and create an actionscript representation of the reply. XMLAService then dispatches an XMLA_RESULT event which can be listened and appropriate action can be taken. After dispatching the event XMLAService also takes care of calling the responders if any registered.
Similarly, when cube.refresh() is called from the Flex application, the bridge starts reading the cube by sending SOAP requests to the HTTP pump which in turn forward these requests to the Microsoft Analysis Services instance. The ASCube keeps parsing the replies and building the cube. It also keeps sending CUBE_PROGRESS events. Once it receives all the replies, it dispatches a CUBE_COMPLETE event.
Same workflow is followed in case of query execution.
I also explained in detail the code you need to write in your flex application in my last post. You can see, after using the bridge it requires almost zero effort to connect with a remote OLAP cube. The implementation is generic enough and is supposed to work in case of a custom XMLA provider like mondrian. The only thing you need there is a serviceURL or in other words an equivalent of HTTP pump which can accepts POST requests. Feel free to use and drop in your feedback.
You can download the code here.