وبلاگ بلیان

برنامه‌های وب بر روی آژور: توسعه برای مقیاس جهانی

Web Applications on Azure : Developing for Global Scale

جلد کتاب برنامه‌های وب بر روی آژور: توسعه برای مقیاس جهانی

معرفی کتاب «برنامه‌های وب بر روی آژور: توسعه برای مقیاس جهانی» (با عنوان لاتین Web Applications on Azure : Developing for Global Scale) نوشتهٔ Reagan, Rob، منتشرشده توسط نشر Apress در سال 2017. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Build .NET apps on Microsoft Azure services that can grow to Internet scale. Learn how you can make smart application architecture decisions and follow best practices so that your website can handle tens of thousands of concurrent users and deliver your content globally. Author Rob Reagan takes you through key Azure technologies targeted toward building web applications, and along the way shares his lessons learned in scaling out a real-world web application. After an overview of web application building blocks, the book dives into relational and NoSQL data storage options on Azure, including Azure Table Storage and CosmosDB. You’ll then discover how to make best use of Redis Cache, Web Jobs, Messaging Queues, and more, alongside other tips, tricks, and troubleshooting advice for when things go wrong. The book concludes with a thorough exploration of best practices for deployment at scale. **What You'll Learn** - Develop scalable architecture patterns on Azure with ASP.NET MVC - Understand the pros and cons of using SQL Azure vs. NoSQL solutions (Azure Tables, CosmosDB) - Perform data migration, backup, and recovery in SQL Azure - Use effective caching - Troubleshoot your web applications - Know best practices for deployment **Who This Book Is For**Professional developers or serious hobbyists with experience developing web applications with ASP.NET MVC or Web API Table of Contents......Page 5 About the Author......Page 15 About the Technical Reviewer......Page 16 Acknowledgments......Page 17 Introduction......Page 18 Cloud-Based Compute-on-Demand Services......Page 21 Infrastructure-as-a-Service vs. Platform-as-a-Service......Page 22 Visual Studio 2015 Community Edition......Page 23 SQL Server 2016 Express Edition......Page 24 Step 1: Choose the Installation Type......Page 25 Step 2: Installation Rule Check......Page 26 Step 4: Feature Selection......Page 27 Step 5: Instance Configuration......Page 28 Step 6: Server Configuration......Page 30 Step 7: Database Engine Configuration......Page 31 Redis Desktop Manager......Page 32 Free Trial......Page 33 Upgrading a Free Trial......Page 35 Purchasing a New Subscription Without a Free Trial......Page 36 Purchasing an EA......Page 37 Summary......Page 38 Chapter 2: Web Applications......Page 39 Introducing the Verify App......Page 40 Creating the Database and Person Tables......Page 41 Creating the Web Application......Page 42 Adding a SQL Server Database Project......Page 43 Adding Entity Framework Core to Verify.Web......Page 44 Generating the Entity Framework DbContext and Models Classes......Page 45 Creating the Service Layer......Page 46 Setting Up Dependency Injection......Page 49 Adding the Front-End Controllers......Page 51 Provisioning an Azure SQL Instance......Page 53 Deploying the Verify Database......Page 57 Creating Our App Services Web App......Page 59 Specify a Publish Profile......Page 61 Preview......Page 63 Intelligent Use of Threads......Page 64 App Service Plans......Page 65 Scaling Up......Page 66 Scaling Out......Page 67 Autoscale......Page 70 Load Testing......Page 71 Creating a Load Test......Page 72 Viewing Load Test Results......Page 75 Setting Appropriate Autoscale Rules......Page 78 Summary......Page 79 Data Storage Scenarios......Page 80 Persisted Data......Page 81 Relational Databases......Page 82 Azure SQL......Page 84 Scaling Azure SQL......Page 85 Sharding......Page 86 NoSQL Data Stores......Page 87 Redis Cache......Page 88 Azure Table Storage......Page 90 When to Use Azure Table Storage......Page 91 Cosmos DB......Page 92 Pricing......Page 94 Summary......Page 95 Chapter 4: Azure SQL Databases......Page 96 Introducing Azure SQL Database......Page 97 Licensing......Page 99 Exceeding a DTU Limit......Page 100 Creating the TaskZilla Project......Page 101 The TaskZilla Data Model......Page 103 Creating the ASP.NET Identity Tables......Page 104 Creating Our Tasks and Priorities Tables......Page 106 Handling Transient Faults......Page 108 Setting Up Entity Framework......Page 109 Creating the View Models......Page 113 Creating the TaskService Class......Page 116 Controllers and Views......Page 121 Running the Application......Page 126 Deployment to Azure......Page 127 Creating an Azure SQL Database Instance......Page 128 Setting Firewall Rules......Page 130 Connecting to the New Instance......Page 132 Deploying to Azure......Page 133 Publishing Schema Changes......Page 141 Backup and Restore......Page 143 Setting Up Alerts......Page 146 Scale Up......Page 149 Performance Recommendations......Page 150 Automating Performance Tuning......Page 151 Geo-replication......Page 152 Summary......Page 156 How Table Storage Works......Page 157 Types of Queries......Page 159 REST API......Page 160 Local Storage Emulator......Page 161 Table Design Guidelines......Page 162 Restaurant Finder Requirements......Page 163 Designing Our Data Storage......Page 164 Setting Up the Project......Page 165 Creating Our Restaurant Data Class......Page 166 The Data Service Class......Page 169 Project Settings......Page 174 Dependency Injection......Page 175 Loading Demo Data with the RestaurantData Controller......Page 176 Azure Storage Explorer......Page 179 Point Queries......Page 180 Row Range Scan Queries......Page 183 Partition Range Scan Queries......Page 186 Full Table Scan Queries......Page 190 ETags......Page 192 Merge......Page 193 Updating a Restaurant......Page 194 Deleting a Restaurant......Page 196 Provisioning an Azure Storage Service......Page 197 Using Your Azure Storage Service......Page 202 Summary......Page 203 Chapter 6: Cosmos DB......Page 204 Introducing Cosmos DB......Page 205 Congo, the (Hopefully) Up-and-Coming Online Retail Giant......Page 206 Congo Tech Stack......Page 207 The Cosmos DB Resource Model......Page 208 Data Modeling......Page 210 Determining Document Schemas......Page 211 Determining Partition Keys......Page 214 A Single Collection or Multiple Collections......Page 217 Creating a Collection in the Emulator......Page 218 Congo’s Initial Data......Page 222 Querying a Collection......Page 229 Creating the Congo Example Application......Page 230 Creating the Project and Solution......Page 231 Creating the Model Classes......Page 232 Creating View Model Classes......Page 236 Creating the Home Page......Page 239 The Product Details Page......Page 251 Editing a Product......Page 254 Retrieving All Reviews......Page 257 Creating a New Review......Page 260 Deleting a Review......Page 263 Creating a Cosmos DB Account, Database, and Collection......Page 266 Scaling......Page 271 Summary......Page 272 Chapter 7: Redis Cache......Page 273 The Cache Aside Pattern......Page 275 Example Project: TechStore......Page 276 Creating the Project......Page 277 Creating the Database......Page 278 Adding Entity Framework......Page 284 Adding View Models......Page 287 Creating the Service Layer......Page 290 Creating the Controller and Views......Page 294 Running the TechStore Application......Page 298 Create an Azure Redis Cache Resource......Page 300 Implementing the Cache Aside Pattern with Redis Cache......Page 301 Dealing with a Full Cache......Page 310 Viewing Redis Cache Contents......Page 311 Connect to a Redis Cache......Page 312 Viewing Cache Contents......Page 313 Scaling Azure Redis Cache......Page 314 Using Multiple Caches......Page 315 Summary......Page 316 Chapter 8: WebJobs......Page 317 Invoking WebJob Methods......Page 318 Creating Our Solution and WebJob Project......Page 320 Running Our WebJob Locally......Page 323 Creating Our WebJobDemo Web Application......Page 324 Creating Our Model......Page 326 Creating Our Services for WebJobDemo.Web......Page 329 Creating Our MVC Web Controller and View......Page 331 Running Our Web Application......Page 336 Running Our WebJob Locally: Part II......Page 338 Chrontab or Timespan Expressions......Page 341 Creating Complex Schedules by Subclassing TimerSchedule......Page 344 Handling Exceptions with the ErrorTriggerAttribute......Page 347 Throttling the ErrorTriggerAttribute......Page 350 Hosting Requirements......Page 351 FTP......Page 352 Publishing via Visual Studio......Page 354 Monitoring a WebJob in the Cloud......Page 355 Summary......Page 357 Chapter 9: Message Queues......Page 358 Benefits of Using Message Queues......Page 360 Service Bus Queues......Page 361 Azure Storage Queues......Page 363 Provisioning a Service Bus Resource......Page 364 Creating the Sender Console Application......Page 368 Creating Our Common Models Project......Page 369 Getting a Service Bus Connection String......Page 370 Adding Code to Send Queue Messages......Page 371 Viewing Service Bus Message Queue Messages with Service Bus Explorer......Page 375 Building Our Service Bus Queue Message Receiver......Page 377 Testing Our Service Bus Queue Message Receiver......Page 382 Message Lock Timeout......Page 384 Abandoning a Message Lock......Page 386 Dead Lettering a Message......Page 388 Scaling Out......Page 389 Using Message Queues to Build Azure Web Applications......Page 390 Summary......Page 395 The Turtles Web Application......Page 396 Creating the Solution and Project......Page 397 Adding Turtle Code......Page 399 Initial Page Request......Page 403 Measuring Page Performance......Page 404 Combining and Minifying JavaScript and CSS Files......Page 406 Creating Bundles......Page 407 GZip Compression......Page 410 Using Async/Await......Page 411 Using HTTP Cache......Page 412 Using Appropriately Sized and Optimized Images......Page 413 Moving External JavaScript Files to the Bottom of the Page......Page 414 Using a Content Distribution Network......Page 415 How Azure CDN Works......Page 416 Creating a CDN for the Turtles Web Application......Page 417 Integrating Bundles......Page 422 Integrating Image Files......Page 428 Summary......Page 429 Kudu......Page 430 Application Insights......Page 432 Web Server Logs......Page 433 Using the Kudu Debug Console......Page 434 Application Logs......Page 435 Setting Up Tracing......Page 436 Kudu Process Explorer......Page 437 Diagnostics-as-a-Service......Page 438 Running DaaS......Page 439 Log Stream......Page 440 Failed Request Tracing Logs......Page 441 Auto Heal......Page 444 Setting Up Auto Heal......Page 445 Application Insights......Page 446 Installing Application Insights......Page 447 Debugging Exceptions......Page 449 Alerts......Page 453 Summary......Page 456 Chapter 12: Deployment......Page 457 Follow a Proper Code Promotion Strategy......Page 458 ARM Templates Overview......Page 459 Parameters......Page 462 Resources......Page 463 Creating ARM Templates......Page 465 Downloading ARM Templates for Preexisting Resources in the Azure Portal......Page 466 Creating Templates with a Visual Studio Azure Resource Group Project......Page 470 Creating the Database......Page 472 Accessing the Database......Page 473 The Deployment Web Application......Page 475 The Deployment WebJob......Page 479 Creating the Azure Resource Group Project......Page 482 Adding a SQL Server......Page 484 Deploying from Visual Studio......Page 488 Improving Our ARM Template......Page 491 Adding Other Resources......Page 494 The Completed Template......Page 495 Creating a Production Environment......Page 504 Defining Build Configurations......Page 505 Adding a Staging Transform for Web.config......Page 507 Transforming the Deployment.WebJob’s App.config......Page 508 Setting Up VSTS......Page 509 Defining a Build in VSTS......Page 511 Build Task: Pulling Source from the Repository......Page 512 Build Tasks: Restoring NuGet Packages......Page 514 Build Tasks: Deploy ARM Template......Page 515 Build Tasks: Copy Files Between Directories......Page 517 Build Tasks: Azure SQL Database Deployment......Page 518 Build Tasks: Deploy Web App to Azure......Page 519 Summary......Page 520 Index......Page 521 Build .NET apps on Microsoft Azure services that can grow to Internet scale. Learn how you can make smart application architecture decisions and follow best practices so that your website can handle tens of thousands of concurrent users and deliver your content globally. Author Rob Reagan takes you through key Azure technologies targeted toward building web applications, and along the way shares his lessons learned in scaling out a real-world web application. After an overview of web application building blocks, the book dives into relational and NoSQL data storage options on Azure, including Azure Table Storage and CosmosDB. You'll then discover how to make best use of Redis Cache, Web Jobs, Messaging Queues, and more, alongside other tips, tricks, and troubleshooting advice for when things go wrong. The book concludes with a thorough exploration of best practices for deployment at scale. What You'll Learn Develop scalable architecture patterns on Azure with ASP.NET MVC Understand the pros and cons of using SQL Azure vs. NoSQL solutions (Azure Tables, CosmosDB) Perform data migration, backup, and recovery in SQL Azure Use effective caching Troubleshoot your web applications Know best practices for deployment Who This Book Is For Professional developers or serious hobbyists with experience developing web applications with ASP.NET MVC or Web API Build .NET apps on Microsoft Azure services that can grow to Internet scale. Learn how you can make smart application architecture decisions and follow best practices so that your website can handle tens of thousands of concurrent users and deliver your content globally. Author Rob Reagan takes you through key Azure technologies targeted toward building web applications, and along the way shares his lessons learned in scaling out real-world web applications. After an overview of web application building blocks, the book dives into relational and NoSQL data storage options on Azure, including Azure Table Storage and Cosmos DB. You'll then discover how to make best use of Redis Cache, WebJobs, Messaging Queues, and more, alongside other tips, tricks, and troubleshooting advice for when things go wrong. The book concludes with a thorough exploration of best practices for deployment at scale. What You'll Learn: Develop scalable web applications on Azure with ASP.NET MVC Understand the pros and cons of using SQL Azure vs. NoSQL solutions (Azure Tables, Cosmos DB) Perform data migration, backup, and recovery in SQL Azure Use effective caching Troubleshoot your web applications Know best practices for deployment
دانلود کتاب برنامه‌های وب بر روی آژور: توسعه برای مقیاس جهانی