Home Cloud & Networking Learning Microsoft Azure

Learning Microsoft Azure

By Geoff Webber Cross , Geoff Webber-Cross
books-svg-icon Book
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Getting Started with Microsoft Azure
About this book
Publication date:
October 2014
Publisher
Packt
Pages
430
ISBN
9781782173373

 

Chapter 1. Getting Started with Microsoft Azure

This chapter introduces Microsoft Azure, the process of implementing it, and the features and services it can offer us. We will cover the following topics:

  • A brief overview of cloud computing and Microsoft Azure

  • Selecting a Microsoft Azure solution

  • Administration of a Microsoft Azure system

  • Choosing a subscription

  • A walk-through of creating a Microsoft Azure account

  • Exploring the Microsoft Azure Management portal

  • Examining all the Microsoft Azure service options

 

An overview of cloud computing


Cloud computing is a term for computing resources and services such as server and network infrastructure, web servers, and databases, hosted by cloud service vendors, rented by tenants, and delivered via the Internet.

Cloud computing companies such as Microsoft and Google offer a variety of computing services built on top of their own infrastructure, which are managed in dedicated globally distributed data centers that offer high availability, resilience, and scalability.

There are three types of cloud service models, Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). IaaS is the lowest service tier that offers server, storage, and networking infrastructure, which users can build their own systems on. PaaS allows users to create and deploy applications without having to worry about the infrastructure that's hosting it using services and tools designed to streamline the development and deployment processes. SaaS offers on-demand software products, which remove the infrastructure and software installation and setup overhead; web mail providers are an example of SaaS, where users can send and receive mails using a website rather than having to install a mail client on their machine.

Cloud services are often a cost-effective alternative to traditional on-premises infrastructure, which requires an initial investment in hardware and licenses and requires continual maintenance and expansion as required as well as utility costs such as premises' rent, electricity, and ISP.

There are four main cloud deployment models: public cloud, private cloud, hybrid cloud, and community cloud. Public cloud services are hosted by a vendor and made available to the public for use. Private cloud services emulate public cloud services in terms of features but are only available within a company's domain. Community cloud is a private cloud shared between a number of users. Hybrid cloud is a mixture of the other three.

 

Microsoft Azure overview


Microsoft Azure is the collective name for Microsoft's cloud computing services that provide IaaS and PaaS service models. In terms of deployment models, Azure services would be classed as public; however, it's possible to install Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/) in a private data center that offers a private cloud model.

Microsoft Azure IaaS comprises of a number of globally distributed data centers that host virtualized servers controlled by the Azure Fabric Controller. When we host systems on Azure, we become tenants and pay for our share of processing and network resources that we use through the subscription we choose. In this layer, we can make use of services such as virtual machines, disk storage, and network services.

Microsoft Azure PaaS services are the main entry point for most developers, where we are offered a set of tools and services that allow us to develop and deploy scalable and robust systems such as websites, worker roles, and mobile services.

Microsoft Azure (formerly known as Windows Azure) was first announced in 2008 and was available as Community Technical Preview (CTP); then, it became commercially available from 2010. Since then, the number of services and features has continually grown to where we are now.

At the time of this writing, Windows Azure has been renamed Microsoft Azure as part of a rebranding exercise to move the services away from being tightly associated with Windows server operating systems, databases, and platforms, as Azure can support operating systems such as Linux that run on virtual machines, Oracle databases, Node.js, and PHP websites, to name a few. You may see the term Windows Azure still being used in documentation and resources for quite a long time. It's the same product, just with a different name, so it's likely to be still valid.

 

Selecting a Microsoft Azure solution


Before we start looking at everything Microsoft Azure can offer us, we need to take a step back and think about the reasons for choosing it in the first place. The first question is actually whether you should be using a cloud platform rather than your own infrastructure (if you have any); the second question, once you've decided to use a cloud platform, is whether to use Microsoft Azure or an alternative.

