|No such thing as a small change|
Calling perl systems from other systems, e.g. Rby swl (Parson)
|on Apr 28, 2022 at 03:07 UTC ( #11143372=perlquestion: print w/replies, xml )||Need Help??|
swl has asked for the wisdom of the Perl Monks concerning the following question:
I have a large Perl code base and I want to develop bindings of some description so it can be called from other systems on a local machine, in this case R.
What are good ways of approaching this problem? And is there prior art that I can adapt?
The reason for this is that a large chunk of the user base lives in R, and it is neither practical nor desirable to rewrite the system in R. I have a GUI system in place that hides all the coding but this obviously cannot be integrated with automated workflows for people who are comfortable coding.
My thinking at the moment is to wrap the Perl libraries in a local service via some front-end. The R end of the system can then send data and commands to it, and then receive results and metadata back. Ideally all the low-level stuff on the Perl side would be handled by an existing system, e.g., maybe something like Mojolicious. The aim is to have one Perl process per R session to avoid headaches with shared memory (unless there is a simple solution for that).
This needs to work on the main operating systems (Linux, Windows, Mac, BSD variants). The Perl side of things will be packed up using PAR::Packer.
And if you’re wondering about PDL, it is already in use for many of the analyses.
Back to Seekers of Perl Wisdom