Thursday, May 4, 2017

A comparision of Container Service from public clouds:
      Both AWS and Azure now provide Container Services where applications can be modified to run in containers. AWS container service is built upon  ACS is based on Mesos which is an open-source container orchestration system. ECS does not monitor Containers at a fine grained level but ECS has integrated containers with CloudWatch. With Cloud watch, we can monitor all activities of resources. AWS supports only Linux containers and not Microsoft containers.  Container Service is bound with native data services. So the containers are not yet portable. Google and Microsoft use Kubernetes but in different ways. Their container service comes with automated upgrade and repair. Kubernetes laid more emphasis on container orchestration and management and little emphasis on automated upgrades and repairs. So this is complimentary to the Container Service offerings.
Container images are pulled in from container registries which may exist within or outside the AWS infrastructure. Images are typically built from a Docker file. To prepare the applications to run on the Amazon ECS, ECS provides tasks which maps applications to containers along with container definitions. Each task is the instantiation of Container instance within the cluster. An ECS agent is installed per cluster.
Azure provides an integrated container experience from application  development standpoints. Applications can be published to docker and actions can be taken on the containers without ever having to leave the IDE. Directly from the Windows marketplace, users can now deploy a Windows Server 2016 with docker engine installed and container feature enabled. Even a vm can be created on the localhost hyper-V to act as the container host. Both Docker and the Powershell can be used to interact with the containers.
Public cloud adoption of container services is emerging so it is picking up speed but not as much in comparision to the virtual machine services. This is a trend that is also seen with private clouds. Some of the trends seen with private cloud are actually quite relevant to study user habits. These trends include the following:
Compute users and application developers are increasingly divergent. The former require single instances of compute with a specific environment –OS, flavor and version while the latter are generally favoring clusters and containerization.
Individual instances of compute no longer matter where they are carved from. Users do not distinguish between Linux Host Containers, Virtual machines hosted on Openstack or Virtual machines hosted on VMWare.
Application developers prefer clustering with load balancing to host their application backing services such as databases which are therefore going to shared volumes between nodes versus dedicated storage or clusters in the organization
OS containerization enables the possibility of seamlessly moving users and their compute resources over regions and networks



#codingexercise
1) If we are given a list of stations and distances between them, can we find the all pairs shortest distance ? 
Yes,  Floyd-Warshall's method gives shortest path weighs matrix This algorithm computes the shortest path weights in a bottom-up manner. It exploits the relationship between a pair of intermediary vertices and the shortest paths that pass through them. If there is no intermediary vertex, then such a path has at most one edge and the weight of the edge is the minimum. Otherwise, the minimum weight is the minimum of the path from I to j or the path from I to k and k to j. Thus this algorithm iterates for each of the intermediary vertices for each of the given input of an N*N matrix to compute the shortest path weight. 
dij with no intermediary vertices  =  edge weight 
        = min(dij-at-(k-1) , dik-at-(k-1) + djk-at-(k-1)) when # intermediary vertices k >=1 
  
D for k be a new nxn matrix initialized with the node to itself distance 
for k = 1 to n 
   for I = 1 to n 
      for j = 1 to n 
         dij(k) = min(dij(k-1), dik(k-1) + dkj(k-1)) 
  
return Dn

No comments:

Post a Comment