Thursday, February 9, 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.
 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.  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 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. 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
We now look at data platform. The purpose of this platform to interpret Data to gain intelligence so that it can guide actions. This transformation from data to actions is facilitated by layers of information management, big data stores, machine learning and analytics, and Intelligence services as well as dashboards and visualizations.  The data comes from sensors and devices, applications,  and other data sources.  The information management layer aggregates this data with data factory, data catalog, and event hubs.  The big data stores work with data lake store and SQL data warehouse.  Machine learning and analytics involves all insight applications such as those for machine learning, data lake analytics, HDInsight and stream analytics.
The Intelligence layer comprises of Cognitive services, Bot framework, and Cortana. The dashboard  usually involves Power BI.
The consumers for this data transformation to actions are people as well as apps and automated systems.
Azure Networking is divided into regions that include inside the Azure region, connecting Azure regions, and geographic reach and internet ecosystems. Its the latter two that the internet exchange provider spans.  The connections to the Azure region are made over Software defined WAN and optical networks or advanced MPLS services. The networking inside the Azure region already comes with security, performance, load balancing, virtual networks, cross-premises connectivity.
Azure now comes with accelerated networking that provides upto 25Gbps of throughput and reduces network latency up to 10x. Without accelerated networking, the policies were applied in software in the host. With accelerated networking, the policies are applied in hardware accelerators
#codingexercise
Check whether a BST has a dead end.
A dead end is an element after which we cannot insert any more element. It is a value x such that x+1 and x-1 exist. The BST contains positive integer values greater than zero which makes the value 1 an exception
bool HasDeadEnd(Node root)
{
if (root == null) return false;
var all = new List<Node> ();
ToInOrderList(root, ref all);
var leaves = GetLeaves(all); // during traversal, check if left and right are null for selecting a leaf
foreach (var leaf in leaves)
{
if (all.Contains(leaf.data -1) && all.Contains(leaf.data+1))
{
return true;
}
}
return false;
}
}
void ToInOrderList(Node root, ref List<node> all)
{
if (root == null) return;
ToInOrderList(root.left, ref all);
all.Add(root);
ToInOrderList(root.right, ref all);
}
List<Node> GetLeaves(List<Node> all)
{
all.Select(x => x.left == null && x.right == null).ToList();
}
Alternatively
void FindLeaves(Node root, ref List<node> leaves)
{
if (root == null) return;
FindLeaves(root.left, ref leaves);
if(root.left == null && root.right == null)
leaves.Add(root);
FindLeaves(root.right, ref leaves);
}

The order in which the leaves are enumerated depends on the order in which the traversal is done.

No comments:

Post a Comment