开发者

A lightweight protocol for Python and Erlang interaction

What protocol preferred to use for interaction between Python-code and Erlang-code over Internet? ASN.1 woul开发者_运维问答d be ideally for me, but its implementation in Python cannot generate encoder/decoder out from notation.


Did you check Google's protocol buffers? It is very easy to use and there is an Erlang implementation available


Well, you could use JSON or BERT.

JSON is easily reable by humans, as it is ASCII only. To send binary data, you need to encode them (e.g. with base64).

Another solution would be using BERT. BERT is based on the "erlang external binary format" for serialization, so the erlang side is pretty simple ;)

  • python: http://github.com/samuel/python-bert
  • Erlang: http://github.com/mojombo/bert.erl


Also, you might want to have a look to Apache Thrift, an IDL supporting both Python and Erlang.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