Tuesday, March 7, 2017

We continue with a detailed study of Microsoft Azure stack as inferred from an introduction of Azure by Microsoft. We reviewed some more features of Azure storage. We saw how erasure coding works in Windows Azure Storage aka WAS and how its different from Pelican. We saw what steps WAS takes to improve durability. We also saw the benefits of journaling. We reviewed the partition layer which translates objects such as blob, table or queue to storage. We saw how the partition manager maintains a massive Object Table that is sharded on different partition servers which maintain their consistency across concurrent transactions using a lock service. We read the partition layer data model and the supported data types and operations, the partition layer architecture and the range partition data structures. we reviewed the load balancing, split and merge operations. Then we reviewed the intrastamp and interstamp replication. We also took stock of TCO.
The throughput for applications increased linearly when the application increases the number of computing resources to access WAS objects. The throughput increases linearly upto eight VMs but tapers off as the network capacity is reached. For table operations, the batch puts offer about three times more throughput compared to single entity puts because of reduced network round trips and fewer stream writes.
 A variety of applications use WAS as cloud storage. Facebook and Twitter search for Bing uses WAS. The XBox GameSaves saves game data into the cloud for XBox users. Similarly the XBox telemetry services stores console generated diagnostics and telemetry information for later secure retrieveal and offline processing. Microsoft's Zune backend uses Windows Azure for media file storage and delivery and it stores files as Blobs. A comparision study of Blobs, tables and queues  was made for the applications in terms of requests, capacity, ingress and egress. Generally for these applications, 17.9%of all requests used Blobs, 46.88% used Tables and 35.22% used queues.



#codingexercise

Given a sequence of digits, find the number of subsequences that are divisible by m. 



Int GetCount(List<int> digits, int index, int rem, int m) 

Int count = 0; 
If ( digits.count == 0 || m == 0) return 0; 
//if (digits.toInt() < m) return 0; 
if (index == digits.count) return (rem == 0) ? 1 : 0; 
//if (IsDivisible(digits.ToInt(), m) count += 1; 
return GetCount(digit, index+1, rem, m) + GetCount(digits, index+1, (rem*10+digits[index]) %m, m); 

Enumerate all subsequences using combinations of lengths 1 to digits.count and their permutations if reordering requested and check each for divisibility. 
Void  Combine(ref string digits, ref stringbuilder b, int m, int start, int level, ref List<int> results) 

for (int I =start; I < digits.length; I++) 
 
   if (b[level] != digits[I]){ 
     b[level] = digits[i]; 
     If(IsDivisible(ToInt(b.toString()),m) 
     results.add(ToInt(b.toString())); 
if (I < digits.length) 
    Combine(ref digits, ref b, m, i+1, level+1); 
if (b[level] == digits[I]){ 
     b[level] = '/0'; 

}
Tests for divisibility can be taken as an interchangeable implementation.

No comments:

Post a Comment