The main factors in choosing to deploy systems on a cloud platform are as follows:

  • Infrastructure capabilities: If your business doesn't currently own infrastructure for hosting your solution, or it doesn't have sufficient capacity, or the business simply doesn't want to invest in its own infrastructure, then a cloud-based solution might be the best

  • Cost: If a cloud-based solution is more cost-effective than a self-hosted solution irrespective of whether your business owns its own infrastructure or not, it may be a good option

The main reasons for choosing to deploy systems on Microsoft Azure in particular are as follows:

  • Platform capabilities: If you've decided to build a cloud-based system using .NET, then Microsoft Azure is the obvious choice. If you are building a system on a different platform and Microsoft Azure can support it, it might be a good option.

  • Cost: If Microsoft Azure can offer the right capabilities and is more cost-effective than other suitable competing platforms, then it's the best choice.

Choosing to host systems on the cloud is not a straightforward decision. You may find that you have to go through the decision-making process on a project-by-project basis rather than having a policy where you always do the same thing for all systems.

Infrastructure capabilities

There is an overhead in managing infrastructure of any scale. The following are the activities that must be performed frequently:

  • Patch management

  • Operating system migrations

  • Platform migrations

  • Provision for expansion

  • Maintaining utilities (power, Internet, cooling, and so on)

The different scenarios for managing the infrastructure of a business are as follows:

  • If your business runs internal systems on just a single server, this may not be a full-time job for someone, but it still needs to be done and may be time-consuming periodically

  • If your business is on the other end of the spectrum and has two data centers that host hundreds of servers, you will need a team of people to manage them, which will obviously be very costly

  • If your business doesn't want to invest in its own infrastructure, irrespective of whether it needs enough servers to justify building a data centre, or just a single server with a website and database, it might be your best option to host your systems on a cloud platform

  • If your business' current infrastructure doesn't have the capacity for your system or it can't meet the required Service Level Agreement (SLA)

  • If your business has a heavy investment in its own infrastructure and can support future expansion on a variety of platforms, you may be less likely to want to use a cloud platform, but even then, there may be a service your infrastructure can't provide, or a platform it simply can't support, so it may be cheaper and faster to implement it in the cloud

Platform capabilities

If your business builds systems using Microsoft technologies, then Azure would be the logical choice, because although it now supports a number of platforms, Windows Servers, SQL Server Databases, and .NET platform tooling have been established long ago and have a fantastic toolset.

If, for example, your company does own its own infrastructure, but it's designed for running Java websites on Linux operating systems, and you have a requirement to build and host some .NET systems, you may want to choose to build your system on Microsoft Azure instead of provisioning more servers.

If Microsoft technologies are not your normal choice and you want to build a system on a cloud platform, you may choose Azure if it is more cost-effective than a competitor cloud service provider for a comparable design and SLA.

Cost

Cost can be one of the main drivers behind most decisions in a business; it has come up in both decision-making steps for choosing to use a cloud solution, then Microsoft Azure, so it's clearly important. I'd love to get straight down to talking about coding and deciding which bits of Microsoft Azure to use for what; we still have a responsibility to make the best decisions for our business and that includes designing a cost-effective system.

If you're working on a personal project, you may want to pick up a technology for reasons such as it being new or looking interesting; everyone does this and we might not mind if it costs us a few pounds (dollars or whatever), but in a business, we need to make the right choice ourselves or convince other people of the right choice, especially in the case of larger organizations, and that means choosing a solution that is cost effective.

We can use the pricing calculator to help us work out how much a system will cost once we have designed it; it is available at http://www.windowsazure.com/en-us/pricing/calculator/.

Decision flow diagrams

I've tried to distil all this into two flow diagrams to help you with the decision-making process. You can use the following flow diagram to decide whether to implement a cloud-based system:

Once we've decided that building a cloud-based system is the right thing to do, we can use the following flow diagram to help us decide whether Microsoft Azure is the best platform:

 

Administration of Microsoft Azure systems


We've talked a lot about whether to use a cloud platform or not, and if your business decides to, whether it will be Microsoft Azure or whether to use your business' infrastructure; so now, we'll look at the administration overhead in looking after a cloud-based system and incorporating it into your business' maintenance and support procedures.

