简体   繁体   English

python vs java for kafka implementation

[英]python vs java for kafka implementation

@kafka users: @kafka用户:

I have been trying to understand python client for kafka, including PyPy client as well. 我一直在尝试理解kafka的python客户端,包括PyPy客户端。 Following was a good benchmarking i read and realized some similar results: 以下是我阅读的一个很好的基准,并实现了一些类似的结果:

http://mrafayaleem.com/2016/03/31/apache-kafka-producer-benchmarks/ http://mrafayaleem.com/2016/03/31/apache-kafka-producer-benchmarks/

I am extremely confused whether Java has a massive advantage over python, as the libraries are written using Java and kafka. 我非常困惑Java是否比python具有巨大的优势,因为库是使用Java和kafka编写的。 So my question is, does the native implementation of Kafka in Java helps with performance tremendously when Java is used, or PyPy/Python works equally better? 所以我的问题是,当使用Java时,Kafka在Java中的本机实现是否有助于提高性能,或者PyPy / Python的工作效果更好?

Being a python programmer, I am not at all comfortable with java, and hence confused. 作为一名python程序员,我对java一点也不熟悉,因而感到困惑。

Apache Kafka defines a language neutral wire protocol (see https://kafka.apache.org/protocol ) and so clients can be written in any programming language and do not need to be based on the Java client that ships with the core Kafka distribution. Apache Kafka定义了一种语言中性线协议(请参阅https://kafka.apache.org/protocol ),因此客户端可以使用任何编程语言编写,并且不需要基于核心Kafka发行版附带的Java客户端。 For example, the c/c++ librdkafka library is a very high performance non-Java client. 例如,c / c ++ librdkafka库是一个性能非常高的非Java客户端。 There are a number of python Kafka clients including one that is based on librdkafka. 有许多python Kafka客户端,包括一个基于librdkafka的客户端。 Benchmark results and other comparison information for the various Kafka Python clients is available here http://activisiongamescience.github.io/2016/06/15/Kafka-Client-Benchmarking/ 有关各种Kafka Python客户端的基准测试结果和其他比较信息,请访问http://activisiongamescience.github.io/2016/06/15/Kafka-Client-Benchmarking/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM