Let's say I've got a Java/Scala backend and I want to develop middleware in Python for it. I have no experience with developing middleware, but I presume it means that from within Python I would need to issue commands to the running Java/Scala backend programs, and in turn receive feedback from that backend. For this to happen I need to interface the two languages and there are several options for interfacing Python and Java. According to these pages there are some options:
- JPI
- JNI
- JPype
- Jepp
- Jython
- JCC
Unfortunately, JPI, JNI, JPype and Jepp do not seem to be actively developed anymore (last update more than a year ago). Jython is still active, but I read that it is not possible to import all Python modules from within Jython. JCC seems to be some kind of C++ layer between Java and Python, which also seems counter intuitive.
I've also found some questions on SO about the topic, but most seem more than 3 years old, which in internet/Python land is of course a long long time.
Since I've got some experience with the ZeroMQ messaging library I could use that, but I'd have to adjust the Java programs for it (which wouldn't be that big of a trouble, but if there's a better solution..).
So my question is: taking into account that I have control over a Java/Scala backend, what is currently the best way to write a Python middleware layer for that backend?