Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to "sandbox" RInside in a separate process. This should prevent buggy or malicious R code from interfering with your application - which is always useful, especially when the R code is user-submitted.
The exposed client API provides similar functionality to RInside, with slightly different syntax. Custom data types can be supported (assuming they implement serialization methods in addition to the Rcpp wrappers), and the R code can call back into provided C++ functions.
I don't think it's possible or wise to tightly integrate this code into RInside; hence it lives in a separate directory in the examples.
This code hasn't seen more than two eyes yet, so please review and comment!
What you will need to run this:
I've split the code into five separate commits for review; I suggest reading them commit by commit. If this gets accepted, I'll be happy to provide a different history for the actual pulling.
Currently, I've only implemented a separate standalone server that listen()s for clients. For my needs, this increases security (running the server as a different user) and improves performance (R is initialized only once, then fork()ed for each client).
I've chosen the abstraction in a way that should make it easy to switch to a solution where the application spawns a new process and communicates over a shared pipe - which is more suitable for a desktop application. I'm not currently interested in implementing that though.