[Rcpp-devel] RInside Using JNI

Dirk Eddelbuettel edd at debian.org
Tue Aug 15 13:53:15 CEST 2017


Thanks for posting here.

On 15 August 2017 at 08:45, Kota, Ravindra B wrote:
| We have financial models written in C++, exposed to Java applications using the JNI. Lately, we have started writing these models in R, and trying to integrate them in C++ using RInside. Standalone integration with C++/RInside/R works fine. We get seg faults when integrated with JNI.

Can you go multi-machine?  Have one engine deal with C++ models and their R
integration.  Have another engine deal with the Java UI and integration.

There are by now multiple ways to 'request' R answers over tcp/ip, starting
from the good old Rserve by Simon (initially written with a Java client, no
less) to Jeroen's opencpu and more.  I actually like Google's Protocol
Buffers (package RProtoBuf) and the by-now added gRPC networking.

Methink you have less of an Rcpp / RInside question and more of an overall
architecting question.  For which this list may be less relevant.

As for your questions:

| 1.       Are there any limitations integrating RInside inside the JVM?

I prefer to stay as far from JVM and CLI and all that as I can. But maybe
that's just me.
| 2.       Do we have any best practices for this.?

See above. Separation of concern?
| 3.       Do we have tools available to debug this better?

Not really.

Cheers, Dirk

http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the Rcpp-devel mailing list