If you have a small organization or you are working on personal projects, you may choose to manage your environments yourself (you may not have a choice) and you may deploy applications to the cloud straight from your development machine. This is fine, but it's worth thinking about managing this process to make things easy for you and save yourself from accidently causing loss of service.

If you work in a larger organization with some governance in place, which dictates how systems should transition from a development environment to a live system and then how they are managed and maintained after that, you may need to put some new procedures in place or modify the existing procedures for handling cloud-based systems.

Using a cloud platform, we don't completely get away from systems management and maintenance overhead. The following are examples of administrative tasks we still need to consider:

  • Training: The people responsible for managing cloud systems will need to know how to manage and maintain them. This includes things such as understanding the different environments, using the portal, and how to perform deployments.

  • Error logs: Error logs need to be monitored so that problems can be detected and fixed. Error logs will need pruning to avoid paying for unnecessary storage.

  • Alerts: Alerts must be set up and configured for the appropriate set of support staff.

  • Database maintenance: Databases need to be reindexed and statistics must be recalculated from time to time so that performance doesn't degrade over time.

  • Data backup: Microsoft Azure does not automatically back up data, so this needs to be set up.

  • OS updates: It's actually possible to disable automatic updates on Azure OSes (this is not the default option), so if your IT policy is to have staged updates, you may wish to disable automatic updates and include Microsoft Azure systems in your update process.

  • Billing: Somebody needs to remember to pay the bill for the services the businesses are using. This is especially important if you pay your subscription by invoice and not credit card.

  • Password management: Usernames and passwords for Microsoft Azure portals and databases must be securely recorded and made available to the administrative staff.

  • Release management: Typically, in medium-to-large organizations, it's not normal for developers to deploy systems for staging or for live environments themselves, so this must be coordinated between developers and system administrators.

  • Renew SSL certificates and domain names: If we use custom domain names on our websites or implement SSL security, we will need to renew these periodically.

It's important to think about these things when deciding to implement a cloud-based system, because although there is certainly a huge reduction in administration overhead, particularly on the infrastructure side of things, they aren't completely administration-free.

 

Choosing a subscription


The subscription you choose will depend on the type of project you are doing and its scale. If you are doing some experimentation or prototyping a system, which may never go into production, you may just want to use a free trial, which is time- and usage-limited, or go for a Pay-as-you-go option, where you pay for what you use rather than committing to a fixed payment. If you're a university student, your university may apply for a 5-month Educator Grant at http://www.microsoftazurepass.com/azureu.

To get started, you may need to do some design work to get some idea of the services you may require, what service tier you want, and how many instances of each service you may use, then go to the pricing calculator and start working out how much your monthly expenditure might be. There is a complete chapter dedicated to designing a system, and this whole book will help you choose which services you require, but we need a subscription to get started, so we'll talk about it now.

Once we have an idea about what our monthly expenditure might be, we can take a look at the purchase options page at http://www.windowsazure.com/en-us/pricing/purchase-options/.

The following table taken from the purchase options page shows us the discounts based on the base Pay-as-you-go rate and monthly commitment to spend in USD (there is a picker on the left-hand side of the page to change the currency):

Monthly

Committed Spend

6-Month

Monthly Pay

12-Month

Monthly Pay

6-Month

Pre-Pay

12-Month

Pre-Pay

$500 TO £14,999

20%

22.5%

22.5%

25%

$15,000 TO £39,999

23%

25.5%

25.5%

28%

$40,000 AND ABOVE

27%

29.5%

29.5%

30%

As with most commodities, the more you commit to spend, the better discount you get, and you save even more committing to pay for the whole term in one go.

You can pay by invoice as well as by credit card; the page at http://www.windowsazure.com/en-us/pricing/invoicing/ has details about requesting invoiced payments.

 

Creating a Microsoft Azure account


Before we go into all the different things Microsoft Azure has to offer us, we'll create an account so that we can use the portal to help us explore the services.

Note

