I have some statistical & machine learning models written in Python using some of the standard Python libraries for such things (scikit-learn, pandas, numpy).
I have these wrapped and served by a web service in Python to expose the models via REST. For reasons, I now need to have these served by a Java web service using Spring Boot.
Initial plan was to cross-compile using Jython but after some reading it seems Jython does not support modules with C-extensions; which makes sense but sadly are fairly prevalent throughout some of these maths libs.
After some poking around, there doesn't seem to be really any good routes for executing these models directly in Java. I'm wondering if anyone has any knowledge that may help me here or has come across a similar problem previously.
I realize I can spawn a Python subprocess in the Java service to execute the models, but I'd rather find a cleaner / more performant route if possible.
Would like to make sure I'm not missing something here before I 'resort' to using subprocesses.
Apologies if I've not properly followed Stackoverflow conventions; I've tried.
Thanks