Fork me on GitHub
#data-science
<
2018-01-10
>
sb12:01:07

Guys, how did you integrated Clojure with Python? What is the best practice? Eg. R via websockets, Python via read-write db?

sb12:01:48

Or like "rest-api"?

romni12:01:09

what about using jython

sb14:01:18

I saw, I did not try. Somebody have experience with that?

sb16:01:20

Thanks! I didn't see that!!

joelkuiper18:01:34

we talk JSON over RabbitMQ as an RPC

joelkuiper18:01:06

it’s bog standard, but works fine for our use case as long as you keep the Python analysis stateless

sb19:01:51

thanks again! works within 5 min! 👍👏

phronmophobic19:01:29

@sb, just to throw out an alternative, I’ve embedded python via their c api through clojure-jna, (see https://docs.python.org/2/extending/embedding.html and https://github.com/Chouser/clojure-jna/)

phronmophobic19:01:53

it’s not too bad if you know a little C

phronmophobic19:01:01

the big advantage is that it’s in process

sb19:01:20

thanks I check it! @smith.adriane sounds interesting!

phronmophobic19:01:25

so if you have large python data structures, you don’t have serialize them to access them from clojure

phronmophobic19:01:33

because of python’s duck typing, you can set it up so that the same object can be used from both python and clojure

phronmophobic19:01:44

as long as you implement the python protocols on clojure side and vice versa

sb19:01:41

thanks! I need to try out to see deeply! 👍