Skip to main content

Posts

Showing posts from 2017

Azure SQL Data Sync | Tips and Tricks

In this post we will talk about things that you should know and take into account when you want to use SQL Data Sync from/to Azure SQL. What is SQL Data Sync It’s a synchronization service offered around Azure platform that is allowing us out-of-the-box to synchronize multiple databases that can be inside Azure or on-premises. SQL Data Sync it is one of the services that makes our lives 10x time easier. The coolest thing on this service is that you can make the configurations from Azure Portal. This is useful especially when you want to try the service or make a fast configuration. From UX perspective, the experience is wonderful and when you want to automate the process, you  can use PowerShell. Base Concepts Synchronization Group represents a groups of databases that you want to keep in sync. You’ll have all the time a Master database used to sync between all the other databases. In the Master-Slave topology, the Slaves are called Sync Members and  the master is called Hub.

IoT Home Automation | Device tracking capabilities

In the last post , I talked about how I connected the yard gates to the IoT Home solution that I started to develop. Unfortunately, I was not able yet to connect the Paradox alarm system to the solution. It’s not clear for me how to connect the relay as a keyswitch zone, but I hope next weeks to receive some help and resolve the near future. Why? Because the WiFi connection is not stable, there are times when I lose the connection to the devices. This can be annoying, especially because I do not have yet a tracking mechanism that can provide me information related to the current device state. I decided to enhance my solution with tracking capabilities. Until now I didn’t add any logs to the solution because I wanted to see exactly where and what kind of data I should collect. Easily you can add logs capabilities to the system and end up with a bunch of logs that you don't need it. What? In day to day use I observed that I need the following information: When was the last

Demystify how Shared Access Signature (SAS) is created inside Azure Storage

In this post, we will take a look on how Shared Access Signature (SAS) is generated. We would like to understand: How such a signature is generated What are the inputs that are required for it  What does the signature contains I assume that you have base the knowledge’s related to SAS. If not I would recommend to read the following introduction before - https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1 What does the SAS signature token contains? This signature (token) is just a specific HMAC (keyed-hash message authentication code) generated using SHA256 hashing algorithm. There is no magic behind it. Inside this token all the relevant information related to access permissions, expiration date and many more are ‘hashed’. By ‘hashed’ I understand a hash that is generated from the string that contains in clear text all the information related to SAS together with storage account key. For example, for the below SAS stri

IoT Home Automation | Connecting Yard Gates (Beninca and ESP8266 controller)

I continue the journey of home automation using ESP8266 and Arduino with yard gates. In the last post related on this topic, I have done the base automation of the garage doors. Welding From this perspective, nothing special. Except welding the pines of ESP8266 and relay and putting one of top each other I was done. I prefer to use relays shields that can be added one on top each other allowing you to mount the controller fast and without additional welding or wires. Arduino Code In theory, the code should be similar to the garage doors automations. The base idea was the same, using HTTP code to decide if we need to close or open a circuit controlled by the relay. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> #ifde

IoT Home Automation | Connecting Garage doors (Beninca and ESP8266 controller)

Now, it’s the moment to talk about how I managed the ESP8266 together with Arduino. In the last post on this subject, we talk about high-level architecture and the backend components . Welding From the hardware perspective I realize that it is more simple to stick two relays on a board where I would also weld the ESP8266. The relays that I had can be controlled only on D1 pin. Considering this, I decided to use D3 pin on ESP8266 and redirect it to the second relay. Both relays needs to be connected to the GND and 3.3V pins of the ESP8266 board. If you have, a development board try to play with it before doing the final welding. I was too existed related to the projects and I made the welding first. I was luck, it worked from the first time. I just started the to learn again how to weld, so ignore my skills. As a coworker told me "If it works, it ain't stupid". The other option would be to create a tower of two relays and ESP8266 on top of each others, but I did n

Configure Azure AD authentication for a web app (App Services)

In this post I will describe the basic steps that needs to be done to configure App Service Authentication using Azure Active Directory. Out of the box, App Services allows us to put in front of our system an authentication and authorization layer. For basic flows, us described below, the configuration can be done directly from Azure Portal, without having to write a line of code. Step 1: Enable App Service Authentication This step can be done directly from Azure Portal, from “Authentication / Authorization” tab. After this, once you specify that you want to use “Azure Active Directory Provider”, do not forget to select “Log in with Azure Active Directory” from "Action to take when request is not authenticated". This is required if you want to not allow anonymous users to access your web app. By selecting this option, you will redirect unauthenticated users to the login page. Don’t forget to hit “Save” (smile). Step 2: Create and configure Azure AD Application Th

Tips and Tricks to prepare a demo for Azure Time Series Insights

Azure Time Series Insights it is a great tool that can be used to monitor in near-real time your systems and get useful insights about what is happening behind a scene. In this post, we will talk about things that we need to consider before jumping to prepare a demo with it. There are behaviors that are normal when we go with Time Series Insights in production, but when we are preparing a demo or we want to push mocks data inside it can be annoying (especially when we do not understand the behavior). Context I had to deliver 2 presentations and 3 demos about Time Series Insights and I learned in the hard way this kind of things, too long nights before the demos. Based on them I made a checklist that I hope to be useful to others also. 1. Ingress of mock events One of the most important thing that we need to keep an eye on is the moment when we want to push mock data inside Time Series Insights. In general, we want in a short period to push data for a few days or weeks. There a

