Rserve Into A Rails Application Integration

This question is a continuation of the question that I posted earlier this year.

Integrating R Statistical Package into a Rails Application

Based on my answer, I landed on Rserve as a means of integrating R into my rails application. In particular, I will:

I am running jruby through torque and plan to use R with the mlogit package.

My questions:

  • Has anyone followed a similar approach and what was your experience. What is gotchas
  • How performance works. The Rserve_Ruby client must be executed.
  • What R packages did you use? You used the mlogit package.
  • Share any additional information that you think might be helpful.

Thanks for your input.

+7
source share
1 answer

To answer your questions:

  • Yes. I integrated rserve into a rail application. I successfully worked on my server. I am having some problems trying to use Heroku to serve my application (using r buildpack ). During debugging, I switched to rinruby to match the examples for buildpack.

  • Rserve performance was good on my server. Rinruby also works well.

  • I do not use any packages in my application. However, this is easy to do. If you are deploying to Heroku, see init.r file in the example for r buildpack .

  • For a low-traffic application, Heroku will serve the application for free. The main difference between rserve and rinruby is that with rserve you start your own instance of R, with which rubing will communicate. Rinruby begins its own copy of R from inside the ruby.

+3
source

All Articles