He/She opens his/her favorite IDE…

Image for post
Image for post
Photo by Antoine Dautry on Unsplash

The Puzzle

On one Saturday afternoon, my wife show me a math problem from our older daughter’s math excise with a puzzled face:

Put squares together to form unique shapes.

  • 2 squares have 1 solution.
  • 3 squares have 2 solutions.
  • 4 squares have 5 solutions.

This particular problem isn’t that difficult — it’s for year 4 kids after all. Kids can just draw all different combinations on a piece of paper and count the unique 12 solutions.

But what’s the pattern? What about 6 squares…


Deploy ARM Templates via Azure Devops YML Pipeline to Multiple Azure Environments

Image for post
Image for post
Photo by Clark Tibbs on Unsplash

Introduction

These days we can define infrastructure as code (ARM template)and CI/CD pipeline as code (YAML pipelines) in the Azure ecosystem. But why do we want to do these tasks as code?

There are good reasons apart from just a cool thing to do.

  • Scalability. Imagine managing 20+ services for a large solution. You wouldn’t want to do it on the UI.
  • Code review. Because they are done via code now. It can fit into the standard code review process just like the application code.


Image for post
Image for post

Everything you need to know to create a production-ready function app via Azure Durable Functions.

This part 4 of the series is all about retry mechanisms of Azure Durable Functions. The sample code in this story takes a very simple approach to set configurations. If you’re interested in a more sophisticated configuration set up, you may want to check out the previous story.

There are mainly 3 retry mechanisms available for durable functions.

  • The build-in activity/sub-orchestrator invocation with retry.
  • The build-in sub-orchestrator retry.

Our demo…


Image for post
Image for post

Everything you need to know to create a production-ready function app via Azure Durable Functions.

You may want to read the previous story of the series first if you are not familiar with Azure, or you want to explore DI options of Azure Durable Functions.

In this story, we will improve our app step by step to demonstrate various approaches to set Azure Function App configurations.

In the end, we aim to configure our function app to retrieve app settings from a fully managed configuration store and have all sensitive information protected.

Configuration Manager

Firstly, I’d like to add the configuration manager to the project so that it no longer reads configs from the environment variables directly…


Image for post
Image for post

Everything you need to know to create a production-ready function app via Azure Durable Functions.

Please read the first article of the series if you haven’t already.

In the second part of the series, we will:

  • Implement DI via autofac.
  • Implement DI via .NET core framework.

The Application

This demo app has a simple logic: it gets a user’s repo list from GitHub, then it gets the view count of each repo, and finally, it prints the view counts. The code can be found in my GitHub repo.

The app implements the Azure Durable Function’s fan-out/fan-in pattern. …


Image for post
Image for post

Everything you need to know to create a production-ready function app via Azure Durable Functions.

This is the first article of this series about Azure durable functions. This series aims to provide a practical guide for devs to follow to create production-ready applications. This is a hands-on guide and it does not discuss the pros and cons of the serverless architecture.

Note: you will need to have some C# programming skills and basic knowledge of Microsoft Azure to follow along.
  • create a demo durable function via Visual Studio 2019.
  • create a basic CI/CD pipeline.

Allen Zhang

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store