left-icon

Windows Azure Websites Succinctly®
by Kyle Burns

Previous
Chapter

of
A
A
A

CHAPTER 2

Windows Azure

Windows Azure


What is Windows Azure?

Windows Azure is a collection of products and services hosted in Microsoft’s data centers to enable developers and organizations to quickly assemble the right combination of pieces for their application’s needs. The tools represented in the Windows Azure suite almost exclusively focus on either hybrid, IaaS, or PaaS—with the only potential exception being the Visual Studio Online product. A key characteristic of all of the Windows Azure products is the idea that customers only pay for what they use, whether that is central processing unit (CPU) time on a virtual machine (VM) or disk space for persistent storage. This presents an extremely low barrier to entry for customers who initially have very low computing requirements, as well as a powerful tool to keep budget under control for customers with periods of heavy volume separated by periods where the volume is much lower.

Windows Azure Services

Microsoft separates the Windows Azure products into four major categories based on the type of service that they provide. In this section, we will briefly discuss the services in each category, going into more detail for those services more likely to be encountered when building Windows Azure Web Sites. If you are already familiar with the various services offered in Azure or just prefer to discover them as you go along, you can safely skip reading this section.

Compute

Compute services are products that focus on utilization of the CPU capability in the Microsoft data center hardware. These are all priced based on a combination of CPU cores and available random access memory (RAM) and share the same capability for health monitoring and auto-scaling to meet customer demand in a flexible way that still controls cost.

Virtual Machines

Virtual Machines (VMs) are the only product in the Compute category that is considered an IaaS offering. With VMs, you can run dedicated virtual servers in Microsoft’s data center, starting from a number of predefined templates or even upload your own virtual hard disk (VHD) containing a configuration that you have created. These machines can run by themselves or participate in an ecosystem where they interact collaboratively with PaaS solutions.

Websites

The Windows Azure Web Sites product is focused on providing a targeted set of services to allow for the creation and maintenance of websites using many of the features required to make a website useful. This includes support for various server-side technologies including ASP.NET, classic ASP, PHP, Node.js, and Python, and includes either a Windows Azure SQL Database or MySQL to provide a backing store for your applications. As with the VMs product, application owners can either bring their own custom application or choose from a growing collection of site templates based on popular frameworks in the Application Gallery.

Mobile Services

Mobile Services are a set of services aimed at providing the most commonly required server-side functionality to power mobile applications. These services allow developers the opportunity to quickly add features such as:

  • Cloud storage to ensure that your app users can share with each other and that users’ application states can follow them from device to device.
  • Authentication integrated with many popular identity providers such as Google, Microsoft, Facebook, Twitter or an Active Directory hosted within Azure.
  • Push notifications to allow your server-side code to reach out via broadcast to millions of devices when important events occur within your application.

It’s important to the reader of this book to note that, even though these services are marketed as services geared to mobile devices, many of them can be extremely useful in developing highly interactive Web 2.0 applications.

Cloud Services

Cloud Services are run time containers for executable code that are often used to create the back end service layer for applications that may be running on desktops, mobile devices or even other servers, and provide an alternative to managing a VM to applications built in a way that allows them to be deployed directly into Azure services. These services have commonly been used to create application components known either as Worker Roles or Web Roles. Worker Roles are application components that run as an independent process executing a task with no user interface (UI), while Web Roles share mostly the same run time characteristics as a Worker Role but add being publicly addressable on the Internet in order to serve either as a UI or public service API. Cloud Services are an integral part of many enterprise applications but will not be required for many small to medium-sized websites because Azure provides capabilities to meet their needs within the Azure Web Sites product.

Data Services

One of the driving forces behind the success of Azure is that Microsoft has accounted for the fact that there is no one answer to “What is the best tool for ___?” Instead, many choices are available for accomplishing most tasks to allow architects to review the need in full context and identify the best (or sometimes just the least bad) way to solve the challenges that are presented when developing modern applications in the cloud. This is extremely apparent when looking at the choices made available when selecting how the application will store and retrieve data. Architects can examine such questions as:

  • How quickly does the data need to be retrieved?
  • For how long does it need to be stored?
  • How much data will there be?
  • How consistent will the structure of the data be?
  • How searchable does the data need to be?

