高性能网络的Netty替代品有哪些? [英] What are the Netty alternatives for high-performance networking?

查看:970
本文介绍了高性能网络的Netty替代品有哪些?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在选择一个网络库来实现一个无法释放任何微秒的客户端/服务器系统。它将实现自己的协议来发送和接收消息。我正在寻找一个好的NIO框架,这将允许我轻松开发服务器和客户端,而不必过多担心低级别的选择器细节。每个人都建议我使用Netty,但在向团队提交框架之前,我想尝试2或3个其他选择。我不太喜欢Netty的一件事是它如何使用自己的ByteBuf实现和引用计数来处理ByteBuffers。任何人都可以分享你的想法和选择吗?

I am in the process of choosing a networking library to implement a client/server system that cannot spare any microsecond. It will implement its own protocol to send and receive messages. I am looking for a good NIO framework that will allow me to easily develop the server and the client, without having to worry too much about the low level selector details. Everyone recommends me Netty but I would like to experiment with 2 or 3 other alternatives before committing my team with a framework. One thing I did not like very much about Netty is how it handles ByteBuffers with its own ByteBuf implementation and reference counting. Can anyone share your thoughts and alternatives?

推荐答案

我们开发了一个 NIO网络库,在环回下执行不到2微秒,不会为GC产生任何垃圾。正如Peter Lawrey所提到的,原生JDK选择器会产生大量垃圾,但我们通过实现自己的epoll选择器修复了所有这些垃圾泄漏。繁忙的等待选择器线程非常适合延迟,但必须保持平衡,不要烧坏芯片或消耗大量能量。我们的选择器实现使用低级技巧来实现一种节能模式来处理这种平衡。

We have developed a NIO networking library that performs under 2 microseconds over loopback without producing any garbage for the GC. As Peter Lawrey mentioned, the native JDK selector produces a lot of garbage but we have fixed all these garbage leaks by implementing our own epoll selector. Busy waiting the selector thread is great for latency but there must be a balance not to burn the chip or consume a lot of energy. Our selector implementation use low-level tricks to implement a kind of energy saving mode that takes care of that balance.

除了CoralReactor ,您还可以查看 Grizzly Mina ,但我们尚未使用这些框架。

Besides CoralReactor, you can also take a look on Grizzly and Mina, but we haven't played with these frameworks yet.

对于某些Netty TCP性能基准测试,您可以查看这里

For some Netty TCP performance benchmarks you can take a look here.

这篇关于高性能网络的Netty替代品有哪些?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