Hey everyone, I’m exploring UI tools and integrating them with Julia. As part of this exercise I ended up making a nice UI in JAVAFX, now I need to hook it into Julia…
So there’s two ways to go about this from what I understand(if there are others please suggest!).
- have a server where JAVA sends instructions to be understood by Julia (zmq, webio, whatever).
- have JAVA natively call Julia code and use some kind of wrapper (https://github.com/rssdev10/julia4j - probably outdated by now) and interpret the data via JAVA. This sounds like a pretty serious effort, if the machinery isn’t in a working state.
Okay, so I am working on a pretty data intensive idea. A lot of manipulations are happening. So most operations need to be flexible/generic. Constantly calling down to julia, retrieving, and sending back data is gonna bite me in the butt really quick. Having to write hyperspecific wrappers will also kill my productivity.
Is it common for people to write pseduocode/enums/hashmap API’s for interfacing languages? IE:
JAVA sends : \x23\x26\x12 (hunk of data)
Julia receives: \x23, \x26, \x12 and maps it to julia functions A, B, and C. Then composes the three functions (foldl, or whatever on the tuple), receives the data, applies the composite operations. It then sends the transformed data back?
I see this level of wrapping as very laborious for many operations. Especially if there are a variety of parameters for each function. Then again, a decently generic framework could maybe be made if the number of params and types of each call can be introspected in Julia…
That being said… Going this route could mean that embedding HTML in say a JAVA app could lead to really nice use of Julia code with minimal effort. (Call plot, spin up connection, Java connects, and displays Julia plot).
What kind of design patterns do people typically use to interface languages like these? I know the JS crowd does this sort of stuff all day.