开发者

How will Websockets and Async Http methods and handlers help in asp.net webpages

开发者 https://www.devze.com 2023-04-12 15:34 出处:网络
From the developer preview What’s New for ASP.NET 4.5 and Web Development it seems we get to use Websockets and Async Http methods,Handlers

From the developer preview What’s New for ASP.NET 4.5 and Web Development it seems we get to use Websockets and Async Http methods,Handlers

  • What significance do these provide for a web developer from 开发者_如何学Goa programming perspective?
  • What are their real benefits?


Async is the best way to do long-running IO-bound operations: calling external network resources, long-running database queries, and so on. You should understand the pros and cons of asynchronous operations before using it. The main reason to use async operations in ASP.NET is to release the working thread while performing IO, to allow this thread to be used to process subsequent requests.

Websockets are used to send frequent server-to-client notifications and updates. Classic examples of such applications are web chat and stock ticker. There are some alternatives to websockets: Ajax long-polling and Comet, Flash/Java applets, Silverlight client with WCF duplex service.

0

精彩评论

暂无评论...
验证码 换一张
取 消