KnowledgeBase

In October, During Ignite 2018 Conference in Orlando, Microsoft announced the availability of new free interactive and sandbox based learning platform called “Microsoft Learn”, and during these months Microsoft has been adding more and more specific contents for different roles such as Azure Developer, Azure Administrator, Azure Architect etc.

There is a specific learning path for all roles and you can experience different role based contents being aligned in each bucket.

Soon you will be seeing more specific contents for Power BI, Power Apps, Microsoft Flow and Dynamics 365 etc being added in to this platform.

Benefits of Microsoft Learn:

No Fee: This platform is free, you are going to use a free azure sandbox for playing around with Hands-on learning.

Points for Learning: XP points for each sections you complete and you have different levels. I am on Level 7 on my learning curve.

Specific Learning paths leads you to successful Microsoft certification exams. a learning path tailored to today’s developer and technology masterminds and designed to prepare you for industry-recognized Microsoft certifications.

End of Microsoft Virtual Academy(MVA)

Microsoft Virtual Academy has been a free platform for learning about Microsoft technologies and earn completion certificates etc. Since we have the new interactive learning experience available through Microsoft Learn, Microsoft has decided to phase out Microsoft Virtual Academy and we have received an email confirming the same.

Planned complete retirement of MVA by Jan 29’ 2019.

Excerpt from the email received:

To simplify your tech training journey, we are consolidating our learning resources and retiring Microsoft Virtual Academy in phases, beginning on January 31, 2019. Complete site retirement is scheduled for later in 2019. Check your MVA Dashboard frequently for courses you have started that are retiring. To earn your certificates of completion, be sure to finish any courses by January 31, 2019.

Enough said based on my experience I found Microsoft Learn is the new age learning platform providing gamified experience through the learning curve and earning XP points, unlocking achievements gives you a level of satisfaction.

Microsoft has recently announced new certification exam tracks for Azure Administrators, Developers and Architects. Here are the line ups that should help you move your career with right certifications.

The three new Microsoft Azure Certifications are:

Microsoft Certified Azure Developer

Microsoft Certified Azure Administrator

Microsoft Certified Azure Architect

These certifications would essentially split the previous MCSA/MCSE: Cloud Platform and Infrastructure track and introduce new exams for individual certification track.

So far I only have limited information available about all the exam numbers for each individual track, as recently Microsoft has made BETA exams available for Microsoft Certified Azure Administrator track.

If you don’t have 070-533 exam certification from previous tracks then doing the following exams would would provide you Administrator track certification.

It has been a while I have been reading about the major changes that areintroduced in Node.js 9.x.x / NPM 6.x.x and myself faced by Node.js application going to a toss after I upgraded to Node.js 9.x.x, as I always keep Node.js up to date in my development environment.

I use NVM(Node Virtual Manager) to switch between different version of Node.js and I love the flexiblity NVM provides. So I was able to quickly switch back to 8.x.x version, when I figured out this change.

But npm packgage downgrade did not work using “npm install –g npm@5.x.x” due to old traces of 6.x.x I had to clean up my npm cache and do npm install again.

Introduction – The “npm audit” command:

Recently with 6.0.0 NPM team has introduced many improvements such as :

a.) Provide protection against insecure code into the workflow during your npm install . When a user downloads code from the npm Registry, npm will review the request against the Node Security Platform database and return a warning if the code contains a vulnerability.

b.) Package signing for publishers. npm-signature field will allow users of npm packages to verify the integrity of the package regardless of the tools they use to retrieve it or the registry from which they download it.

The audit capability, which provides an ability to perform a security audit on your project and dependency components. To simplify it provides a moment-in-time security review of your project’s dependency tree.

It will scan your project for any vulnerabilities.

You can choose the option to automatically install the compatible updates vulnerable dependencies.

Cosmos Db is a multi-region scallable, globally-distributed database solution as part of Microsoft Azure Platform. With a button click, Azure Cosmos DB enables you to elastically and independently scale throughput and storage across any number of Azure’s geographic regions. It offers throughput, latency, availability, and consistency guarantees with comprehensive service level agreements (SLAs), that no other database service can offer. [REF]

What is multi-region scalability or global distribution ?

What it means is that once you select this option, and underlying platform will ensure that your main database is replicated across other global regions you have defined.

So when a customer/application requests the data from a certain geo location:

Cosmos Db will serve the data from nearest available regional copy to provide low latency in accessing the database. Inorder to achieve it is recommended to deploy both the application and Azure Cosmos DB in the regions that correspond.

