Closed kwerle closed 7 years ago
Hi @kwerle,
mondrian-rest
is a standard Rack application, so if you're using JRuby for your Rails app, it's entirely possible to make them share a single environment. Is that what you want to do?
BTW, would you be interested in contributing a PR to mondrian-rest-ui
? That Dockerfile
could be useful to other users :)
Thanks!
Yeah - I'm using the https://github.com/rsim/mondrian-olap gem, so it is jruby. So I'd love to integrate them. I just don't happen to have any experience doing that.
I fully intend to PR the Dockerfile branch - once I have successfully tested it :-)
mondrian-rest
also uses @rsim' smondrian-olap
. In fact, mondrian-rest
is just a REST end point for some of the features that mondrian-olap
offers.
Can you expand a little bit on the integration that you want to build?
Maybe I'm missing something really obvious. I have a rails app that also does MDX queries using mondrian-olap. I would like to add a route to my app that leverages the mondrian-rest gem. Specifically, my mondrian-olap using code already configures a schema and database connection - which I would like to pass to the rest gem. So I want http://my-rails-app/api/mondrian-rest to use my already configured schema and provide the appropriate rest access for the -ui app.
mondrian-rest
, by default configures its own connection to Mondrian. If you'd like to re-use the one that you already have in your Rails App, you can try monkey-patching Mondrian::REST::APIHelpers.olap
so it returns your instance of Mondrian::OLAP::Connection
How I made it work:
Gemfile:
gem 'mondrian-rest', platforms: :jruby
gem 'rack-cors', :require => 'rack/cors' # To allow requests from mondrian-rest-ui not hosted by the rails app
routes.rb:
require 'mondrian_rest'
Rails.application.routes.draw do
mount Mondrian::REST::Api => '/api/olap/'
...
config/initializers/mondrian_rest.rb:
require 'mondrian_rest'
Mondrian::REST::APIHelpers.class_variable_set('@@olap', Dwh.olap) # Dwh.olap is my olap connection defined by the mondrian-olap gem
Glad that you made it work, @kwerle.
May I ask what are you building with mondrian-rest
?
Just about what you'd expect: using it for rest-ui so that analysts can sort through craptons of data. Not sure it's all gonna fly. Anticipate 100M's or B's of rows...
Performance is pretty much up to the DB that you use. Mondrian, for most MDX queries, generates pretty standard GROUP BY
statements. For 100Ms or Bs of rows, you might want to look into columnar DBs.
Hey @kwerle, any luck with mondrian-rest
and your project?
I'll be circling back to this in the next week or two.
On Mon, Sep 4, 2017 at 1:38 PM, Manuel Aristarán notifications@github.com wrote:
Hey @kwerle https://github.com/kwerle, any luck with mondrian-rest and your project?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jazzido/mondrian-rest/issues/21#issuecomment-327025507, or mute the thread https://github.com/notifications/unsubscribe-auth/AABbGGe8GioUJ7dXK4y4cRnTWRoZ_NKQks5sfF_QgaJpZM4O6jZF .
-- kurt@CircleW.org http://www.CircleW.org/kurt/
I'm interested in integrating mondrian-rest into a rails application. Do you have any advice on how I might go about that?
I've already Docker-ified the -ui application (https://github.com/kwerle/mondrian-rest-ui/tree/feature/Docker).