Building Scalable Web Apps with Windows Azure.pptx


文档分类:论文 | 页数:约25页 举报非法文档有奖
1/25
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/25
文档列表 文档介绍
Building Scalable Web Apps with Windows Azure
Name
Title
Microsoft Corporation
Agenda
Who will benefit from this talk
Web app developers
who are already familiar with Windows Azure
with scaling needs
Topics
Asynchronous patterns & techniques
Managing data access
Tuning application performance
What you’ll leave with
Windows Azure helps you build scalable web apps
using the approaches that you’re already familiar with
Synchronous Design Pattern
Each thread dedicated to one outstanding request
Block on each step of “the work” done for each request, then respond & repeat
This approach scales poorly
Each outstanding request is stored on a thread stack
Threads block even when there is work to be done
Adding a thread enables only one additional concurrent request
Client Request #1
Web App Front End
SQL Azure
WA Storage
Middle Tier
Client Response #1
Client Request #2
“The Work”#1
Response #1
Time passes…
Thread
Thread
Waiting…
blocks
Asynchronous Design Pattern
Each thread picks up work whenever it is ready
A thread handling one request may handle another before the first pletes
Client Request #1
Web App Front End
SQL Azure
WA Storage
Middle Tier
Client Response #1
Client Request #2
“The Work”#1
Response #1
Thread
Thread
Client Response #2
“The Work”#2
Response #2
Context
This approach scales well
Client requests tracked explicitly in app’s data structures
Threads never block while there is work to be done
Each thread can handle possibly many concurrent requests
But bookkeeping & synchronization can be difficult…
Async/await support simplifies bookkeeping
void UploadImage(Stream image, CloudBlob destBlob)
{
// Add image to list in SQL Azure
AddImageToSQLAzure();
// Upload image to blob storage
UploadImageToBlob(image, destBlob);
}
async Task UploadImageAsync(Stream image, CloudBlob destBlob)
{
// Add image to list in SQL Azure
var t1 = AddImageToSQLAzureAsync();
// Upload image to blob storage
var t2 = Up

Building Scalable Web Apps with Windows Azure 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数25
  • 收藏数0 收藏
  • 顶次数0
  • 上传人86979448
  • 文件大小2.36 MB
  • 时间2018-03-26