Cosmos DB Advantages

Cosmos DB is gaining Traction exponentially & I would like to list the advantages of Cosmos DB here.

Globally Distributed means scalable across all countries & regions.

Low Latency is the core advantage of Cosmos DB.  This is achieved through SSD based storage, planet scale flexibility providing Millisecond response time.

Flexible Consistency offered through Varying Consistency Models like Strong, Boundless, Session, Prefix, Eventual.

Flexible Pricing Model allows metering of storage & throughput independently rather than CPU/Memory/IOPs.

Elastic Scalability will scale the database based on the request volumes with No Limits. aka Horizontal Scalability

Multi-Storage Model allows storage of data in form of key-value pairs, documents, graphs & columnar

Multi-API Model allows querying the database in SQL for document, MongoDB for document, Azure Table Storage for key-value, Cassandra for columnar etc.

High Security  achieved through End-to-end Encryption on data-in-transit & data-at-rest.

Application Insights in Azure

Application Insights is a Application Performance Management (APM) Service available for Developers & Administrators.  We can use it for web applications deployed to Azure.

Application Insights provides the following features:

  • Application Availability
  • Performance Monitoring
  • Usage Insights

Application Insights also provides Visual Studio Integration, Support for Windows Phone Store Apps etc.

Creation of Application Insights

Open Azure Portal > Create New Resource > Search Box > Enter Application Insights

image

Select the first option & Choose Create.

image

Enter Information in the appearing dialog.

image

Click the Create button in the bottom.

Wait a few minutes & your Application Insights will be created.

image

Now you are ready with the Application Insights panel as shown below.

image

Create Azure Functions using Visual Studio 2017

In this article we can explore about creating Azure Functions using Visual Studio 2017.

Native Tooling in Visual Studio 2017

Visual Studio 2017 includes the Azure Functions SDK to provide Functions template.

Open Visual Studio > New Project > Choose Azure Functions template as shown below.

image

In the next window choose the Http Trigger option.

image

You will get the following Code generated.

image

Run the application & You will get the following command window.

image

Towards the end you will see the URL to copy.

image

You can copy the URL & PUT in the browser. Since it is using Http GET method you will get the break point hit.

image

References

https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview

Summary

In this article we have explored about Azure Functions template in Visual Studio 2017

Advantages of .Net Core, ASP.NET Core, EF Core

In this post I would like to List down the Advantages of .Net Core, ASP.NET Core, EF Core.

.Net Core Advantages

Open Source allowing source code availability & customization.

Cross-Platform runs on Windows, Linux and Mac OS.

Lightweight through newly written libraries, no dependency on windows OS libraries

High Performance in speed & efficiency

Scalability possible through Microservices & Containers supporting architecture

Disadvantages Third party library support are limited, Not available in Desktop applications.

ASP.NET Core Advantages

Additional to the open-source, cross-platform, light-weight advantages of .Net Core, following are the advantages of ASP.NET Core.

Unified story for building Web UI & Web APIs.

Testability friendly architecture through support for Interfaces.

Built-in Dependency Injection allowing singleton, scope, transient instance creation.

Host Friendly allowing hosting in IIS, Apache & Other web servers

Cloud-ready enabled for Azure, AWS hosting

EF Core Advantages

Additional to the open-source, cross-platform, light-weight advantages of .Net Core, following are the advantages of EF Core.

Batch Updates for sending multiple queries to the database thus reducing roundtrips & enhancing performance.

Alternate Keys support along with primary key.

In-Memory Provider for holding all entities in memory useful for unit testing.

Shadow Properties are those which are not in the entity class but tracked in the Change Tracker.

Mixing FromSQL with LINQ allowing SELECT * FROM statement mix with OrderBy() LINQ queries.

Note

All Core projects are complete re-write of the same.

Microservices, Advantages, Applications, Overheads

Microservices is a Hot Trend in the Industry. Everyone knows the Advantages of it.  Here I would like to list down the same.

Microservices

Microservices are small services, with clear boundaries, easily deployable without affecting other components & offering individual scalability.

Microservices have their own code & data within them.

Microservices offer freedom of technology choices.

Advantages

  • small services
  • single responsibility
  • separate processes
  • clear boundaries
  • easily deployable
  • individually scalability

Applications

NetFlix is a well known example of implementing Microservices.  Here the Netflix contains of following Microservices:

  • Public Website
  • Authentication
  • User Registration
  • Movie Selection
  • Streaming
  • New Releases

Here if each of this is considered as individual microservice, it can be developed, modified, deployed & scaled separately without affecting other application boundaries.

Overheads

But give the advantages, I have never seen a 100% microservice application myself.  Each & Every architect claims to have implemented Microservices.  But when we dig deeper there are missing parameters to support the full microservice implementation.

Boundaries All the depending modules need to have clear boundaries of code & data.  If one of the code/data depends on your microservice module then it will cause failure.

Asynchronous All the synchronous calls has to be converted to asynchronous calls.  For this a normal API call needs to be migrated to Service Bus Messages given an Azure scenario.

Repositories Since each microservice has its own code & data, we need to maintain separate code repositories for each.

Debugging Overheads Unlike monolithic application where one can press F5 and debug a button click to service, it is not possible with microservice.  More complexity is there in debugging microservices.

Azure Functions 2.0

In this article we can explore about Azure Functions & Latest release 2.0.

Azure Functions

Azure Function is a serverless compute service. It allows to quickly create a Function & Deploy to Azure Cloud without worrying about the Infrastructure. It has features like Auto-Scale, Pay-per-Use Pricing model, Multiple Language Support, Multiple Triggers, Integrated Security etc.

In short Azure Functions is Event + Code, Serverless, FaaS.

image

Serverless does not mean there are No Servers. But, they Scale easily to N number of Hardware depending on the Load.

Azure Functions 2.0

Following are the New Features in Azure Functions 2.0:

· Cross-Platform Support

· .Net Core 2.1 Support

· Non .Net Language Support

· Native Tooling Support

· Increased DevOps Support

· Consumption based Billing

image

Azure Functions in its Totality is better than Azure Web Jobs.

Consumption Plan

Consumption Plan gives the Flexibility that You will be Charged only the Execution Time of Functions.

Where to use Functions?

We can use Functions in Once-in-a-While scenarios like:

  • Tax Calculations during Tax Period which requires heavy-use, easier-scalability
  • Data Processing Period during a Client Engagement where Data Processing will be done in a day & rest of the time only reporting will be used

Native Tooling in Visual Studio 2017

Visual Studio 2017 includes the Azure Functions SDK to provide Functions template.

image

References

https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview

https://azure.microsoft.com/en-us/blog/introducing-azure-functions-2-0/

Summary

In this article we have explored about Azure Functions 2.0.