首页 > TAG信息列表 > ActiveJ

ActiveJ框架学习——Async I/O之HTTP(二)

2021SC@SDUSC 上一篇文章介绍了HTTP的主要内容,那么接下来我们就来看源代码部分。 首先,先看AsyncServlet接口。 基本上,它只是一个异步函数,将 HttpRequest 映射到 HttpResponse开箱即用的预定义 AsyncServlet 集合(StaticServlet、BlockingServlet、RoutingServlet 等)广泛支持 Asyn

ActiveJ框架学习——Async I/O之Eventloop(四)

2021SC@SDUSC Eventloop是异步编程的内部类。在异步编程模型中,必须避免Eventloop线程中的阻塞操作(如I/O或长时间运行的计算)。应使用此类操作的异步版本。Eventloop表示只有一个阻塞操作的无限循环selector.select(),它选择一组键,这些键对应的通道已准备好进行I/O操作。使用从外部添

ActiveJ框架学习——Async I/O之Datastream(二)

2021SC@SDUSC 该篇继上文继续来看Datastream的代码,在这之前,让我们回顾一下什么是Datastream。 Datastream is an extremely fast implementation of reactive streams. It is useful for intra and inter-server communication and asynchronous data processing.  Datastream

ActiveJ框架学习——Async I/O之promise

2021SC@SDUSC 概述 我们先来看一下官网对promise的介绍: Promises are primary building blocks in the ActiveJ async programming model which can be compared to Java Futures. promise represents the result of an operation that hasn't been completed yet.