Skip to main content


ARM Scripts - Extending T-shirt size concept

Recent posts

[IoT Home Project] Part 9 - Extending Azure Function to support Thieves Alarm

In this post we will discover how to
Crunch distance (sonar) information produced by a GrovePI sensor and send using Raspberry PI and Azure IoT Hub to backendAdd filters on top of Service Bus Topic Subscriptions to receive only information related to distance and temperature on each subscriptionAdd new functionality to the current portal to be able to display alarm and notify our userStory
In this moment we have a system that is able to collect metrics from Raspberry and process some of the data. We already have from GrovePI a sensor that calculate the distance from the sensor to an object. Why not to use it to detect is something is moving in front of it and create a simple alarm system.
Yes, this is not the best sensor that we could use, although this scenario is a great method to learn something new.

Previous post: [IoT Home Project] Part 8 - Connecting to Azure Function and to a virtual heat pump
GitHub source code:

What we have until now

[IoT Home Project] Part 8 - Connecting to Azure Function and to a virtual heat pump

In this post we will discover how to:
Push content from Azure Stream Analytics to Azure Service BusWrite an Azure Function in Node.JS that fetch data from Azure Service Bus Topic and push it to Azure TableDevelop a ASP.NET Core application that plays the role of a heating system that start/stop the heating in a houseStory:
Use temperature data collected from sensors connected to Raspberry PI to start/shop a heating system from a housePrevious post: [IoT Home Project] Part 7 - Read/Write data to device twin
GitHub source code: 

Push content from Azure Stream Analytics to Azure Service Bus
This step is the most simple one. We just need to Add a new output to Stream Analytics and specify the Service Bus Topic where we want to push data. After this, we'll need to update the Stream Analytic query by adding:SELECT * INTO outputSensorDataTopic FROM avgdata , where 'outputSensorDataTopic' is the name of the output that we crea…

ARM and Resources Policies

Managing an Azure Subscription where 10 or 20 people have access can become a nightmare after the a few weeks. You will end up with people that creates resources will wrong name or in the right location.
You might want to have control what kind or resources can be created in specific location, what name should be used or what tags needs to be set for each resource. I remember once we even had a resource created in another subscription, that was discovered after almost one year.

What about Role-Based Access Control (RBAC)? Aren't the same...
RBAC and Resource Policies are focusing on different thing. They are complementary and together give you ability to have control at all levels. Role-Base Access is focussing on managing rights and actions that that a user can do. In contrast using resource policies you enforce naming convention at resource level, what resources can be created, in what Azure Regions and so on.
A good example of using RBAC and resource policies is when you gi…

Blue and Red Network Topology in Azure (Virtual Network without internet access)

When you create the infrastructure of a system, it is common to have two separate network. One that has access to public internet where front-end system are hosted (web pages, web services). Another network is without internet access, more protected from intruders. In this kind of secure network backend services are hosted, databases and other private services.

In this post we will do the following references:

Blue Network - The network that had direct access to internetRed Network - The network that doesn't have access to internet and can be accessed only from internal systems

As we can see above, from Public Internet a requests goes to the front-end layer (Blue Network). Systems that runs in the Blue Network can make a direct call to the Red Network systems directly. But a request cannot goes from Public Internet directly to the Red Network. Red Network configuration (e.g. routers, firewalls) don't allow requests from Public Internet.

Can we have such a network topolog…

Azure Load Balancers - HTTP/External/Internal/Global load balancers

In this post we'll take a look on different types of load balancers that are available in Azure. The main scope is to understand what is the role of each load balancer and when we shall use each type of load balancer.

What is a Load Balancer?
It is a system that distributes the workload across multiple instances.
For more information related to how does it work and what are the base principles I invite you to take a look on Wikipedia -

What types of Load Balancer are available on Azure?
Personally I would say that there are 4 types of load balancers that are available on Azure:

HTTP based Load BalancerInternal Load BalancerExternal Load BalancerGlobal Load Balancer Each of them can be used in different situations and they never exclude each others. This means that you might need to use multiple types of Load Balancer, based on what you want to achieve. 
HTTP based Load Balancer (Application Gateway) The most common one in our d…

Why back-off mechanism are critical in cloud solutions

What is a back-off mechanism?
It's one of the most basic mechanism used for communication between two systems. The core idea of this mechanism is to decrease the frequency of requests send from system A to system B if there are no data or communication issues are detected.
There are multiple implementation of this system, but I'm 100% sure that you use it directly of indirectly. A retry mechanism that increase the time period is a back-off mechanism.

Why it is important in cloud solutions?
In contrast with a classical system, a cloud subscription will come at the end of the month with a bill details that will contain all the costs.
People discover often too late that there are many services where you pay also for each request (transaction) that you do on that service. For example, each request that is done to Azure Storage or to Azure Service Bus is billable. Of course the price is extremely low - Azure Service Bus costs is around 4 cents for 1.000.000 requests, but when you ha…