For those questions and more, a variety of storage tools is available to provide a tailored solution for the needs of your application—either through bringing a single tool to bear or potentially building a solution that combines the strength of multiple tools.

Azure Storage

Azure Storage is actually a subset of the Azure data services that encompasses a few different types of storage mechanisms itself, each aimed at solving a different storage problem:

  • Blob storage is used to store unstructured data and can be considered analogous to the file system on your desktop PC. Because not all files have the same needs when it comes to being optimized for the cloud, blob storage is further divided into two types:
  • Block blobs are used to store files that can be accessed sequentially and are not subject to frequent updates. Some common examples of where Block blobs are leveraged include video files and images.
  • Page blobs are used to store files that need random access or are updated frequently.
  • Azure Table Storage provides a highly scalable NoSQL database option. Data stored in Azure Tables can be accessed via software development kits (SDKs) for many popular languages or via a REST API where the use of an SDK is not required.
  • Azure Queues are used to store data which is intended to be consumed by another component within the solution and does not need to be persisted after it is consumed by the receiving component. Queuing’s importance to a cloud application will be discussed in greater detail later in this book.

Azure SQL Database

Azure SQL Database can be reasonably thought of as Microsoft SQL Server’s extension to the cloud. With some features that could not scale well to a cloud solution removed, most on-premises applications built with Microsoft SQL Server will transfer to Azure SQL Database without any modification.

HDInsight

HDInsight is a service based on the Apache Hadoop platform. HDInsight is used to store and access large quantities of structured and unstructured data (commonly known as Big Data). A common use case for this tool is for data to be warehoused for analysis with business intelligence tools such as PowerPivot.

Azure Cache

Azure Cache is used as a transient store to keep data that may be expensive to retrieve and is used frequently within the application close to where it is needed without having to again incur the cost of subsequent retrievals when it is needed again. Azure’s solution can either keep the cache within the application’s worker role or utilize it as a shared cache available to other components of your solution.

Azure Backup

Azure Backup is an infrastructure tool used to provide off-site backup of your on-premises server data, providing additional features such as versioning and automated execution of data retention policies.

Azure Site Recovery

Azure Site Recovery (formerly Azure Hyper-V Recovery Manager) is an infrastructure tool used to provide off-site replication of private clouds running in on-premises data centers to a separate location and to coordinate recovery from the secondary location in case of outage at the primary.

App Services

App Services are a suite of tools that can be leveraged by application developers to add features to their solution without spending a tremendous amount of time and effort solving common problems that others have already solved. These services allow for developers to write the code that only they can write and focus on things that directly contribute to the problem that they are trying to solve with their application. A given website might need any number of these services. As with Data Services, many of the App Services have some degree of overlap with other App Services, requiring architects to thoroughly consider the strengths and weaknesses of the tools along with cost when determining the right tool for a given job.

Azure Media Services

Handling of media content is a problem area that many application developers could specialize in and make the focus of their entire career because it’s a complex and dynamic problem area. In addition to the complexity of dealing with the various encoding methods and ensuring that the content is delivered in a manner compatible with the consuming agent, most applications of media content also require protection of the content from unauthorized use, monetization of authorized use, and a way to measure how the content is used. Azure Media Services provides tools and APIs to handle all of these tasks either as a stand-alone service or integrated with your solution. Examples of applications using Azure Media Services may include a broadcaster streaming a live sporting event to Internet subscribers or a content provider renting Digital Rights Management (DRM)-protected content to a customer that is viewable for a limited amount of time.

Azure Service Bus

Azure Service Bus is primarily known as a more robust queuing mechanism than Azure Storage Queues. The Service Bus is used to provide messaging between applications whether they are within the same Azure solution, part of another Azure solution, or a hybrid solution with on-premises components interacting with cloud components. Azure Service Bus allows for a loose coupling between these components that allow for massive scalability and also for flexibility if the implementation of one of the components within the system ever needs to be entirely reworked. Azure Service Bus will be discussed in a dedicated queuing chapter.

