Anything to read on suggested solutions to inter-process communications

Hi there
struggling with my architecture and would like to do a little reading. I have existing Python scripts which login to a brokerage api and get me real time data which I use for calculations.

I am thinking about sending the data stream to a julia script and doing the calculations there. The data ( in python) is of the form ( separated by “:”)

mac address:UTC:ticker symbol:contract id:close price

I would like to know if the julia community have a document or thread that discusses suggested solutions to inter-process communications between running python scripts and julia.

right now I am thinking:
PyCall which is my fav option with a side order of Pluto @bind event handling Paul Berg
ZMQ
basic TCP tcp example or MPI.jl

or queues et al

How long is that Python script? Feels to me like the smaller headache here would be to just knock up a Julia script that downloads the brokerage data a la

https://juliaquant.github.io/MarketData.jl/stable/

hi @nilshg it’s about 30 lines. I would prefer to just leave them alone and process the output stream in julia. To me this is a fresh start and more fun.

I don’t want to use anyone else’s data and the one you kindly sent me doesn’t seem to have implied volatility data which is important to me, I don’t want to have to calculate it if I can avoid it. I am certainly going to be using PolygonIO.jl as it seems to be an excellent approach.

If it’s a 30-line script I would assume you’ve already spent more time worrying about how to get Python to play nicely and do inter-process communication than it would have taken to just re-write this in Julia (which I guess would also materially decrease the maintenance burden going forward), but of course you know your requirements better than I do, just my 2 cents!

2 Likes

it’s 30 lines of MY code but several hundred of function abstraction code written by others WAY more competent than me.

I’d prefer to shrink wrap the python ( it’s working well) and just concentrate on julia. I don’t want to start by recoding something when I don’t have to. It seems to me that julia has an abundance of solutions to this ipc issue and I’m having fun researching them. Thank you for your observation though. Always good to have a second opinion.

1 Like

Probably ZMQ is easier than either of these for inter-language inter-process communication.

But honestly I think that IPC is way over-complicated as a way to interface to a 30-line Python script that you could trivially run from PyCall or translate to Julia.

2 Likes

I agree 100% and am absolutely revisiting PyCall. Don’t let the 30 lines confuse the issue. It’s 30 lines of my “code” and several 100 of other peoples.

thanks for your suggestion about ZMQ could be excellent later on.