CenturionStudio.it - Fotolia

Does Microsoft Azure make sense for developers?

Microsoft is betting heavily on cloud services for its future. We take a close look at its strategy as a platform for Office 365, Linux and microservices

Hooks into Azure and Office 365 are appearing in all Microsoft products, from Windows to Office to server applications such as SQL Server.

In the mobile realm, the company is pulling back from its Windows Phone efforts in favour of a platform-neutral approach that encourages developers to use Azure for back-end services supporting mobile applications.

Office 365 has grown rapidly as businesses lose the appetite for maintaining these applications on-premises while supporting a mobile workforce.

The migration towards the cloud – not necessarily Microsoft’s cloud, but also its competition such as Amazon Web Services (AWS) and Google’s Apps and Cloud Platform – has huge implications for developers.

What are the new opportunities that Azure offers, how does it compare to other cloud platforms and what are the risks of getting it wrong?

The developer perspective

Azure’s immediate appeal is strongest for businesses on Microsoft’s platform (Office 365, on-premises, or both), and for developers familiar with the company’s tools and frameworks, specifically Visual Studio, SQL Server and the .NET Framework.

Visual Studio now integrates well with Azure. You can sign into an Azure account, view resources through the Cloud Explorer, use templates to build Azure applications, as well as deploy them through the IDE.

What is Azure? At the time of writing, Azure is comprised of 20 regions around the world, with more under construction, including one in the UK. Each region is typically composed of several datacentres.

The services on offer break down into the following categories:

  • Virtual Machines (VMs): from the smallest (A0) with .75GB RAM, 1 core and 20GB disk, to the largest (G5) with 448GB RAM and 32 cores.
  • Application platform: host web applications and mobile back-ends on Azure with options to scale or auto-scale on demand. Container service for Docker-style services or micro-services
  • Data and storage: hosted SQL Database, general purpose storage, cache services, DocumentDB NoSQL database, SQL Data Warehouse.
  • Cognitive services: Application programming interfaces (APIs) such as speech recognition, text analytics, face analysis.
  • Analytics: Services for storing and analysing bulk data including Hadoop, and Machine Learning APIs.
  • Internet of Things (IoT): a platform for connecting sensor-equipped devices, collecting their data and storing or analysing the results.
  • Networking: virtual networking with traffic manager, load balancer, virtual private network (VPN) gateway.
  • Media services: encoding and content delivery network.
  • Hybrid cloud integration: backup and site recovery services, BizTalk for integrating applications, Service Bus for enterprise messaging.
  • Developer services: Visual Studio Team Services including build automation and load testing, application analytics, HockeyApp for gathering and analysing crash reports.
  • Identity services: Azure Active Directory (also used by Office 365), multi-factor authentication.
  • Management: scheduling and automation, Key Vault for secure certificate storage.

The above list is not comprehensive and new services are added frequently. Some are in preview, and some are available only in certain regions. Nevertheless, it is a huge list and one that gives developers options that just a few years ago would be hard or unrealistic to achieve, when limited to an organisation’s own physical resources.

It is worth noting that big though Azure is, Microsoft has struggled to catch up with AWS which has also been energetically developed.

If you are in the fortunate position of embarking on a new project for which the resources are either self-contained or already cloud-hosted, developing on Azure should be smooth.

The ASP.NET web framework is available by default. It is also easy to include Azure AD authentication, so if your organisation is on Office 365, or has set up Active Directory synchronization to Azure AD, then you can easily have users log in with their existing workplace credentials.

Read more about Azure

A key feature here is the Microsoft Graph (previously called the Office 365 Unified API). This is an API endpoint and SDK for accessing both Azure AD and other Office 365 services.

You need to become familiar with the Azure AD Authentication Library (ADAL), which lets you authenticate a user and then use the returned OAuth access token to access other information, such as groups the user belongs to.

One of the advantages of Azure for developers is the ease of deploying prototype and work in progress applications for discussion and testing.

This is cost-effective, since the Azure App Service lets you scale from a free site on a shared VM to up to 20 instances on 4-core VMs with 7GB RAM. You can use one of the basic sites for testing and scale up for production.

