Sunday, July 15, 2018

We were discussing different types of query processing. We talked about this in context of P2P networks : both structured and unstructured.  We saw how Acquisitional Query Processing worked in this case.  A distributed structured P2P overlay application uses a distributed hash table over all the peers.  Data objects are assigned unique identifiers called keys which are chosen from the same identifier space. Keys are mapped to live peer on the overlay network  and create, update, delete and list operations are supported on a {key, value} pair.  Each peer maintains a small routing table for the addresses of its neighbors and their IDs. Recently there have been some attempts at standardization on the keybased routing KBR API abstractions and OpenHash - an open publically DHT service that helps with a unification platform. Unstructured P2P overlay systems are generally adhoc in nature. They do not present this opportunity to being unified under a common platform for application development. There are other ways to describe the differences between these networks such as with :
Decentralization which is a way to determine whether the overlay system is distributed.
Architecture to describe the overlay system in terms of its operations
LookupProtocol  which is used by the overlay system for queries
System Parameters which facilitate tuning of the system for various usages
Routing Performance where the lookup routing protocol performance can be meansured
Routing State where the state and the scalability of the overlay system can be compared.
Peers join and leave which describe the behaviour of the overlay system when rotations and churn occur.
Security which looks into the vulnerabilities of different implementations
Reliability and fault resiliency which examine how robust the overlay system is to faults.
With these measures, the networks may demonstrate  different scales of performance which help with their comparisions. For example, the addressing may even be provided at Internet-like scale. The Content-Addressable-Network is a distributed P2P infrastructure where a hash-table over the Internet enables it to be scalable, fault-tolerant and self-organizing.
#codingexercise
Find the minimum gap in an array. The largest gap is between the maximum and the minimum:
int GetMinGap(List<int> A)
{
A.sort();
int min = A.max() - A.min();
for(int i = 1; i < A.Count; i++)
    if (A[i]-A[i-1] < min)
        min = A[i] - A[i-1];
return min;
}

No comments:

Post a Comment