-
FEATURED COMPONENTS
First time here? Check out the FAQ!
In my company some data science components are written using Python scripts. But our web application is Java. Now, I need to call these Python scripts from my web application supplying some data and run time parameters. What is the best way to make such calls.
Our data scientists are thinking of opening their Python APIs as ZeroRPC based endpoints and expect me to write a Java client to call their APIs. (I Googled and there is not a lot of information on this). Is this the right way? What are the typical/standard ways to interact with Python code?
unusual question ... (for a ZK forum) I guess the simplest way would be to execute a new process and consume the output stream
https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.html
as for remote calls (RPC) it depends on the protocol used, if you find a Java api to call zerorpc
I found this 5 year old implementation: https://github.com/jamescarr/zerorpc-java
the code for the client implementation doesn't look complicated and easy to reuse:
https://github.com/jamescarr/zerorpc-java/blob/master/src/main/java/org/zerorpc/ZeroRPCClient.java
I haven't tried this but it looks like it's based on 2 other libraries jeromq and msgpack (which still seem active up to today)
Asked: 2019-03-15 15:08:22 +0800
Seen: 8 times
Last updated: Apr 11 '19
Facing issue in masking on phone [closed]
coerceFromString_ override no longer works from 6.5.1 [closed]
Execute Javascript on component visible
Is there a way to resolve view model properties as input to client side javascripts?
scrollbar listner for 2 grid [closed]
Theme javascript wpd file not found