The snag is that most enterprise applications need to connect to existing resources, some of which are on premises. This makes cloud deployment more challenging, and also impacts the ability to “lift and shift” existing applications to Azure.

There are numerous options, including VPN connectivity to Azure, or publishing APIs for on-premises resources, or migrating such resources to the cloud.

Azure’s infrastructure as a service (IaaS) offerings mean that you can to some extent replicate existing infrastructure on Azure VMs.

However, the risk is that you lose much of the benefit of cloud deployment by failing to re-design specifically for the new platform. It is possible, for example, to end up with VMs that are spending most of their time idle, just like the old days of physical servers.

Cloud economics make most sense if you use services that are multi-tenanted and maintained by the cloud provider.

For example, if you need SQL Server for an application, you can either use Azure SQL, which is multi-tenanted and maintained by Microsoft, or install SQL Server in your own VM, leaving you with the problem of maintaining, scaling and patching that VM.

Azure SQL is more cost-effective, though SQL Server in a VM has the full range of features and includes Reporting Services, not available for Azure SQL. These decisions can be difficult; but using Azure services rather than VMs where possible delivers big advantages long-term.

Microservices, Azure and Linux

Another key aspect of cloud development is Microservices, breaking down applications into small services each of which runs in its own environment. Small services tend to be more robust, you can scale each service separately, and easily automate deployment and testing using DevOps tools.

Azure has a container service, which lets you easily create a cluster of VMs pre-configured for containerized applications, using either DC/OS or Docker Swarm.

Note that these are Linux environments. The forthcoming Windows Server 2016 has container support and it is likely that Azure will add Windows containers in future, but Linux is ahead currently.

Azure is built on Hyper-V, the Windows hypervisor, but is a strong environment for Linux VMs.

The increasing use of Linux, both on Azure and elsewhere, is one reason why Microsoft is investing in a new cross-platform fork of .NET, called .NET Core. This open source project lets you run ASP.NET applications on Windows, Linux or Mac (for development).

The idea is that developers can use their existing .NET skills to build services or web applications and have a choice of Windows or Linux for deployment.

It is also worth mentioning Nano Server, a new edition of Windows which will launch with Windows Server 2016. This is a cut-down edition, ideal for lightweight deployments and microservices. Nano Server supports .NET Core, but not the old .NET Framework.

Microsoft has also announced SQL Server for Linux, though details are currently sketchy.

Taken together, this means a two-pronged approach to supporting containers and microservices on Azure, one based on porting .NET applications to Linux, and the other based on bringing the advantages of lightweight VMs or containers to Windows.

Azure versus its competition

Microsoft is number two in public cloud IaaS, but a long way behind AWS. That said, Microsoft’s cloud is not only Azure, but also Office 365. Azure does have the global reach and scale to offer a reasonable alternative.

AWS also offers email and document hosting, but is a long way behind both Microsoft and Google in this respect. You can mix and match, for example hosting applications on AWS that use Azure AD, but there is sense in using Azure for organisations already hooked into Microsoft’s platform.

Microsoft also has a commitment to hybrid cloud which is lacking in AWS or Google, both of which are internet-native companies. This is a weakness as well as a strength, but welcome in many organisations.

Developers familiar with Microsoft technologies, .NET and the Visual Studio IDE, will find developing for Azure an easy transition.

A March 2016 Gartner report on Enterprise Application Platform as a Service identifies that “Microsoft distinctively combines its proven reputation as an enterprise IT provider with its growing acceptance as a competent cloud service provider. This coveted dual strength puts Microsoft ahead of most competitors.”

However, Gartner cautions that the detail of Azure’s offerings is messy and confusing in some areas.

“All of App Service remains based on the old cloud services, not the new Azure Service Fabric (which points to further re-engineering in the future),” it says, also noting that some services remain in preview for extended periods.

The variety of options within Azure, and their “degrees of cloudiness”, can be confusing, says Gartner’s report.

Nevertheless, Gartner places Microsoft in the “Leaders” category in its Magic Quadrant for the above report, and the scope and capability of Azure suggests that it will continue to grow.

Read more on Microsoft Windows software