There is a new portal (https://portal.azure.com/), which was introduced earlier in 2014 during the Build conference. Unfortunately, at the time of writing this book, it was not complete enough for the majority of the services we're covering, so this book uses the old portal (https://manage.windowsazure.com/), which will continue to be available for some time to come.

If you already have a Microsoft Azure account, continue to the next section; otherwise, click on the Portal tab (https://manage.windowsazure.com/). It will take you to log in using your Microsoft account if you are not already logged in. Once you have logged in, you will see a big page saying you have no subscription:

Click on the SIGN UP FOR WINDOWS AZURE link (https://account.windowsazure.com/SignUp), and you should end up at the Sign up page (there are a number of routes to get to this page through the website, but this seemed to be the least clicks for me!). Your personal details should appear from your account info, and you'll need to verify it's you with an SMS or call verification:

Once your account is verified, you can enter your credit card details. Don't panic if you want a free trial or pay as you go; you don't get automatically signed up for any premium subscriptions; however, $1 will be charged to you for credit card verification. Accept the agreement and click on the Purchase button; your card details will be validated, and you will be taken to the subscriptions page, where you'll be pleased to find that you already have a free trial! This is shown in the following screenshot:

 

Adding a subscription


You can add subscriptions to meet your own requirements by clicking on the add subscription button:

I chose the Pay-As-You-Go option for writing this book as I will not be leaving the system I'm building in production. Once you have selected your option, you get a purchase confirmation on your screen, as shown in the following screenshot:

Once the payment information is confirmed, we're taken back to the subscriptions page, where we can see our new subscription being listed:

If you have chosen to use a trial subscription, there is a spending limit feature so that you don't incur any costs; once you reach the offer limits, services will be disabled and data will be available as read-only.

 

Exploring the portal


Now that we have a subscription, we can go and start exploring the portal at https://manage.windowsazure.com/. When you go into the portal for the first time, you'll be presented with a nice tour wizard, which is a really good way of learning about the portal's features; step through the wizard, and then we'll look at these features and more without the wizard.

The top toolbar

The top toolbar allows us to access some of the top-level options for the portal; there are six buttons:

The various options available in the top toolbar are as follows:

  • Home button (1): Wherever you are in the portal, clicking on the home button will take you back to the main ALL ITEMS dashboard.

  • Top menu (2): This drop-down menu contains links, which take you out of the portal to Microsoft Azure's web resources; you'll notice that the same menu appears on all Microsoft Azure websites:

    The menu available inside the top menu is as follows:

    • HOME: This links to the main Microsoft Azure site.

    • PRICING: This links to the price calculator for all Microsoft Azure services.

    • DOCUMENTATION: This links to the Microsoft Azure documentation home page; from here, you can find a large amount of reference material, code samples, and tutorials.

    • DOWNLOADS: This links to the downloads page, where you can find links to SDKs for all platforms and command-line tools.

    • COMMUNITY: This links to the community page from where we can find links to recent Microsoft Azure team blogs, links to other Azure blogs, and useful information to help us be up-to-date with what's going on with Microsoft Azure services. This is helpful because the platform is continually growing and changing, so it's good to be able to see what's going on.

    • SUPPORT: This links to the support page, which lists various support options for technical and billing issues, and contains links to MSDN forums.

  • Credit status flyout (3): If you have a subscription with a credit allowance, this displays the remaining credit for the month and number of days until the end of the month:

  • Subscriptions menu (4): This menu allows you to adjust which subscriptions and their associated services are displayed in the portal; if you have a lot of subscriptions, you can even search for them! At the bottom of the page, there are also some useful links for managing your account:

  • Language menu (5): The language menu allows you to change the portal's display language to a number of supported languages:

  • Main menu (6): Clicking on your username at the top-right corner of the screen opens the main menu, which allows you to sign out, change password, view your bill, contact support, and access some other legal bits:

The side toolbar

The toolbar at the left-hand side allows you to view all items and navigate to service workspaces such as WEB SITES, VIRTUAL MACHINES, and MOBILE SERVICES:

The bottom toolbar

The bottom toolbar allows you to create new services, control the current service selected in a workspace, and view notifications:

The various options available in the bottom toolbar are as follows:

  • Create new (1): Clicking on the + NEW button on the bottom toolbar opens the Create New menu from where you can create new services:

  • Commands (2): The command bar provides contextual commands for controlling the currently selected service; in the preceding example screenshot, the controls are used for running a website, allowing you to browse, stop, restart, and delete it, and also allowing you to install WebMatrix, which is a lightweight web development tool.

  • Notifications (3): The notifications bar will appear at the bottom of the portal to alert you of any issues you may need to address; they have three levels:

    • Error

    • Warning

    • Information

    Clicking on an alert symbol opens the alert banner showing more information:

  • Completed operations (4): A number of activities in the portal can take a while to complete and run asynchronously; once they complete, the completed operations' count indicator gets incremented, and clicking on this button shows you the completed operations' banners:

    Individual operations can be dismissed by clicking on OK, or all of them can be dismissed by clicking on DISMISS COMPLETED at the top of the page.

  • Help (5): Clicking on the help button displays a contextual help menu that provides help information about the current service:

 

Examining Microsoft Azure Services


We'll start taking a look at all the Microsoft Azure services available to us; while we do this, it's helpful to refer to the portal, and use the +NEW button to see the different options for each category. Don't be afraid to create a service to take a closer look; you can always delete it afterwards.

Compute services

Compute services are a collection of services used for building different types of scalable, resilient applications on Microsoft Azure. We'll take a look at these now and see what they can offer us.

Websites

Microsoft Azure websites are a secure, scalable platform for publishing websites on a number of platforms (ASP.NET, PHP, Node.js, Python, and Classic ASP) with SQL Server and MySQL databases; there is also a large gallery of website templates for building websites on app frameworks such as Django, blog sites such as WordPress, and forums such as phpBB; to see the full list, click on the New Service button, and then navigate to COMPUTE | WEB SITE | FROM GALLERY.

Websites support SSL certificates for secure HTTPS sessions and custom domain names with A and CNAME records (for supporting a single domain name for a number of load-balanced web servers). Website instances can be manually or automatically (on schedule or on CPU metrics) scaled up and down to meet business demands. Websites can run in three modes, FREE, SHARED, or STANDARD, where FREE and SHARED run on a multitenant environment (a shared web server), but the SHARED mode has a higher resource quota than FREE. STANDARD runs on a dedicated virtual machine (small, medium, large size options similar to virtual machines).

Virtual machines

Virtual machines offer you a scalable server infrastructure to build your systems from scratch. They are available as Windows Server or Linux operating systems, and there are a number of images available with server software such as SharePoint, SQL Server, and Oracle preinstalled. To take a look at the complete list, click on the New Service button, and then navigate to COMPUTE | VIRTUAL MACHINE | FROM GALLERY.

There are currently eight image sizes ranging from extra small (shared core, 768 MB RAM) to A7 (eight cores, 56 GB RAM) and default (one core, 1.75 GB RAM); obviously, the bigger the image, the higher the cost. You can see the prices in the pricing calculator at http://www.windowsazure.com/en-us/pricing/calculator/?scenario=virtual-machines. Virtual machines are charged at compute hours and have a monthly value in the calculator; Windows Server and Linux images cost the same, but the price increases with additional server software due to the extra licensing cost.

Mobile services

Mobile services are designed for mobile app developers so that they have a simple platform to quickly create secure (OAuth2 and key-based authentication over SSL) database and custom APIs and easily make push notification requests on all major mobile platforms (Windows Store, Windows Phone, iOS, and Android). Backend services can be created on Node.js or .NET; Node.js, which is the original platform, can be scripted in the portal directly or locally, and can be pushed using Git version control, whereas .NET backends, which are a relatively new addition, are created locally and published in a similar way to other web applications.

There's a complete set of SDKs for integrating mobile applications and other backend services for a growing number of platforms including Windows Store, Windows Phone, iOS, Android, Xamarin, HTML, and Sencha.

I recently wrote an entire book on this subject, which is available from Packt Publishing at http://www.packtpub.com/learning-windows-azure-mobile-services-for-windows-8-and-windows-phone-8/book.

Cloud services

Cloud services allow you to create scalable applications that have a high availability (99.95 percent monthly SLA). There are two main types of cloud services: web role and worker role. Web roles are web applications hosted on IIS in their own environment. They are different from normal websites as they have extra capabilities listed in the following bullet list (although websites can now be staged too), to start with web roles can start life as a website, then easily be added to a web role at a later stage if they require these additional capabilities. Worker roles are a bit like Windows Services, where they are applications with no user interface, which can perform long-running tasks from things such as processing data of a table to hosting a proprietary TCP server. Cloud service roles have the following characteristics:

  • They run on their own virtual machine

  • They can be scaled as required

  • They can be deployed to multideployment environments (staging and live)

  • They allow remote desktop onto their virtual machines

  • They execute start-up tasks

Data services

Data services are a collection of data-storage-related services including fully relational SQL Server Database, table storage, various Binary Large Objects (blobs) and disk-storage options, and storage queues. We'll take a look at each one in more detail now.

SQL Server Database

Microsoft Azure SQL Database is a fully managed, highly scalable relational database with a high availability (99.95 percent SLA). Microsoft Azure SQL Server is very similar to a SQL Server in terms of Transact-SQL (TSQL) and Tabular Data Stream (TDS) but has a number of features it does not support, such as:

  • Backup and restore (this will be supported when the new service tiers are made available)

  • Replication

  • Extended stored procedures

  • SQL Server agent/jobs

A full list of differences can be found here, although it doesn't currently mention SQL Server 2012 or 2014: http://msdn.microsoft.com/en-us/library/ff394115.aspx.

Databases are available in three tiers of service:

  • Web: This is a scalable managed database up to 10 MB

  • Business editions: These are scalable managed databases up to 150 GB

  • Premium edition: This is the same as premium editions but with reserved resource capacity for applications that may have a high peak loading, many concurrent requests, or require guaranteed low request latency

Databases benefit from having two data center replicas (for any tier of service) and the option to scale out as required (splitting large databases across multiple servers to improve performance).

Storages

Microsoft Azure storage offers resilient, scalable storage for unstructured text and binary data such as logfiles, images, and videos. There are four types of storages:

  • Block blobs: This is the simplest way of storing large volumes of nonstructured data. Blobs can be accessed through managed SDKs and from anywhere via REST APIs. Block blobs are made up of a maximum of 50,000 blocks, having a size of up to 4 MB each, with a maximum total size of 200 GB.

  • Page blobs and disks: Page blobs are optimized for frequent updates and random access and are actually used as the storage media for Microsoft Azure VHD disks. Page blobs are collections of 512 byte pages; pages worth 1 to 4 MB can be written in one go and a maximum of 1 TB is available for a single blob.

  • Tables: Tables are a NoSQL (a nonrelational database) way of storing data, rather than storing data in a relational way, like in a traditional SQL Server Database, where we have tables, which have relationships with other tables via primary and foreign keys; Microsoft Azure tables allow you to create a container table, and then define classes that belong to it. These classes have a partition key, row key, and timestamp property, which allow them to be queried. Microsoft Azure tables allow us to store large amounts of data in a highly scalable way while still allowing efficient querying.

  • Queues: Queues are a messaging system that allows processes to exchange data between tiers of a system via a message queue. They are helpful for building scalable worker processes. Queues can be accessed via native SDKs and REST services.

HDInsight

HDInsight is a relatively new addition to the Microsoft Azure service family; it is a service based on Apache Hadoop (http://hadoop.apache.org/), which helps us integrate multiple data sources of different types and structures into Microsoft Business Intelligence (BI) tools such as Power Pivot and Power View.

Cache

Microsoft Azure Cache is a high-performance, in-memory distributed cache that allows scaled-out applications to share data without having to use a database. This can be useful for adding session state and page caching to ASP.NET applications (although session state is not generally a good practice for modern web applications, it may be useful for legacy applications or if you really can't live without it!) and also doing your own custom caching in worker roles for maintaining the state across instances. Cache is available in three tiers:

  • Basic: This is a shared cache with a size ranging from 128 MB to 1 GB

  • Standard: This is a dedicated cache with a size ranging from 1 GB to 10 GB

  • Premium: This is a dedicated cache with a size ranging from 5 GB to 150 GB

Recovery services

The recovery services allow you to create Hyper-V recovery manager vaults, which allow you to back up your Hyper-V system to the Microsoft Azure cloud and backup vaults, which can be used for backing up files and folders from servers.

App services

App services are a collection of services that help cloud and on-premises applications and services to interact with each other. They can be implemented on systems ranging from media-streaming services to multi-tier enterprise business systems. We'll look at each of these now.

Media services

Media services provide a scalable media processing workflow for digital media systems such as video-streaming services, from ingest through encoding, format conversion, and content protection, to on-demand and live streaming.

Service Bus

Service Bus is a collection of services used for enabling communication between different processes in distributed, multi-tier systems. The various Service Buses are as follows:

  • Queue: Service Bus queues as with .NET queues are first in, first out (FIFO) collections of messages that allow applications to communicate with each other asynchronously by publishing and consuming messages. This can be very helpful for building scalable systems across multiple tiers especially when part of the system may not always be online. It can also help with load leveling, where a consuming application can process batches of data in a controlled way rather than being driven by the producing application. Messages are processed by a single consumer and can be read in the ReceiveAndDelete mode, where the message will immediately be marked as consumed and returned to the provider and the PeekLock mode, where a consumer can get a temporary lock while it processes the request; then, if it cannot process the message, it can abandon it, or if it fails completely, the message will time out, allowing another process to consume it.

  • Topic: In contrast to queues, where we have a one-to-one relationship between a provider and a consumer, topics have a one-to-many relationship, where we create a topic with a number of subscriptions. Then, a provider can send messages to the topic, and subscribing clients can receive messages from subscriptions they are interested in.

  • Relay: Relays are different from topics and queues in that they don't offer disconnected services; instead, they can securely expose on-premises service endpoints, allowing them to be accessed directly by applications in the cloud.

  • Notification Hub: The Notification Hub service is a really nice way of handling push notifications to mobile apps from backend services in an efficient, scalable manner. Mobile apps on all major platforms can register to receive push notifications (in the case of Windows Store and Windows Phone applications, these are Toast, Tile, Badge, and Raw notifications), and from the backend service, just one request per platform is required to make the request rather than making requests per subscribed channel. The Notifications Hub also has a tagging feature, where users can subscribe to certain tagged topics and also template notifications, which can be used for localization support. The Notifications Hub handles all communications with the native Push Notification Services (PNS).

Visual Studio Online

Visual Studio Online services allow Visual Studio Online accounts to be integrated into Microsoft Azure, enabling us to view, build, and load the testing status in the dashboard and enable continuous deployment so that websites can be deployed to a test environment on build when code is checked in.

BizTalk Services

BizTalk Services allow on-premises applications to interact with each other via the cloud, providing messaging endpoints and transforming messages between services for interoperability.

Scheduler

The scheduler allows scheduled jobs to be created to perform operations such as making HTTP requests and performing actions on storage queues. Jobs can be scheduled to run once on demand, at a specific time, or at various intervals.

Active Directory (AD)

The following are the features of Azure AD:

  • Azure AD allows you to manage user credentials and application access in your Microsoft Azure system. It is an Azure-specific, REST-based implementation of Active Directory, which is used with on-premises systems.

  • Access Control Service (ACS) provide an easy way of authorizing and authenticating users with support for the following authentication mechanisms:

    • Windows Identity Foundation (WIF)

    • Built-in support for Microsoft Account, Google, Yahoo, Facebook, and Twitter

    • Active Directory Federated Services (ADFS)

    • OAuth 2.0

    • JSON Web Token (JWT), SAML 1.1, SAML 2.0, and Simple Web Token (SWT)

    ACS also offers Home Realm Discovery, allowing users to choose an identity provider, an OData-based management service, and a browser-based management portal.

  • Multifactor authentication is an extra layer of security for applications. If you have a Windows Store account, you must have noticed that a PIN is sent to a configured mobile phone or e-mail address, which you must enter before signing in with your Microsoft account. This can be added to on-premises applications using ADFS, and to systems integrated with Windows Azure AD.

Network services

Network services are a collection of services related to networking between services, and allow us to create virtual networks and load balance traffic across services in different Azure locations.

Virtual Network

Virtual Network allows you to create a private IPv4 network space in Azure, securely extend your on-premises networks into Azure, and configure a custom DNS server for services on Virtual Network.

Traffic Manager

Traffic Manager allows user traffic to be distributed to the most appropriate cloud service or website within the same data center or across global data centers depending on the load-balancing method chosen. Traffic management requires one of the following three load-balancing methods:

  • Performance: This allows users to be redirected to the closest geographic endpoints

  • Round-Robin: This evenly distributes traffic between services

  • Failover: If a service fails or goes offline, requests will be rerouted to another service

 

Summary


We've covered a lot of preliminary subject matter regarding the decision process that will help us choose to build a system using Microsoft Azure, and also explored all the services available to us.

Next, we're going to look at how to go about architecting a system for Microsoft Azure and introduce a case study on which the examples in this book are based. We'll use the knowledge we've gained about the different Microsoft Azure services available to us to help design the system in the case study and choose the right service for each part of the system.

Throughout this book, we'll examine services in detail as we build the system in the case study.

 

Questions


  1. What are the three types of cloud service models?

  2. What does PaaS stand for?

  3. What is Azure Pack?

  4. In which two ways can we pay for Azure subscriptions?

  5. What are the three notification types that can appear on the portal toolbar?

  6. Name the three website modes.

  7. Which two operating systems are available on virtual machines?

  8. Name four platforms supported by Azure Mobile Services.

  9. What are the two types of cloud services?

  10. How many deployment environments does a cloud service have?

  11. What is a Notifications Hub?

  12. What are the three Traffic Manager load balancing methods?

 

Answers


  1. IaaS, PaaS, and SaaS.

  2. Platform as a Service.

  3. It allows Azure to be installed in a private data center offering a private cloud deployment model.

  4. Credit card or invoice.

  5. Error, Warning, and Info.

  6. Free, Shared, and Standard.

  7. Windows Server or Linux.

  8. Any of these: Windows Store, Windows Phone, iOS, Android, HTML, Xamarin, and Sencha.

  9. Web role and worker role.

  10. Two—staging and production.

  11. It is a Service Bus service, which provides a scalable way of handling push notifications from backend services.

  12. Failover, Round Robin, and Performance.

About the Authors
  • Geoff Webber Cross

    Geoff Webber-Cross has over 10 years' experience in the software industry, working in manufacturing, electronics, and other engineering disciplines. He has experience of building enterprise and smaller .NET systems on Azure and other platforms. He also has commercial and personal experience of developing Windows 8 and Windows Phone applications. He has authored Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8, Packt Publishing.

    Browse publications by this author
  • Geoff Webber-Cross

    Geoff Webber-Cross has over 16 years' software development experience, working in a variety of sectors on Windows, web, and mobile applications. He has worked on XAML/MVVM applications since the days of Silverlight and Windows Phone 7 and has been building Xamarin apps commercially for a number of years. Geoff is also the author of two books for Packt: Learning Microsoft Azure and Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8.

    Browse publications by this author
Latest Reviews (2 reviews total)
I work for a U.S. Government branch. We are at the end of planning a huge cloud deployment of which I will have to install SQL Servers in the cloud. The information was exactly what I needed in order to get familiar with the Azure platform.
Learning Microsoft Azure
Unlock this book and the full library FREE for 7 days
Start now