Skip to main content

Adding extra- complexity to a solution by using too many SaaS of a cloud provider

When you embrace Azure or another cloud provider, you’ll discover an environment that offers out of the box a high variety of options for each type of action that you need.
Let us take computation as an example. If on-premises you would have the option only on top of VMs, where on top of them you would be able to put any other solution that you would like, when you are on Azure, things are looking different.
Beside the classical VMs, on Microsoft Azure you have: Scale Sets, App Services, Functions, AKS (Azure Container Services), Container Instances, Batch, Service Fabric and other Cloud Services (classical Web and Worker role for example).

Having so many options, selecting the best service for your needs might be tricky. It is not about taking the wrong decision; it is more about selecting the right service for your needs, taking into account your context and expectations.
This is one of the most challenges steps during the initial phases of the project that can ensure the success of failure of a project.

Internal Fight
When you need to decide what are the Azure (cloud) components that will gone be used inside your solutions, in most of the cases there might be a friction between two groups. One of them is trying to go with greatest and latest services and technologies and the other one is trying to go safe, with a classical approach.
A good example is:

  • A solution based on Azure VM Scale Sets, Azure SQL and Azure Storage


  • A solution on top of containers (AKS), with Azure Cosmos DB and Azure MySQL

Both parties are proposing good ways on how you can approach the problem. In the end, you need to draw a risk matrix and see what are the pros and cons of each approach. 

A hidden risk
Having at a click distance an ecosystem with so many services available, the technical teams are driven to use as many services as possible. On one side, this is good, because using SaaS reduce the responsibility of the team, but using to many services adds also extra complexity.
For each service, you need to know the pricing model, behavior, limitations, API, configuration and many more. This might not sounds too much… or not? Because the team will try to use the latest services and create a state-of-the-art solution, you can end-up with 14-16 services mixed up together for a simple solution that could use just one computation solution and a storage.

Let us imagine that we want to develop a system that is processing documents. A classical approach would be:

  1. Azure Storage
  2. Azure SQL
  3. Azure Service Bus
  4. Azure App Services
  5. Azure Batch

Another approach that is good as the first one could contain:

  1. Azure Storage
  2. Azure SQL
  3. Azure Cosmos DB
  4. Azure App Services
  5. Azure Container Services
  6. Azure Functions
  7. Azure Data Factory
  8. Azure Logic Apps

Both solution are correct, there is nothing’s wrong with the first one or with the second one. On the second approach there is an extra complexity layer added by extra services. We need to put this in balancer when we take a look over product requirements and NFRs.

Be careful when you combine too many services from a cloud provider. Each extra service adds extra complexity to the system, making it more complex to manage and develop. There is a thin line between a good solution and over-engineering when you have so many services at a click distance. 


Popular posts from this blog

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Entity Framework (EF) TransactionScope vs Database.BeginTransaction

In today blog post we will talk a little about a new feature that is available on EF6+ related to Transactions.
Until now, when we had to use transaction we used ‘TransactionScope’. It works great and I would say that is something that is now in our blood.
using (var scope = new TransactionScope(TransactionScopeOption.Required)) { using (SqlConnection conn = new SqlConnection("...")) { conn.Open(); SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = conn; sqlCommand.CommandText = ... sqlCommand.ExecuteNonQuery(); ... } scope.Complete(); } Starting with EF6.0 we have a new way to work with transactions. The new approach is based on Database.BeginTransaction(), Database.Rollback(), Database.Commit(). Yes, no more TransactionScope.
In the followi…

GET call of REST API that contains '/'-slash character in the value of a parameter

Let’s assume that we have the following scenario: I have a public HTTP endpoint and I need to post some content using GET command. One of the parameters contains special characters like “\” and “/”. If the endpoint is an ApiController than you may have problems if you encode the parameter using the http encoder.
using (var httpClient = new HttpClient()) { httpClient.BaseAddress = baseUrl; Task<HttpResponseMessage> response = httpClient.GetAsync(string.Format("api/foo/{0}", "qwert/qwerqwer"))); response.Wait(); response.Result.EnsureSuccessStatusCode(); } One possible solution would be to encode the query parameter using UrlTokenEncode method of HttpServerUtility class and GetBytes method ofUTF8. In this way you would get the array of bytes of the parameter and encode them as a url token.
The following code show to you how you could write the encode and decode methods.