请教python与java之间rpc通信,rabbitmq相关。
天蓬老师
天蓬老师 2017-04-18 09:59:27
0
4
524

我有一套系统,内部模块间rpc互相调用,都是python语言开发的,用rabbitmq来实现。但是消息的序列化用的python
平台才有pickle包。现在想接入java语言开发的模块,但是java平台的序列化肯定不是pickle,这怎么解决。

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(4)
左手右手慢动作

Use Google’s protobuf

PHPzhong
  1. JSON is simple and crude

  2. msgPack format, widely supported, similar to JSON, but more efficient

  3. Thrift family bucket, refreshing

  4. protobuf + gRpc

Based on my personal preference, I recommend Thrift. It does everything that needs to be done, allowing you to focus on the code logic

Obviously, normal people will not use pickle. This format can only be played in the Python world (and there are also version compatibility issues). However, now a slightly larger project, several languages ​​​​are really too difficult to develop. It’s common (standard configuration), pickle has no use (it’s just a toy to play with)

PHPzhong

For data exchange between different languages, you can use the following technologies
protobuf, thrift, avro, zeroc ice.
These can serialize data into binary. The efficiency is much higher than json transmission

小葫芦

Protobuf and thrift are both available.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!