Chart and dashboards from time perspective (real time, near-real time, consolidation)

In this post we will talk about how we can group charts, dashboards and reports in different categories based on how fast we need to be able to ingest and update data inside them. Time is a relative term especially when you put it together with business insights and application reporting. There are two important aspects related to time from business and application insights perspective. 1. Time Granularity The first one is related to the time granularity. In the beginning, most of the business stakeholders require the granularity to be as small as possible, until they realize that there is not too much inside of that and that in order to be able to understand something, the time granularity needs to be increased. Most of the systems that are available now on the market allow us to change the time internal (granularity) on the fly, enabling us to navigate inside our data from a different time perspective. 2. Time Interval The second aspect is the time interval, from the moment t

[Post Event] THE APOLLO 13 OF IT, Targu-Mures, November 2017

On November 2018, Endava organized in Targu-Mures a local event dedicated to local community. More than 70 people came to the event to find more about Block chain, coding quality, CD and data privacy inside cloud. It was a great community event where I meet smart and extraordinary people. I was impressed to find a strong IT community in Targu-Mures. At this community event I had the opportunity to talk about data privacy inside cloud. Below you can find my session details together with session slides. Title : WHO IS THE REAL OWNER OF DATA INSIDE THE CLOUD? Abstract : Once you upload content to a cloud provider you lose the physical control of your data. Who is the real owner of your data from that moment on? You, as the legal owner of the data, or the cloud provider as the guardian? Join this session to find more about the topic. Our main purpose is to understand who ends up having power over the data. Slides : Who owns data inside the cloud | Apollo 13, Endava, Targu-Mu

[Post Event] CloudBrew 2017, Mechelen (Belgium)

An impressive way to finish the working week. How? Attending to CloudBrew , a conference dedicated to Azure and cloud platform. Every year it's a pleasure for me to take part of such an event. With only two tracks, it's give you the feeling that you are together with friends and you chat about Azure and beer (smile). I had the opportunity to deliver an one hour session about Azure Time Series Insights and PowerBI. If you want to find more about this subjects, you can check the abstract and slides, below. Title : Near-real time reporting in Azure Abstract : One of the most common requirement on a projects nowadays is real time monitoring and reporting. Easy to say, expensive to implement and complex to maintain. In this session we'll take a look on the Azure Services that enable us to fulfil this requirements with minimal effort and with maximum benefits. We have on our radar services like Azure Time Series Insights, Analysis Services and PowerBI. After this se

[Post Event] Endava Tech Flow, November 2017, Cluj-Napoca

This week I had the opportunity to participate at Endava Tech Flow . The main topic of this event was AI and Machine Learning. There were more than 100 people that participate to this free event.  Beside local speakers, we had the opportunity to meet J.M Bishop (Director of the Tungsten Centre for Intelligent Data Analytics and Professor of Cognitive Computing at Goldsmiths, University of London) that talked about how dangerous artificial intelligence can be for us. I also had a short talk about Machine Learning, where I tried to explain what is behind a ML and how does a neural network works. More about my session can be found below.  Title : The science behind Machine Learning Abstract : Did you ever ask yourself how Machine Learning works as a system? In this session we will take a look at the science behind Machine Learning systems. We will decrypt the base mathematical concepts that make systems like these work. Once you attend this session you will discover how polynomial

IoT Home Automation | Backend infrastructure

Even if in the previous post I said that I will write about the integration points with garage gates, I decided to go forward with the development of the web interface and gateway software. I went on this path because once I have this part implemented I can play with ESP8266 as much as I want to integrate with all the devices that I have around the house. Web Interface (UI) I decided to go with a simple design. I’m pretty sure that I will become more complex in the future, but for now I will keep things as simple as possible. The web interface is done using AngularJS 5 together with a REST API exposed using ASP.NET Core. For now the web interface expose 2 buttons that allows me to trigger actions (open/close gates). This web interface is hosted as a web application inside an App Services. The plans is to secure using Azure AD, but this is another story, another post, but for now there is no need to do this because there is real device in the backend (yet). Communication Th

[Post Event] ISTAConf 2017, Sofia

Just finished my session at ISTAConf 2017 and I realize that we are not only talking about NoSQL and migration  strategy, but we even doing that. I just met some great guys from Sofia that started to migrate their relational database to MongoDB. What was awesome that they have in plan a migration from on-premises to Azure in the next 3-6 months for their system, so Azure Cosmos DB is the perfect suite for them. It is the 7 edition of ISTA Conference, that started in 2011. Last time when I was here was 2 years ago and in comparison with that times they grow a lot. Not only during the keynotes, but also during the sessions the rooms are full with people that are curious to find more about what are the current trends and what future is preparing for us. What I like at ISTA is the format of the conference. Even if there are more than 750 participants, they don't have more than 3 tracks. allowing them to keep the quality of session at a high level. At this conference I talk about