initial lots done
next step is to realize b/v
To bridge the gap between the contradicting goals of performance optimization and scalability, we believe a promising approach is to attempt to predict the network distance (i.e., round-trip propagation and transmission delay, a relatively stable characteristic) between hosts, and use this as a first-order discriminating metric to greatly reduce or eliminate the need for on-demand network measurements. Therefore, the critical problem is to devise techniques that can predict network distance accurately, scalably, and in a timely fashion.
Global Network Positioning (GNP) is a solution designed to achieve these goals. The key idea is to represent the complex structure of the Internet by a simple geometric space (e.g. an N-dimensional Euclidean space). In this representation, each host in the Internet is characterized by its position in the geometric space with a set of geometric coordinates. If the representation is accurate, then the easily computable geometric distances between hosts in this geometric space can accurately approximate the Internet network distances, and no actual network measurements are required. In extensive Internet experiments, we have found that by using a 7-dimensional Euclidean space, in 90% of the cases, GNP can predict the Internet distances among a globally distributed set of hosts with less than 50% error. The accuracy is even higher when the hosts are restricted to within a single Autonomous System.
excerpt from http://en.wikipedia.org/wiki/Anycast
Anycast is a network addressing and routing scheme whereby data is routed to the "nearest" or "best" destination as viewed by the routing topology.
The term is intended to echo the terms unicast, broadcast and multicast.
monitor ReadersWriters
condition OKtoWrite, OKtoRead;
int ReaderCount = 0;
Boolean busy = false;
procedure StartRead()
{
if (busy) // if database is not free, block
OKtoRead.wait;
ReaderCount++; // increment reader ReaderCount
OKtoRead.signal();
}
procedure EndRead()
{
ReaderCount-- ; // decrement reader ReaderCount
if ( ReaderCount == 0 )
OKtoWrite.signal();
}
procedure StartWrite()
{
if ( busy || ReaderCount != 0 )
OKtoWrite.wait();
busy = true;
}
procedure EndWrite()
{
busy = false;
If (OKtoRead.Queue)
OKtoRead.signal();
else
OKtoWrite.signal();
}
Reader()
{
while (TRUE) // loop forever
{
ReadersWriters.StartRead();
readDatabase(); // call readDatabase function in monitor
ReadersWriters.EndRead();
}
}
Writer()
{
while (TRUE) // loop forever
{
make_data(&info); // create data to write
ReaderWriters.StartWrite();
writeDatabase(); // call writeDatabase function in monitor
ReadersWriters.EndWrite();
}
}