Anthony Chu Contact Me

Using ES2017 async/await in Node

Thursday, February 23, 2017

A couple of days ago, Node 7.6.0 was released. One of the changes was an update to version 5.5 of the V8 JavaScript engine. This meant that async/await support is now enabled by default! Finally, we can use the async and await keywords in Node without the need for a transpiler or turning on command line flags.

And what's better is that Azure App Service has already added support for Node 7.6.0.

Today we'll create a simple application to explore async/await in Node. Then we'll deploy it to Azure App Service.

Continue Reading...


Scaling HTTP Azure Functions

Wednesday, February 15, 2017

One of the promises of serverless computing is automatic scaling based on load. I decided to run some HTTP load tests on Azure Functions to see how well it scales. In particular, how many instances does the function app scale out to? How does load affect response times and throughput? How stable is Azure Functions as it scales out?

Before we begin, I want to point out that this is by no means a scientific test. Take the results with a giant grain of salt.

Continue Reading...


Process Azure API Management Logs with Data Lake Analytics and U-SQL

Sunday, February 12, 2017

Azure API Management comes with a rich set of built-in analytics to gain insight into the APIs' activities, such as usage by user, APIs, operations, and geography. But there are times when we want to perform custom queries over the activities. For this, API Management allows us to log API activities to Event Hubs.

Once the logs are flowing through Event Hubs, there are many ways we can use the data. For instance, we can save the logs into a Table Storage using Azure Functions and query it with Power BI; or we can process the live stream using Stream Analytics.

Today, we'll look at how to use Event Hubs Archive to automatically save the logs into Blob Storage. And we'll query the logs from Blob Storage using Data Lake Analytics.

I've already written an article with details on how to turn on Event Hubs Archive and query it using U-SQL with Data Lake Analytics. I won't repeat some of those details; instead I'll focus on how to use these tools with Azure API Management.

Continue Reading...


Updating and Deleting Table Storage Entities with Azure Functions (C# and JavaScript)

Saturday, February 11, 2017

Inserting entities into Table Storage from Azure Functions is a breeze with the Azure Table Storage output bindings. However, the bindings don't directly support updating and deleting entities (yet).

But it's actually pretty easy to support updates and deletes. In C#, this can be done using the Table Storage output binding with a CloudTable parameter. In Node/JavaScript, we can use the azure-storage NPM package.

Continue Reading...


Simplify LAMP Stack Development with Docker

Saturday, February 4, 2017

The other day I was helping someone with a PHP application running in Apache. Not having worked with PHP for a long time, I didn't have a proper LAMP stack development environment set up. Thankfully, Docker makes it easy to work with PHP and Apache without having to install them on my local machine.

These instructions should work on both Windows and macOS.

Continue Reading...