码迷,mamicode.com
首页 > 其他好文 > 详细

Architecture of a Highly Scalable NIO-Based Server

时间:2014-09-12 01:08:13      阅读:288      评论:0      收藏:0      [点我收藏+]

标签:des   http   io   os   java   ar   for   sp   cti   

Architecture of a Highly Scalable NIO-Based Server

 

 

Selectors

A selector (java.nio.channels.Selector and subclasses) provides a mechanism for waiting on channels and recognizing when one or more become available for data transfer. When a number of channels are registered with the selector, it enables blocking of the program flow until at least one channel is ready for use, or until an interruption condition occurs.

Although this multiplexing behavior could be implemented with threads, the selector can provide a significantly more efficient implementation using lower-level operating system constructs. A POSIX-compliant operating system, for example, would have direct representations of these concepts, select(). A notable application of this design would be the common paradigm in server software which involves simultaneously waiting for responses on a number of sessions.

Architecture of a Highly Scalable NIO-Based Server

标签:des   http   io   os   java   ar   for   sp   cti   

原文地址:http://www.cnblogs.com/yuyutianxia/p/3967502.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!