Julia + elixir

Sorry I wasn’t able to figure out the spawnfest registration. I was in the process of evaluating if I should quit my job due to some unexpected developments, and that consumed a lot of energy.

We actually started doing this before 1.0… and it was not trivial. Then the situation improved with 1.0 and the new package compiler, which we started to use. But it still required some non-trivial work. We haven’t modified this part of our code since then, so I’m not sure how much changed since 1.0.

Good luck with your next project!

1 Like

Unfortunately our architecture of the platform we have built on k8s is better handled by having the 2 runtimes and services written in the 2 languages on different pods so we can scale independently

I think though you can configure julia workers to listen on a socket with a much more lightweight protocol (and even instruct K8S to use that protocol as a liveness check), without having to drop in such a heavy system. I guess it depends on what your latency requirements and how long each job takes; if your julia jobs are on the order of milliseconds you might care; if your julia jobs are on the order of minutes or more HTTP is a-ok and probably easier to debug if something goes wrong.

Good point and for some of our Julia services it might be a good option. I will discuss this idea with the team and see it we can add it to our backlog. Cheers

haha sorry that was more of a shower thought. Unfortunately the julia worker interface is not very well documented, so I would say, for a team that has to deliver a product it’s probably not worth the hyperoptimization yet, but you know, it would probably be “fun to look into”. That sort of a thing.

Yeah no worries, I took it is the spirit it was intended :slight_smile:

Yes, Socket is more flexible than Stantard IO, emm, I have a question that when communicate with Erlang by Sockets, Json Format or Erlang External Format which one is preferred?

If you are sending textual data, we didn’t see a large improvement between JSON and Erlang.

Also note that sending Erlang terms to a server is insecure.

So if you are sending binaries and want efficiency, I would go with msgpack or similar. :slight_smile:

Oh, Thanks!

I’ve been working on a reasoning system using Elixir/OTP (I’m really enjoy it !!!). The system should have been connected to the robot hardware, but for testing purposes a simulated environment Webots was chosen.

Unfortunately, webots doesn‘t have a language interface for Elixir. So, I use Julia call its dll and transfer robot status to Elixir by Socket.

Well, the status information also includes camera images, so msgpack may be a good choice, just like what AirSim does. But the images are represented by String and its resolution is relative small, so JSON is used by the system. :joy:

I want a good interoperability between Julia and Elixir, both are great programming languages! However, now, Socket + JSON or MsgPack may be more realistic.