kafka网络层

原创
半兽人 发表于: 2015-03-10   最后更新时间: 2022-03-08 23:30:31  
{{totalSubscript}} 订阅, 21,055 游览

The network layer is a fairly straight-forward NIO server, and will not be described in great detail. The sendfile implementation is done by giving the MessageSet interface a writeTo method. This allows the file-backed message set to use the more efficient transferTo implementation instead of an in-process buffered write. The threading model is a single acceptor thread and N processor threads which handle a fixed number of connections each. This design has been pretty thoroughly tested elsewhere and found to be simple to implement and fast. The protocol is kept quite simple to allow for future implementation of clients in other languages.
网络层是一个很直接的NIO服务。这里不详细说明。sendfile实现是MessageSet接口的writeTo方法。允许文件备份消息集使用更有效的transferTo实现而不是在过程中使用缓存写入。线程模型是一个单接收线程和处理每个连接的N个处理器线程。这种设计已经在别的地方得到充分验证,发现实现简单、快速。该协议很简单,方便以后客户端用其他语言来实现。

更新于 2022-03-08
在线,2小时前登录

查看kafka更多相关的文章或提一个关于kafka的问题,也可以与我们一起分享文章