Asynchronous IO for Java

What is Asynchronous IO for Java?

Asynchronous IO for Java™ (AIO4J) is a package that provides the capability to perform input and output (IO) on sockets and files asynchronously -- that is, where the Java application can request the operation but can continue doing useful work while the underlying system performs the operation. The application is informed of the operation's completion later.

This package provides Java applications with capabilities that are now available from most operating systems at the "C" API layer, such as IO Completion Ports on Windows. AIO4J provides Java application programmers with access to these capabilities, but in a way that is very much in keeping with Java idioms and styles of programming.

AIO4J can be used as a replacement for classic synchronous IO and also as an alternative to the New IO package introduced in Java 1.4. AIO4J aims to give performance and scalability that is better than either of these other packages. In particular, AIO4J aims to help Java server applications address what has been called the "C10K problem": building server applications that serve 10,000 clients simultaneously with good responsiveness and performance. This is very difficult with Java synchronous IO because most systems cannot sustain 10,000 threads, and Java New IO does not perform well with such a load.

How does it work?

AIO4J provides a standard Java package of function, layered above a native library that interfaces with the underlying capabilities of the operating system.

The package provides facilities that support a range of programming styles, including Blocking, Polling and Callbacks as techniques for getting notifications of the completion of Read or Write operations.

For Callbacks, the application can control the number and the type of threads that are used.


Othre can reference to : http://mina.apache.org/asynchronous-file-io-in-java.html

 

Come form:http://www.alphaworks.ibm.com/tech/aio4j

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值