Demystifying Azure PaaS
Blog|by James Roberts|11 June 2018
What is PaaS?
Platform as a Service (PaaS) occupies the middle ground in the Cloud stack between Infrastructure as a Service (IaaS) and Software as a Service (SaaS). It’s the part of the stack that provides the developer tools and platform services required for Cloud enabled applications. ‘Developer tools’ is what it says on the tin and doesn’t really require further explanation so in this blog, I’m going to take a closer look at what we mean by ‘platform services’. We are also running a series of ‘how to’ blogs by our regular Code Matters contributor Jamie Maguire who is demonstrating how to use Cognitive Services APIs and Azure to modernise applications.
As you move up the stack, the Cloud vendor is increasingly more responsible for the day to day operational aspects of the service being provided. Platform services sit somewhere in the middle of the spectrum, a space in which development and operational deployment overlap. This is especially true in the complex distributed environment of the Cloud.
PaaS provides a variety of things to aid development and deployment. It’s a step above developing in a pure IaaS environment which just provides network, compute and storage resources. PaaS provides the APIs for operational tasks like provisioning containers and handling data in much the same way that mid-tier application servers handle message queuing, object-relational mapping and orchestration in a Service Orientated Architecture (SOA) environment. But there’s more to PaaS than just services to help manage the operational aspects of Cloud applications. PaaS also provides some of the digital services needed to create new generation applications based on microservices. As a result, PaaS, Agile and DevOps are all part of the same story.
Services to modernise your applications
Agile has redefined our approach to application development resulting in applications that are broken down into smaller chunks of business logic. These smaller blocks of code are easier to create and maintain. They may also be reused if they provide services that can be consumed by other applications. Most modernisation projects today adopt this microservices model to a greater or lesser degree.
Solutions for some of the common shared services that most applications need have been put in place by vendors such as Microsoft and Oracle to accelerate project delivery and eliminate the need to re-invent the wheel. This too, is part of the platform services story and perhaps the most important part as far as the developer in concerned. Most mobile applications require access control, security and synchronisation services while other types of applications might share the need for data aggregation, BI or perhaps document management services. Some of these services have been grouped together to create a further ‘Something as a Service’ (XaaS) such as Mobile Backend as a Service (MBaaS).
The Cognitive Services APIs that Jamie is covering aren’t necessarily labelled as being part of Azure PaaS but they are good examples of platform based services that leverage the latest technologies in the Cloud. They’re being used for the analysis of text and language, and to interpret visual objects such as face and visual signals like emotion.
This sort of functionality is playing an increasing role in today’s digital world. The Cloud provides an opportunity for Independent Software Vendor (ISV) to modernise their applications and remain relevant to their customers. PaaS also provides the means of enhancing in-house legacy applications and customising SaaS products.
PaaS and DevOps are buddies
The Cloud exposes a wider set of deployment possibilities so, as a developer, you need to decide how you want to host your application. This illustrates precisely why we now talk about DevOps. The two disciplines go hand in hand and today’s IDE’s such as Visual Studio have evolved significantly in recent years to cater for this.
If you need greater control and want to manage the deployment infrastructure as a VM or virtual network, you can do that with Azure IaaS. A new feature called Service Endpoints can help too. This allows you to secure your Azure service resources within your virtual networks. Otherwise, Azure PaaS will provide and manage the various services you need. The platform allows choice and flexibility around the management of the underlying infrastructure by way of Azure Service Fabric and Azure App Service.
Service Fabric is a good choice for applications based on a microservice architecture as it still allows some control over the infrastructure. That said, the purpose of Service Fabric is to manage the plumbing and issues that are an unavoidable part of a distributed service orientated architecture, leaving the developer to focus on the business logic. Service Fabric will handle things like state management, auto-scaling, upgrades, self-healing and failover in the event of a fault. It can also host Docker containers (Linux and Windows) and handle the orchestration that is required within a complex distributed environment.
App Service is another important part of Azure PaaS. It allows you to use .NET, .NET Core, Java, Ruby, Node.js, PHP and Python to build web, mobile and API apps. App Service provides many of the things required by modern applications including the use of social providers for authentication, autoscaling as well as testing in production and continuous and container-based deployments.
There are several different project types supported by App Service, all of which share the same runtime but address different needs. These include Web Apps, Web App for Containers, Mobile App back-ends, API Apps and Logic Apps. App Service allows you to host a website, support mobile clients and expose your APIs in Azure, all from the same solution. It’s a fully managed platform that allows you to automate deployment using the continuous integration and continuous delivery (CI/CD) capabilities within Visual Studio Team Services, Bit Bucket and GitHub.
Web Apps can be deployed in a Windows or Linux environment. The Azure Marketplace provides access to a wide range of APIs, connectors and services, including Cognitive Services, that can be used to add pre-built functionality. Web App for Containers allows you to deploy and run containerised web apps.
Mobile Apps provides the services required for building cross-platform iOS, Android, Windows and Mac applications. You can use C# or Node.js for the server-side logic. Platform services such as Azure Active Directory handle authentication while other services take care of data synchronisation. The dispatch of notifications to mobile devices in the field is handled by Azure Notification Hubs which is a back-end mobile push notification engine.
You can use your preferred language to build and consume APIs and integrate with other Azure services such as API Management, Logic Apps and Azure Active Directory. Logic Apps allows you to create integration solutions without the need to code. This is useful for putting B2B solutions together. There are connectors for a wide range of resources such as Software as a Service (SaaS) products and data sources.
From a technology perspective it’s worth noting that all the project types outlined above fall under the umbrella of Azure App Service. When it comes to billing however, Logic Apps are treated rather differently. They’re billed according to the number of executions or connections used for integration purposes while Web, Mobile and API Apps are billed according to instances and the resources they consume. Each instance can support multiple applications and domains. Grey Matter can help identify requirements and put cost estimates together. Please call 01364 654100.
If you really want to be at the cutting edge, you can take a first step into the world of serverless computing where you’re only required to write the code. We’re now talking about Function as a Service (FaaS) which is event driven and distances the developer from infrastructure concerns. Blocks of code are stood up and stood down as and when required by the application. This helps reduce Cloud consumption costs as code execution typically only lasts milliseconds. Web servers consuming PaaS are provisioned with the processing power needed to accommodate a variety of requests which results in monthly costs for each server regardless of its actual usage. In this respect, PaaS and FaaS are not quite the same thing but they serve the same purpose. AWS was an early FaaS innovator with their Lambda product which has been available since 2014. The Azure equivalent is Azure Functions.
Visual Studio and Azure are buddies too
Visual Studio 2016 works alongside Azure to provide developers with a tightly coupled development environment for Cloud applications that embraces DevOps practices for continuous integration and delivery. Visual Studio supports many of the plug-ins that allow developers to work with a variety of open source tools such as Jenkins, TeamCity and GitHub. As you’d expect, most of the Azure platform services are natively integrated with Visual Studio Team Services (VSTS). Infrastructure as Code (IAC) does a lot of the legwork in helping to build the environment for a new Cloud project and to specify the artifacts that will be needed. JSON files define the contents of the environment required by the Cloud application. This can be set up from within the Azure Portal browser which allows you to manage the resource and provides overview pages as shown below, in this case for App Service, Virtual Machine and SQL Server and Storage.
Most Microsoft developers will be more accustomed to working within the Visual Studio IDE and they can continue to work this way, using Solution Explorer to add a project and create an Azure Resource Group. The Azure Resource Manager (ARM) builds the project environment which might include databases, web apps, Redis Cache, Docker and Linux Machines for which templates are provided. The JSON file details all the resources needed by the project and it also accepts parameters which can be put to good effect. Rather than create and maintain separate ARM templates for the various environments you might need (dev, QA, staging and production), you can adopt a single baseline template and pass in parameters to distinguish between each one. This makes it possible to tear down an environment and stand it up again simply by redeploying the template.
‘Continuous integration and continuous delivery (CI/CD)’ refers to the DevOps practice of delivering smaller parts of the project in an agile and incremental fashion to help yield early benefits. The Continuous Delivery Tools for Visual Studio Extension (located under Tools) allows you to connect to Visual Studio Team Services to locate your Team Services account and Azure subscription. With this in place you will be able to create a CI/CD pipeline and deploy the code into Azure.
Cloud adoption began in earnest with IaaS and SaaS, both of which are now well established as part of the IT landscape. It’s now the turn of PaaS to take centre stage. This is where exciting things are happening. It’s also the part of the stack that facilitates the delivery of modern digital systems. Our regular contributor Jamie Maguire will be following up with a series of ‘how-to’ blogs and we have other industry experts lined up to provide further insight into Azure PaaS and Visual Studio. Things are developing rapidly in this area so please check back regularly to keep informed.
The members of our Managed Services team are experts at managing Azure related projects. If you need their technical advice or wish to discuss Azure and Visual Studio options and costs, please call us on 01364 654100.
Contact Grey Matter
If you have any questions or want some extra information, complete the form below and one of the team will be in touch ASAP. If you have a specific use case, please let us know and we'll help you find the right solution faster.
Intel and Google are working together to drive high-performance computing forward on Google Cloud with the release of the Cloud HPC Toolkit.
Thu 22 September 2022 11:00 am - 1:00 pm BST
Learn how to increase your revenue through Microsoft’s Commercial Marketplace if you create Azure Managed Application solutions