This is not a tutorial on using Microsoft’s Azure Serverless offerings. There’s already plenty of those, with more appearing every day as Serverless popularity rapidly grows. Rather, this post provides a roadmap of info you’ll need to use these technologies in your projects or products. Just for good measure we include a few tutorials as well.
For now at least, the key Azure Serverless services are
- Azure Functions – chunks of event triggered logic
- LogicApps – declarative workflow that calls Functions and 3rd party services
You’re very likely to use several other Azure services and tools in your solutions and are they are introduced below.
Background Software Knowledge
Perhaps Serverless’ greatest attraction is that developers can largely forget about much of the software stack required to build and deploy a business system application or app backend (or even a static web server). As a cloud offering that builds on existing solutions it also abstracts away the hardware too. Thus, you can concentrate on your business or app logic, safe in the knowledge you have outsourced those other details to Microsoft. You do still require some system development and maintenance skills though, though many can be learnt as you become familiar with Azure Serverless.
The largest impact of “going serverless” will be on your system architecture. You certainly won’t have a single monolith app or a classic 3-tier architecture. Instead, you’ll be connecting together services and functional chunks, some of which you’ll create and others coming from 3rd parties. The connections between components will be asynchronous mechanisms like HTTP triggers or messages in queues. Data and state are stored in services that wrap databases, most typically NoSQL. Accordingly, from the outset you’ll find it useful to have an acquaintance with some architectural techniques beyond basic software development.
- Software as a Service, both as a technical and business concept
- Event driven architectures, along with messages and queues for asynchronous coupling
- Distributed system design, possibly including Microservice architectures
- Monitoring and debugging techniques for distributed systems
- Basic deployment techniques including CI/CD (arguably basic development techniques)
- Backend, Functions and Workflow as a Service (BaaS, FaaS and WaaS) – strictly for label lovers
Familiarity with these base technologies will be useful:
- HTTP RESTful architectures and APIs
- Possibly graphQL though it’s not directly supported
- C# .NET or NodeJS JavaScript – other languages are supported in Functions but these are arguably the main 2.
- SQL and/or NoSQL – your going to want to store data somewhere
You may also find it useful to have a familiarity with code-level async techniques (eg callbacks, promises or reactive streams) but you can have Functions with out using them.
Notice we didn’t mention typical cloud concepts such as IaaS or containers. They may be part of how Microsoft implement Azure Serverless but they are mostly hidden details you needn’t to worry about. In addition, while Serverless is an extension of PaaS you can largely forget about that too.
Finally, the Functions framework is open source and you’ll want to have some familiarity with working this way on GitHub in order to engage and make contributions to the very open team. LogicApps also provides a collection of handy open source examples and addons.
Just do it!
With so many tutorials and videos out there it’s hard to select good ones to include. So I suggest you just google after looking at those below 🙂
Bear in mind that the Azure Portal UIs are the fastest way to get going as they are interactive and work online. You can explore using off line development and deployment tooling later. Also, there are generally 2 types of Serverless applications: business automation logic and backend for a mobile or web app. Note you can easily try Functions panel for free without even logging into Azure or having an account.
- LogicApp tutorial – send email when a RSS feed is updated – more are linked at then end
- Functions tutorial – simple test in the portal – more linked at end
- The Azure Functions challenge – test your coding skills and learn how to build solutions using Azure Functions at the same time
Videos
- Watch Scott Hansleman’s short Functions and follow along
- A fairly detailed introduction to by Stephen Siciliano (May 2015)
- Serverless Applications with Azure Functions and Logic Apps – Part 1 & Part2
- Mastering Azure App Service, Part 1: Building Azure Logic Apps – Microsoft Virtual Academy Course
Gaining Context
Your learning style may be to gain a background understanding before diving in to play, or you may like to pick up concepts as you explore. In either case these resources will provide the info you need:
Architectures
The Serverless community are busy figuring out which architectural patterns work best with Serverless. These patterns aren’t new and as indicated above, they currently draw from patterns in use in distributed, event driven, reactive systems. Here are a few starting resources.
- Serverless Architecture by Mike Roberts
- Microservice architectures by James Lewis and Martin Flower – fairly closely related to serverless architecture
- Yochay Kiriaty’s slides on Practical Serverless Design Patterns from ServerlessConf Autsin 17. Plus code examples
-
The Reactive manifesto – LogicApps and Functions enable this architecture style.
- Reactive programming vs. Reactive systems – a little useful clarification need in the days of React and Reactive Programing
Azure Specific topics
The key technologies are:
- LogicApps – workflow definitions
- Functions – event driven code
- – Excellent general introductory video from Chris Anderson
In addition you’re bound to use some of these:
- Storage – File, Disk, Table, Blobs, Queues
- Service Bus – enterprise scale messaging
- DocumentDB – full powered NoSQL
- TableStorage – simple tables – not full SQL
- Event Hub – IoT scale telemetry
- Notification Hub – push notifications
- BotFramework (preview) – conversational UIs
A few crosscutting Azure specifics you’ll want to know about include:
- The Azure portal – navigation and dashboards help tame the vast array of features on offer
- Regions – Data centre locations – make sure you pick the best for you or your users
- Subscriptions – there are free trials and offers for VisualStudio or MSDN subscribers and Microsoft BizSpark
- Resources and Azure Resource Manager (ARM) – “infrastructure as code” deployment management
- App Services and especially the KUDU console – Functions runs on top of these and inherit many useful features
- Functions pricing – the consumption plan (pay as you use) can be very cheap indeed, if not free
- LogicApps pricing
Tools
Right now there are 3 main development tools sets, though you can always mix and match too. The tools you uses depend on if you’re using Functions or LogicApps.
For Functions the language you use also effects which local development OS you can use, plus available CI/CD options. Fortunately, the Functions Team are working on making all options available on all OSs. A powerful feature is the ability to run, manage and test Functions locally (or on CI) while they still work with cloud based triggers and services; perfect for unit testing.
- The Azure portal – interactive web app – great for quick experiments or small systems with a single developer, or a very careful team
- VisualStudio 2015 – Windows only IDE, team development and deployment. Visual editor for LogicApps. C# Functions
-
Visual Studio Code + CLIs – NodeJS JavaScript Functions and soon TypeScript. See this post for details
- Code is a cross platform editor and debugger, powerful intellisense with C#, JavaScript and TypeScript
- Azure Functions CLI – Windows only. May merge with Azure CLI
- Azure CLI – Cross platform, the latest version arguably makes simple queries rather complex
Both Functions and LogicApps use underlying declarative text files, meaning common text tools (grep, sed, awk etc) can be used when required. That’s a real lifesaver when you have to make a small change in many places!
The Serverless Framework now supports Functions in addition to Apache OpenWhisk and the original AWS Lambda and . This impressive open source project cleanly abstracts away the differences between various Serverless platforms. It currently has a DevOps emphasis and only supports a subset of Functions features (as you’d expect given it’s abstraction)
- Introducing The Serverless Framework for Functions by
Other useful tools include:
- Azure Application Insights – see what you code is doing. Functions integration is in Preview
- Azure Monitor – detailed azure analytics
- Postman – the HTTP API testing tool
- Azure Storage Explorer – Windows app that “does what it says on the tin”
More, More!
- Mark Heath’s curated list of useful links for Functions over on GitHub.
Enjoy
That might seem a lot to absorb but the reality is you can just start with a small stand-alone solution that is useful to you. Or perhaps, implement one part of a new or existing system using Functions. Visting the Azure Functions or LogicApps panel, selecting a template, entering some code and testing are all easy small steps. From little acorns….
As Chris Anderson, PM of Azure Functions said “Solve the problem and get on with the rest of your life”.
Stay informed
- Follow us at
Categories: Uncategorized
Leave a Reply