Anthony Chu Contact Me

RESTful APIs and Swagger (OpenAPI) in Azure Functions

Monday, December 26, 2016

Azure Functions doesn't have formal support for exposing Swagger (OpenAPI) specifications yet. But since it's built on top of Azure App Service, we can create Swagger metadata manually and use API Apps features such as API Metadata to light up tooling in Azure and Visual Studio.

Today, we'll look at how to create a RESTful API in Azure Functions and expose Swagger metadata for it. We'll then look at different ways of consuming the Swagger metadata.

Building an API in Azure Functions

It's really easy to build RESTful APIs with Azure Functions. One of the features that makes this possible is its rich support for routing templates. Using routing templates, we have full control over the routes and HTTP methods that each function will respond to.

Continue Reading...


Query Event Hubs Archive with Azure Data Lake Analytics and U-SQL

Wednesday, December 21, 2016

Azure Event Hubs Archive is a feature that allows the automatic archiving of Event Hubs messages into Blob Storage. A simple setting is all it takes to enable archiving for an Event Hub. It couldn't be easier.

Event Hubs Archive writes out the messages into files using Apache Avro serialization, which is a binary format with embedded schemas that is quickly becoming popular.

Azure Data Lake Analytics added an open source Avro extractor this week. In this article, we'll look at how to use Data Lake Analytics to query data stored by Event Hubs Archive.

Continue Reading...


AWS re:Invent 2016 Announcements - an Azure Perspective

Tuesday, December 6, 2016

Amazon held its annual AWS re:Invent conference last week. As usual, there was a continuous stream of exciting announcements of new AWS features and services. There's been a lot of coverage in the news, but not much that compares them to other platforms. There were at least 9 newly announced services that are directly comparable to existing services in Azure. I'll focus on those today.

Before we begin, here's a disclaimer... I use both AWS and Azure in my day job. But being an Azure MVP, I have a much deeper knowledge of the Azure platform and perhaps a slight bias. With that in mind, I'll do my best to be fair and accurate. Feel free to fact check and tweet or email me if I got anything wrong!

Continue Reading...


Learning F# with Azure Functions

Sunday, November 27, 2016

F# has an amazing community that is passionate about their language and is welcoming to newcomers. This year at NDC London, .NET Fringe, and the Microsoft MVP Global Summit, I was lucky to meet many of the influential people in the F# community. They all told me why they love F# and offered to help anyone who wants to learn it.

When Azure Functions started supporting F#, it gave me the perfect opportunity to write little pieces of logic in F# without having to go all in on it.

Continue Reading...


Monitoring Service Bus with Azure Functions and Datadog

Thursday, October 6, 2016

Service Bus has recently been added to the new Azure Portal, but its metrics are not currently exposed to the portal so we cannot create charts and alerts for them yet.

Luckily, we can easily access the metrics using Service Bus' management REST API. Even easier still, we can use the Service Bus SDK to access information such as queue length. Today we'll look at how to use Azure Functions to get queue and subscription length metrics into the popular cloud monitoring tool Datadog.

Continue Reading...