私は最近JBossNettyを使い始めましたが、これまでのところ、サーバーがリクエストを受信するたびに、channelPipelineFactoryを使用してChannelPipelineを作成していると理解しています。ChannelPipelineには、リクエストを処理する一連のChannelHandlerが含まれています。今私が持っている質問は、パイプラインのハンドラーの1つがデータベースからデータをフェッチする必要がある場合、これはI / Oのブロックです。要求の処理はブロックされますか?これは、サーブレットなどによる通常のリクエスト処理とどのように異なりますか?NodeJSからのイベント駆動型非同期I/Oについての私の理解は、1つのイベントループがあり、I / O操作をブロックするために登録された一連のコールバック関数があり、これらはI/Oが完了するたびに呼び出されるということです。Nettyの同等物は何ですか?
private static final HttpResponseEncoder httpResponseEncoder = new HttpResponseEncoder();
private static final JsonEncoder jsonEncoder = new JsonEncoder();
private static final ExecutionHandler executionHandler = new ExecutionHandler(
        new OrderedMemoryAwareThreadPoolExecutor(5, 1048576, 1048576));
public static void main(String[] args) throws Exception {
    ChannelFactory factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(),
            Executors.newCachedThreadPool());
    SocketAddress sockAddress = new InetSocketAddress(8080);
    RedisClient client = new RedisClient("127.0.0.1");
    final RedisAsyncConnection<String, String> connection = client.connectAsync();
    ServerBootstrap bootstrap = new ServerBootstrap(factory);
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
        @Override
        public ChannelPipeline getPipeline() throws Exception {
            ChannelPipeline pipeline = Channels.pipeline();
            pipeline.addLast("executionHandler", executionHandler);
            pipeline.addLast("weightedRandomGenerator", new WeightedRandomNumberGenerator(
                    connection));
            pipeline.addLast("encoder", httpResponseEncoder);
            pipeline.addLast("JsonConverter", jsonEncoder);
            return pipeline;
        }
    });
    bootstrap.setOption("child.tcpNoDelay", true);
    bootstrap.setOption("child.keepAlive", true);
    bootstrap.bind(sockAddress);
}