使用码头或Netty的? [英] Use Jetty or Netty?

查看:119
本文介绍了使用码头或Netty的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在编写处理消息高性能服务器的过程。我们一直在使用码头数年,这样,但是Netty的看起来有一些很酷的功能。尤其是,它具有用于异步处理支持这样一个线程没有被捆绑起来等待系统处理一个给定的消息。它被设计用来解决C10K问题。

We're in the process of writing a high-performance server for processing messages. We've been using Jetty for several years and like it, but Netty looks like it has some cool features. In particular, it has support for asynchronous processing so a thread doesn't have to be tied up waiting for the system to process a given message. It's designed to solve the C10k problem.

我知道码头有NIO一些支持内部。它也有一个异步模型?

I know that Jetty has some support for NIO internally. Does it also have an asynchronous model?

的消息可能是为http格式。是否Netty的有超过码头任何性能优势做普通的旧式HTTP时候?

The messages are likely to be in http format. Does Netty have any performance advantages over Jetty when doing plain old http?

我想有一个真正的servlet容器的所有方便的特点,但不能以降低性能为代价。

I'd like to have all the convenient features of a real servlet container, but not at the cost of reduced performance.

推荐答案

由于版本6(见的此处),使用专有的API。最近的版本支持异步API作为的Servlet 3.0 API的一部分,像任何其他兼容的实现。

Jetty has had support for asynchronous request processing since version 6 (see here), using a proprietary API. More recent versions support the asynchronous API as part of the Servlet 3.0 API, like any other compliant implementation.

使用Netty的似乎是一个大量的工作,而收效甚微,除非你有非常具体的要求。否则,将码头做的工作对您以最小的努力。

Using Netty would seem like a lot of work for little gain, unless you have highly specific requirements. Otherwise, Jetty would do the job for you with minimal effort.

这篇关于使用码头或Netty的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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