Dirk,

Thanks for the reply. It was a pleasure speaking with you yesterday, over the 
phone.

Now, all our front end and web service applications are integrated with JNI 
with C++ Quant frameworks behind it. Going multi machine, would be a 
significant architectural change. This might not be feasible in the short run.

A couple of options to consider.

1. We would really like to know, why the seg faults are happening, before we 
give up this path. Rcpp/RInside protocol fits very well within our framework.  
It will be very sad to see if this option does not work.
     1.1 We will be working on debugging this issue today.
2. Client Server Design:
        2.1 We run large portfolios using monte carlo simulations with about 
150-300 paths. This means at any given point of time we would be running 1000 
cores in parallel, all running an R model. Does Rserve/opencpu/gRPC scale to 
this level?
              2.2. If we do go down this path, our C++ quant library needs to 
be the client. Currently we are using Rcpp template data types to go back and 
forth between R. Which client server option is close to this model, so that we 
leverage the existing Rcpp investment.
3.What is your availability, if we need to bring you down to Northern Virginia 
for a day?
 

Regards
Ravindra

-----Original Message-----
From: Dirk Eddelbuettel [mailto:dirk.eddelbuet...@gmail.com] On Behalf Of Dirk 
Eddelbuettel
Sent: Tuesday, August 15, 2017 7:53 AM
To: Kota, Ravindra B <ravindra_k...@freddiemac.com>
Cc: rcpp-devel@lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] RInside Using JNI

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


Ravindra,

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 | e...@debian.org
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to