【kafka系列教程24】kafka网络层

网络层

 

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 Nprocessor threads which handle a fixed number of connections each. This design has been pretty thoroughly tested elsewhereand 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个处理器线程。这种设计已经在别的地方得到充分验证,发现实现简单、快速。该协议很简单,方便以后客户端用其他语言来实现。


 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值