Skip to content

fork with some fixes #1

@subes

Description

@subes

Hi,

thanks a lot for this library. I have forked it and rewritten/fixed some parts here: https://github.com/invesdwin/invesdwin-context-julia/tree/main/invesdwin-context-julia-parent/invesdwin-context-julia-runtime-juliacaller/src/main/java/de/invesdwin/context/julia/runtime/juliacaller/pool

  • use begin/end to support multi line commands
    • need to escape newlines when sending through the socket
  • Pkg.installed is deprecated, I have implemented a workaround using Pkg.dependencies()
  • there was no way to read the stdout from the java side
  • there was no way to react to errors (stderr) from the java side
    • though the current solution can not differentiate between warnings (e.g. deprecation) and errors sadly
  • replaced org.json with jackson (better handling of array vs object)
  • make it recover from more error cases (e.g. errors during "get" operations and don't close during errors in "exec" operations)

If you like you can have a look and backport some fixes. The fork also includes a testsuite for writing/reading various data types (including vectors and matrices).
Though I guess https://github.com/org-arl/jajub could be a more sophisticated solution since it seems to support binary transport and does not require a socket. But still, it is good to have options to choose between. Using json/socket based communication might be more robust long term, despite being slower.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions