The PNRP cache does not adequately take network proximity (locality) of nodes into account when adding one or more (e.g., most) entries to the cache, and when routing messages in the global cloud. A message routed through H hops will, on average, travel half of the topological width of the cloud for each hop. If the network latency for such a hop is k seconds, this results in the resolve requiring 2*H*k seconds to traverse the network, as it must travel roughly the same path as a RESOLVE and a RESPONSE. Retransmits and local processing time are also factors in the overall RESOLVE time. In addition to increasing latency, the existing cache strategy results in greater internet-wide traffic than required. Messages on average are traversing half the internet on each hop. Accordingly, there is a need in the art to dramatically reduce in-transit time for PNRP resolution requests by applying locality metrics to all cache selection operations. The same scheme will encourage PNRP traffic to stay as local as possible, significantly reducing load on the internet as a whole.
In view of the foregoing, a method and computer product are provided for a host node in a computer network to determine its coordinates in a d-dimensional network space, comprising discovering an address of a peer node in the network, measuring network latency between the host node and the peer node, determining whether network latency has been measured for at least d+1 peer nodes, where, if network latency has not been measured for at least d+1 peer nodes, estimating the network coordinates of the host node, and where, if network latency has been measured for at least d+1 peer nodes, calculating the network coordinates of the host node using d+1 measured latencies. In one embodiment, the host node communicates with the peer node using peer-to-peer name resolution protocol (PNRP), and the address is a PNRP certified peer address. The certified peer address may include network coordinates for the peer node.
In another embodiment, the d-dimensional network space is a seven dimensional network space. Estimating the network coordinates may be performed using the Downhill Simplex method. Yet another embodiment may comprise discovering a new peer node, measuring network latency between the host node and the new peer node, and recalculating the network coordinates of the host node base on the measured network latency of the new node. Still another embodiment may comprise determining that the network coordinates of the host node and incorrect, discarding the network coordinates of the host node, selecting a subset of known peer nodes, measuring network latency between the host node and the subset of known peer nodes and recalculating the network coordinates of the host node using measured network latency.
Additional features and advantages of the disclosed subject matter are made apparent from the following detailed description of illustrative embodiments that proceeds with reference to the accompanying figures.
The accompanying drawings illustrate several aspects of the disclosed subject matter, and together with the description serve to explain the principles of the disclosed subject matter. In the drawings:
Turning to the drawings, wherein like reference numerals refer to like elements, the disclosed subject matter is illustrated as being implemented in a suitable computing environment. The following description is based on embodiments of the disclosed subject matter and should not be taken as limiting the disclosed subject matter with regard to alternative embodiments that are not explicitly described herein.
In the description that follows, the disclosed subject matter is described with reference to acts and symbolic representations of operations that are performed by one or more computing devices, unless indicated otherwise. As such, it will be understood that such acts and operations, which are at times referred to as being computer-executed, include the manipulation by the processing unit of the computing device of electrical signals representing data in a structured form. This manipulation transforms the data or maintains them at locations in the memory system of the computing device, which reconfigures or otherwise alters the operation of the device in a manner well understood by those skilled in the art. The data structures where data are maintained are physical locations of the memory that have particular properties defined by the format of the data. However, while the disclosed subject matter is being described in the foregoing context, it is not meant to be limiting as those of skill in the art will appreciate that the various acts and operations described hereinafter may also be implemented in hardware.
An example of a networked environment in which the disclosed subject matter may be used will now be described with reference to
The disclosed subject matter is operational with numerous other general-purpose or special-purpose computing system environments or configurations. Examples of well known computing systems, environments, and configurations that may be suitable for use with the disclosed subject matter include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The disclosed subject matter may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The disclosed subject matter may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer-storage media including memory-storage devices.
With reference to
The computer 110 typically includes a variety of computer-readable media. Computer-readable media can be any available media that can be accessed by the computer 110 and include both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer-readable media may include computer storage media and communication media. Computer storage media include both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for the storage of information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer 110. Communication media typically embody computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and include any information-delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired media such as a wired network or direct-wired connection and wireless media such as acoustic, RF, infrared, and other wireless media. Combinations of the any of the above should also be included within the scope of computer-readable media.
The system memory 130 includes computer storage media in the form of volatile and nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within the computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and program modules that are immediately accessible to or presently being operated on by the processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
A user may enter commands and information into the computer 110 through input devices such as a keyboard 162 and a pointing device 161, commonly referred to as a mouse, trackball, or touch pad. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 120 through a user input interface 160 that is coupled to the system bus 121, but may be connected by other interface and bus structures, such as a parallel port, game port, or a universal serial bus. A monitor 191 or other type of display device is also connected to the system bus 121 via an interface, such as a video interface 190. In addition to the monitor 191, the computer 110 may also include other peripheral output devices such as speakers 197 and a printer 196 which may be connected through an output peripheral interface 195.
The computer 110 operates in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device, or other common network node and typically includes many or all of the elements described above relative to the personal computer 110 although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the personal computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160 or other appropriate mechanism. In a networked environment, program modules depicted relative to the personal computer 110, or portions thereof, may be stored in the remote memory storage device 181. By way of example, and not limitation,
In one embodiment, the locality module 200 is a DLL that provides a utility routine used by the cloud manager 210 to generate the node's locality data, which is propagated with its CPA. The locality module 200 also provides a utility routine used by the cache manager 220 to measure relative locality between the node and any other node for which it has locality data. The locality module 200 further provides a utility routine for validating locality data received from other nodes, and for providing PNRP with information on the locality module.
Locality is inversely proportional to latency. In other words, the lower the latency between two nodes, the more local they are considered. In accordance with one embodiment, each locality-aware node assigns itself coordinates in a 7-dimensional space, based upon coordinates of other locality-aware nodes and measured latencies between itself and those nodes. In various embodiments, the number of dimensions for locality calculation may be between 7 and 12. Dimensionality of the coordinate space is configurable, but uniform throughout the cloud. To uniquely fix coordinates in a space of dimensionality d, a node requires d+1 data points.
Locality-aware nodes include their coordinates in ‘locality data’ whenever transmitting their CPA. They also propagate coordinates whenever transmitting the CPA of other locality-aware nodes. Non-locality-aware nodes are able to propagate locality coordinates they receive, since the coordinates will be either part of the CPA, or an additional message field which by default PNRP propagates without modification. Whenever evaluating a CPA for locality, the distance between the local node and the node publishing the CPA is estimated using simple Cartesian distance in the coordinate space. If each node's location estimate is relatively accurate, locality-based caches are constructed without requiring a probe to cached entries.
When bootstrapping, a new node adds a field to the SOLICIT specifying that it prefers locality-aware CPA's from the seed node's cache. The resulting ADVERTISE, when created by a node which understands locality, will specify which of the advertised CPA's include locality information. A locality-aware node attempts to obtain CPAs for at least d+1 locality-aware nodes to accurately estimate its position in network space, where d is the dimensionality of the coordinate space. However, the node may make preliminary estimates when it has less data, to facilitate cloud bootstrapping. This estimate is refined over time, so it is acceptable for the first estimate to be rough.
Suppose a node C is bootstrapping. If it is the first node in the cloud, it sets its coordinates to the origin—[32767, 32767, . . . , 32767] in a space using unsigned shorts for coordinates. Otherwise it performs coordinate estimation as follows. As each new CPA (from the bootstrap process) is received, the new node probes the CPA publisher to estimate latency. In one embodiment, the probe is an INQUIRE/AUTHORITY exchange. In another embodiment, the probe is a transport ‘ping.’ The probe results are stored along with the CPA. In order to minimize the impact of network irregularities on position estimation, at least three probes are performed.
For the first d+1 pieces of locality data the node receives, it refines its locality coordinates based on the new information. The node makes an initial estimate of its network location. In one embodiment, coordinate estimation is performed using the Downhill Simplex algorithm, a well-known simplex method for function minimalization. In other embodiments, an equivalent minimalization method may be used. If the calculation is under-constrained, Downhill Simplex will still result in a potential set of solutions corresponding to a hyperplane satisfying the known locality constraints. The locality module then chooses an arbitrary solution on this hyperplane. This will not adversely affect locality calculations, as it corresponds to selecting a rotation of potential solution coordinate spaces satisfying the known constraints. In the degenerate case (no other locality-aware nodes), a node places itself at the origin of the coordinate space.
Over time a node learns about new locality-aware nodes, and culls or replaces some locality-aware entries in its cache. The node may perform an INQUIRE to estimate latency between itself and the other node. The measured latency is stored along with earlier probe results, allowing the node to periodically refine its estimated position in the coordinate space. Additional data points help to produce more accurate results over time.
After a major change in cloud topology, it may be necessary to reset the coordinate estimates. Coordinate estimate reset can be triggered by the following conditions:
Coordinate estimate reset is performed by re-measuring latency to a select subset of the cache. Latency is measured to the leafset as a “random location” subset, and to the closest (in terms of locality) nodes in the cache, usually kept in the top cache level. If additional measurements are required, they can be made to nodes contained in the second highest and second lowest cache levels, etc. The new coordinate calculations are made against at least d+1 nodes, and preferably more (such as 2d nodes) to improve accuracy. After calculating the new coordinates, sum of squares error between estimated and measured distances for the new calculations and the old calculations are compared for d+1 nodes. If the new error is similar to or less than the old error, coordinates for the space are still valid, and the new estimate should be used.
If the error is significantly greater, some of the coordinates used for coordinate estimation are most likely wrong, and therefore there has been a network or coordinate space reshaping. The new estimate is retained, and a timer is initiated to reset coordinates after a random interval, for example 180 to 300 seconds. During that interval, the local node receives updated CPAs from other nodes, which gives it a new pool of nodes to calculate coordinates against.
Locality relies upon having a cache containing nearby nodes. Establishing and maintaining such a cache requires changes to cache entry replacement logic. A cache replacement method for locality aware nodes follows. At step 1, a new CPA for a node X is received by a node C. At step 2, C compares X to active cache levels to determine which local cache level L X belongs in. Each cache level can hold up to 10 entries. It is divided into a ‘left’ and ‘right’ side (or hemisphere) of five entries each. Entries which are less than X modulo 2256 go in the left hemisphere, and entries which are greater than X modulo 2256 go in the right hemisphere. At step 3, C determines which hemisphere H node X belongs in. At step 4, if level L hemisphere H has at least one open slot, or is a lowest cache level, then no replacement is necessary, and the entry is added to the cache. Otherwise, follow the replacement algorithm to select an entry in L, H to replace.
At step 5, node C calculates the “ideal slot” for X in the cache, and finds the cached entry in L, H which is closest to occupying that slot. At step 6, node C checks to see whether H is trusted. If so, the new entry is discarded unless X is also trusted. At step 7, node C checks to see whether H or X have IPv6 address aggregators in common with the local node. If so, and those aggregators are not TEREDO addresses, then the common prefix is a stronger metric than latency, and the appropriate cache entry will be retained/added. If both H and X are equally preferred in terms of aggregator, node C proceeds to step 8. At step 8, node C acquires the measured round trip distance D for both H and X. If this distance is missing for either, but locality information is available, node C calculates the locality distance D of node X from node C. If insufficient information is available for this calculation, node C treats node X as further than all other cache entries with locality information.
At step 9, node C compares the locality distance D to the locality distance of the selected cache entry. Node C then caches the entry with the smaller distance at step 10. If probabilistic replacement is desired, probability can be generated depending upon relative locality distance of node X and the selected cache entry from node C. This approach significantly simplifies cache replacement.
A method of changing PNRP to include a locality-aware framework is presented. Those of ordinary skill in the art will understand that the locality mechanism described in this specification may be implemented without PNRP, or with a different peer name resolution protocol.
The foregoing description of various embodiments of the disclosed subject matter has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the disclosed subject matter to the precise embodiments disclosed. Numerous modifications or variations are possible in light of the above teachings. The embodiments discussed were chosen and described to provide the best illustration of the principles of the disclosed subject matter and its practical application to thereby enable one of ordinary skill in the art to utilize the disclosed subject matter in various embodiments and with various modifications as are suited to the particular use contemplated. All such modifications and variations are within the scope of the disclosed subject matter as determined by the appended claims.
This application is a continuation of U.S. patent application Ser. No. 12/883,346, filed on Sep. 16, 2010, entitled “SYSTEM AND METHOD FOR IMPLEMENTING PNRP LOCALITY” and U.S. patent application Ser. No. 11/072,525, filed on Mar. 7, 2005, entitled “SYSTEM AND METHOD FOR IMPLEMENTING PNRP LOCALITY,” at least some of at least one of which may be incorporated herein.
Number | Date | Country | |
---|---|---|---|
Parent | 12883346 | Sep 2010 | US |
Child | 13632664 | US | |
Parent | 11072525 | Mar 2005 | US |
Child | 12883346 | US |