Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

passing events from erlang to Clojure

I'm looking for a way to pass events back and forth between Clojure and erlang.

  • has someone done this before?
  • how should I encode the (immutable) messages in a flaxable general way?
  • Should IPC be used for this? what sort?
  • where has this gone wrong for you in the past?
like image 700
Arthur Ulfeldt Avatar asked Nov 18 '09 21:11

Arthur Ulfeldt


2 Answers

You could use jinterface from clojure and be able to act as an Erlang node and send out multiple Pids associated with your node, in the Erlang cluster.

like image 56
Christian Avatar answered Nov 15 '22 07:11

Christian


You've got lots of options as long as you use a socket (e.g. TCP/IP).

  • Have you considered JSON?
  • XML?

I can't say I've done Clojure <--> Erlang bridges before but "talking" to Erlang in JSON/XML is sufficiently painless.

Of course you can use the erl_interface (binary exchange protocol) but then you'll need (probably unless there is a lib for this) to craft a marshaller for this in Clojure.

like image 36
jldupont Avatar answered Nov 15 '22 07:11

jldupont