Notification Hubs

Notification Hubs provide a publish/subscribe framework for components within a solution to broadcast messages to all clients or target those messages only to specific clients. Publish/subscribe is an important pattern for scalable applications and could easily be the topic of its own book. Therefore, developers looking to move their skills to the cloud who are not familiar with this pattern should take the time to learn about it.

Azure Scheduler

Azure Scheduler is a simple tool that enables jobs to be set up for execution and run outside the execution path of your application. Scheduled jobs can either invoke an HTTP web service or can post a message to a storage queue. Typical use cases include performing data management tasks (such as preaggregating data or clearing temp storage) and batch communications with external services.

Azure BizTalk Services

As Azure SQL Database is the cloud evolution of the Microsoft SQL Server tool, Azure BizTalk Services brings the Microsoft BizTalk Server integration platform to Azure. This tool is primarily used to handle complex integration either between enterprise application platforms such as SAP and PeopleSoft or between businesses such as in electronic data interchange (EDI) transaction processing.

Visual Studio Online

Visual Studio Online is a bit of an outlier when it comes to the tools categorized by Microsoft as App Services because, rather than providing run time services to add functionality to the application, it is used for the actual creation of the application. Visual Studio Online provides tools to host source code repositories either in a centralized or distributed manner (via Git or Team Foundation Version Control), plan and track projects, manage the testing cycle, and evaluate the initial and ongoing performance of the application.

Azure Active Directory

Azure Active Directory provides authentication and authorization services, and can either stand alone or be integrated with an on-premises Active Directory through either synchronization or federation.

Multi-factor Authentication

Multi-factor authentication is used to address the problem often caused by compromised passwords by providing steps beyond just supplying a password for the user to prove their identity. These steps typically involve a system-generated temporary passcode which is sent to a device or telephone known to belong to the user whose credentials are being used through a mobile app, text message or phone call.

Network Services

Azure Network Services are aimed at providing support for IT professionals to achieve network configurations to enable and optimize applications running within their Azure account or in combination with on-premises solutions. These services are not directly applicable to building Azure Web Sites but are listed here and very briefly described to provide a complete picture of the tools available in the ecosystem to solution developers.

Azure ExpressRoute

Azure ExpressRoute is an advanced tool made available through network service providers that provides a direct connection to the Azure data centers rather than connecting through the public Internet. This is used when reliability, speed or security requirements justify the cost of maintaining the direct connection.

Azure Virtual Network

Azure Virtual Network allows resources hosted in the Azure data center to exist in the same logical network as on-premises resources. This is useful when building hybrid applications where components of the application must be on the same network.

Azure Traffic Manager

Azure Traffic Manager is a load-balancing solution used to control the distribution of requests that reach Azure services. This can be used to add fault tolerance and/or increase the performance of applications. For example, Azure Traffic Manager could use a balancing strategy known as round robin to cycle through a set of destinations in order to keep an even load across servers (assuming each request would produce the same amount of load as another) when used to increase performance. Azure Traffic Manager could use health monitoring to detect that an instance of your service has gone down and redirect traffic to another instance to achieve fault tolerance.

Getting Started on Azure

Before you can start developing websites on Azure, some steps need to be taken, both in setting up a development environment and in getting an Azure account. In this section, we’ll cover the basics necessary to get a developer up and running on the Azure platform.

Prepare Yourself for Cloud Development