Incase that nearest available region is not defined, it would serve from nearest available or main copy. This could be East US or West US depending on your deployment decisions.

As BCDR(Business Continuity and Disaster Recovery) plan, Incase main copy is not available, it would faillover to serve the requests from any backup region.

Faster READS: It ensures that all reads are served from the closest (local) region. To serve a read request, the quorum local to the region in which the read is issued is used.

Reliable WRITES: The same applies to writes. A write is acknowledged only after a majority of replicas have durably committed the write locally but without being gated on remote replicas to acknowledge the writes.

PS: The replication protocol of Azure Cosmos DB operates under the assumption that the read and write quorums are always local to the region where the request has been issued.

How to turn on – Cosmos Db and multi-region replication?

In CosmosDb instance settings select Replicate data globally page, then select the regions to add or remove by clicking regions in the map.

Azure Cosmos DB enables you to configure the regions (associated with the database) for “read”, “write” or “read/write” regions.

Then configure Manual/Automatic failover options as well. I would cover this in later articles.

All that said, you are in good hands of Azure Platform as a Cosmos Db customer or user.

NB: For the purpose of this article, I have configured my instance to run different regions with write region as East US and read region as West Europe,North Europe and West US.

Programatically Connect to a preferred location using the SQL API:

Now coming to the context of this blog, as a application developer some times you would like to programatically control the access to these regions while using Cosmos Db .NET SQL API.

In CosmosDb.NET SDK version 1.8 and later, there is the ConnectionPolicy parameter for the DocumentClient constructor has a property called Microsoft.Azure.Documents.ConnectionPolicy.PreferredLocations.

All reads will be sent to the first available region in the PreferredLocations list. If the request fails, the client will fail down the list to the next region, and so on.

SDK will automatically send all writes to the current write region.

SDK will only attempt to read from the regions specified in PreferredLocations.

For example: If you have 4 read regions defined in your cosmos Db instance and you only have 2 regions defined in PreferredLocations in connectionPolicy, requests from other two regions would never be served from SDK.

NB: The client application can verify the current write endpoint and read endpoint chosen by the SDK by checking two properties, WriteEndpoint and ReadEndpoint. **SDK version 1.8+.

Recently I have been trying multiple ways to optimize CosmosDb SQL.NET SDK integration calls from my web application that sits within a VNET.

After carefully analyzing different options available within Cosmos Db SQL API’s have realized there are different aspects we could optimize in achieving minimal turn around time. In this article I am going to discuss about one such useful find, that is to use Cosmos Db SQL SDK connection policy to use diferent networking options to improve the latency between web application and cosmos db API calls.

Connection Policy:

Performance of an client application has important implication based on – how SQL .NET SDK connects to Azure Cosmos DB , because of expected client-side latency due to networking conditions. There are two key configuration settings available for configuring client Connection Policy – the connection mode and the connection protocol.

There are two connection mode options provides by Cosmos Db SQL.NET SDK:

Gateway Mode(which is default): This mode is the default option being used and works with all Cosmos DB SDK versions. Since it is only accessible over HTTPS/TCP, it is more secure and best choice for applications that run on a constrained secure corporate network. If you are using the .NET Framework version of the CosmosDb SQL.NET SDK, then proably this is the only connection mode that would work for you.

Direct Mode: This is a new mode which will work only on .NET Standard 2.0 onwards. It provides you an ability to choose between TCP or HTTPS more efficiently. Only caveat is that you would need .NET Standard 2.0 as target framework for your client application.

Connection Protocol – TCP: TCP would be more faster when client and db are in same VNET. Since TCP within the same network would be more faster, you would be amazed by the latency improvements by your client application. It would respond faster to you cosmos Db requests. NB In TCP mode apart from 443 and 10255 mentioned in Gateway more, we also need to ensure port range between 10000 and 20000 is open in your firewall configuration, because Azure Cosmos DB uses dynamic TCP ports.

Connection Protocol – HTTPS: Since client application and cosmosDb are in same network limits, you could see that HTTPS option is also a reliable, secure and faster access channel for you, but not highly performing as TCP.

“In learning you will teach, and in teaching you will learn.” -Phil Collins

About

Nithin Mohan – A passionate hardcore application programmer, software architect, and technology evangelist with over 15 years of experience in Web, Mobile, and Cloud applications design and development.
A hardware geek, a kick-starter, and a quick learner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. This blog is to share knowledge, tips & tricks on software development using Emerging Technologies. Thanks to the readers and sincere thanks to all author's of crossposted blogs. Blog is powered by theme gitsta, customized for this blog. Enjoy reading the blog and subscribe to the RSS feed.