Wednesday, February 8, 2017



We continue with a detailed study of Microsoft Azure stack as inferred from an introduction of Azure by Microsoft. We discussed Azure stack is a hybrid approach to cloud. Microsoft Azure has developer tools for all platform services targeting web and mobile, Internet of Things, Microservices, and Data + analytics, Identity management, Media streaming, High Performance Compute and Cognitive services. These platform services all utilize core infrastructure of compute, networking, storage and security. The Azure resource manager has multiple resources, role based access control, custom tagging and self-service templates.The compute services are made more agile with the offerings from a VM infrastructure, VM scale sets infrastructure, Container service orchestration and batch/Job orchestration. Container infrastructure layering allows even more scale because it virtualizes the operating system.Azure is an open cloud because it supports open source infrastructure tools  such as  Linux, ubuntu, docker, etc. layered with databases and middleware such as hadoopredismysql etc., app framework and tools such as nodejs, java, python etc., applications such as Joomla, drupal etc and management applications such as chef, puppet, etc. and finally with devops tools such as jenkinsGradleXamarin etc. Azure involves a lot of fine grained loosely coupled micro services Microservices can be stateful or stateless and can be deployed in a multi-cloud manner.  
The Paas platform of Azure can span Azure and AWS both. It can occupy on-Premise, GCP and others as well. As a PaaS offering, this platform enables development and debugging using API, IDE and CI/CD interface. 
The web apps written using Azure stack can handle mission-critical load that scales because it has builtin auto scale and load balancing and high-availability with auto-patching. It enables continuous deployment with a variety of source control and supports a variety of applications. It is tightly integrated with Xamarin which is loved by developers and trusted by enterprise.  
Writng APIs is a breeze if we have the framework already. We can just publish, manage, secure and analyze our APIs in minutes. We secure the API with Active Directory, single sign-on and OAuth and generate client-proxies or APIs in the language of our choice. Similarly enterprise API can be mashed up and integrated with API management and Logic Apps.  
Instead of APIs we can also use serverless apps that help process events. These are cloud scale event handlers and they can scale with customer demand so that the pay is on a usage basis. All this involves is to write functions in C#, Node.js, Python, PHP and schedule event-driven tasks across services.  These functions are exposed as HTTP API endpoints, are fully open source and run on serverless infrastructure.  
Serverless means that there are no underlying servers which means we don't have to do OS patching or management. Applications are built of event handlers which makes it easy to connect services and components.  There is micro-billing involved which pays for execution at very short time increments with significant cost efficiencies.  
Containers, serverless and Microservices are different forms of computing. A container packages an exe or a jar. Serverless dictates the operational/cost model.  Microservices are a 3-tier  model involving a thin client SOA and pub/sub and provides a development architecture. 

Micro-serverless, simple cloud platform and service access usually involves callers/events, serverless microservices, and platform. The core compute is provided by Batch, Container Service, VM Scale sets and virtual machines in that order. The Platform is provided by Azure functions, App Service, Service fabric and Cloud Services.
#codingexercise 
Find the maximum value of a node between two nodes in a BST.
Solution: Find the LCA between the nodes. Iterate through ancestors of the nodes upto LCA to find max
Node getLCA( node root, int n1, int n2)
{
If (root == null) return null;
If (root.data == n1 || root.data == n2) return root;
Int left = getLCA(root.left, n1, n2);
Int right = getLCA(root.right, n1, n2);
If (left && right) return root;
If (left) return left;
If (right)return right;
Return null;

}
int GetMaxBetween(Node root, int n1, int n2)
{
Node lca = GetLCA(root, n1, n2);
return Math.max(GetMax(lca, n1), GetMax(lca, n2));
}


No comments:

Post a Comment