This might seem like an obvious step but the first thing as a developer that you should do when preparing to venture into developing solutions on Azure is to familiarize yourself with the tools, techniques, and patterns applicable to making a successful application in the cloud. Reading this book is one step. Another very valuable resource is the Patterns & Practices section of Microsoft’s MSDN website (http://msdn.microsoft.com) which includes a collection of cloud development topics designed specifically to discuss problem and solution patterns particularly applicable to a cloud environment. Additionally, Microsoft and others sponsor many free, in-person and virtual training opportunities such as code camps and Microsoft Virtual Academy (http://www.microsoftvirtualacademy.com). Also, many popular online paid training opportunities exist.

Note: The URLs referenced in this section are current as of the time of this writing but may not remain consistent over time. If any URL is not accessible to the reader, I recommend searching for the current location using the search engine of your choice. Additionally, actions to be taken during an on-page workflow (such as sign up wizards) will be described as generically as possible because Microsoft may change steps at any point in time.

Setting Up Your Machine for Azure Development

The steps for setting up your local development environment can vary greatly depending on the tools that you will be using to create applications and the individual Azure services that will be leveraged in your solution. In this section, we’ll cover the most basic setup for building websites using Visual Studio 2013.

Install Visual Studio 2013

If you don’t already have it, the first step in getting your .NET-based development environment set up is to obtain and install Visual Studio 2013. Visual Studio is available in many editions, ranging from the free Visual Studio Express 2013 product to Visual Studio Ultimate 2013 which comes at a premium cost. Many sources exist comparing the features available in the different editions of the tool, so this book will not go into those details. Visual Studio 2013 can be downloaded at http://www.visualstudio.com/downloads. You will be given the option of downloading either the free Express edition or a trial version of one of the paid editions. All of the descriptions and screen shots from this book were created using Visual Studio 2013 Premium, but Visual Studio Express 2013 for Web should be sufficient for creating and working with Azure Web Sites.

Install the Azure SDK

With Visual Studio installed, you’re ready to install the Azure tools for .NET and Visual Studio. More than one option exists for how to obtain and install the SDK but, for the purposes of this book, we’ll discuss the direct download option. Azure SDK and tool downloads are available at http://azure.microsoft.com/en-us/downloads. For Visual Studio 2013, you will want to select the “VS 2013 Install” link and then run the downloaded executable and follow the prompts.

Install Command Line Tools

In addition to the SDK and Visual Studio tools, you will most likely find value in installing the Azure command-line tools which are also available at http://azure.microsoft.com/en-us/downloads. Under the “Command-line tools” heading, you will find a Windows PowerShell download and Azure command-line interface installer as well as documentation for each. The Azure command-line interface tool can be downloaded for either Windows, Mac or Linux.

Signing Up for Azure

To establish an account on Azure, you need to first have a Microsoft account. If you don’t already have a Microsoft account, you’ll need to create one. Assuming that you already have a Microsoft account, go to http://windows.azure.com. If you are not already logged into your Microsoft account, log in as prompted. Once logged in, select the option to sign up for Azure (at the time of this writing, this was a call to action on the page labeled “Sign up now”). This will present several options from which to select including a free trial, a pay-as-you-go option, and some prepaid options intended for businesses that anticipate higher utilizations and want to benefit from receiving volume discounts for prepaid services. For the readers of this book, I would recommend going with the free trial option when available. Once the desired option is selected, follow the prompts to provide required information and complete the registration process.

Note: Pay close attention to the details of the information that you are providing and to ensure that you understand the costs associated with services that you utilize. If you provide payment details such as a credit card number and do not select spending limits, you could find yourself surprised by a bill received for services that you activated to explore and didn’t subsequently decommission.

After completing the registration process, you can access the Windows Azure Management portal to manage your accounts, subscriptions, and services at http://manage.windowsazure.com.

Summary

In this chapter, you learned about many of the services offered on the Azure platform and focused more on those services which may be particularly valuable in the creation of Azure Web Sites. You also learned how to prepare yourself and your development environment to successfully build applications to run on the Azure platform. This knowledge, along with the account that you now have set up (if you didn’t actually set up an account, you will need to do so in order to fully benefit from this book), will be used and built upon in the following chapters as you create and program websites on the Azure platform.

Scroll To Top
Disclaimer
DISCLAIMER: Web reader is currently in beta. Please report any issues through our support system. PDF and Kindle format files are also available for download.

Previous

Next



You are one step away from downloading ebooks from the Succinctly® series premier collection!
A confirmation has been sent to your email address. Please check and confirm your email subscription to complete the download.