...
首页> 外文期刊>MSDN Magazine >WICKED CODE: Asynchronous Pages In ASP.NET 2.0
【24h】

WICKED CODE: Asynchronous Pages In ASP.NET 2.0

机译:邪恶的代码:ASP.NET 2.0中的异步页面

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

ASP.NET 2.0 is replete with new features ranging from declarative data binding and Master Pages to membership and role management services. But my vote for the coolest new feature goes to asynchronous pages, and here's why. When ASP.NET receives a request for a page, it grabs a thread from a thread pool and assigns that request to the thread. A normal, or synchronous, page holds onto the thread for the duration of the request, preventing the thread from being used to process other requests. If a synchronous request becomes I/O bound—for example, if it calls out to a remote Web service or queries a remote database and waits for the call to come back—then the thread assigned to the request is stuck doing nothing until the call returns. That impedes scalability because the thread pool has a finite number of threads available. If all request-processing threads are blocked waiting for I/O operations to complete, additional requests get queued up waiting for threads to be free. At best, throughput decreases because requests wait longer to be processed. At worst, the queue fills up and ASP.NET fails subsequent requests with 503 "Server Unavailable" errors.
机译:ASP.NET 2.0充满了新功能,从声明性数据绑定和母版页到成员资格和角色管理服务。但是,我对最酷的新功能的投票投向了异步页面,这就是原因。当ASP.NET收到对页面的请求时,它将从线程池中获取线程并将该请求分配给该线程。正常或同步页面在请求期间将线程保持在该线程上,从而阻止该线程用于处理其他请求。如果同步请求受I / O约束(例如,如果它调用远程Web服务或查询远程数据库并等待调用返回),则分配给该请求的线程将停止执行任何操作,直到调用返回。因为线程池具有有限数量的可用线程,所以这阻碍了可伸缩性。如果所有请求处理线程都被阻塞,等待I / O操作完成,则其他请求将排队等待线程空闲。最好情况下,吞吐量下降,因为请求等待更长的时间来处理。最坏的情况是,队列已满,并且ASP.NET使后续请求失败,并显示503“服务器不可用”错误。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号