The present invention relates generally to computing networks and relates more particularly to the expansion of peer-to-peer data transfer networks.
FIG. 1 is a schematic diagram of a network 100 of nodes (e.g., computing devices) interacting in a peer-to-peer (P2P) manner. Generally, a requesting node 101 sends a search message 105 (e.g., containing keywords relating to data that the requesting node 101 wishes to locate) to at least one intermediate node 111 in communication with the requesting node 101 via a peer connection. The intermediate node 111 receives the search message 105 and forwards the search message 105 to at least one additional node 111. Eventually, the search message 105 reaches at least one responding node 103 having the requested data (in some cases, the first intermediate node 111 to which the search message 105 is forwarded will also be a responding node 103). At least one responding node 103 then sends a response message 107 back to the requesting node 101, e.g., via the intermediate nodes 111. The requesting node 101 then requests the relevant data from a responding node 103 by connecting directly to the responding node 103, e.g., via direct connection 109.
In conventional P2P systems, messages including the search message 105 and the response message 107 have a limited time to live or hop count. That is, a message will expire once it has been forwarded to a predefined maximum number of nodes 101, 103 or 111. Thus, if the requesting node 101 generates a second search message having a time to live of four, and a node at which the requested data resides (e.g., node 113) is more than four “hops” away from the requesting node 101, the second search message will expire before the requested data is obtained. This problem can be reduced by increasing the search message's time to live or by increasing a number of peer connections per node; however, either will cause an increase in network traffic (the former increase being exponential due to the fan out nature of the network 100).
- SUMMARY OF THE INVENTION
Thus, there is a need in the art for a method and apparatus for efficiently expanding a P2P network.
BRIEF DESCRIPTION OF THE DRAWINGS
One embodiment of the present method and apparatus for efficiently expanding a P2P network includes receiving a search request message from a requesting node and sending a response message to the requesting node on behalf of a node that has the requested data, where the response message originates at an intermediate node. The intermediate node may respond on behalf of the “responding” node, for example, in cases where the responding node is too far away from the requesting node to receive the search request message.
So that the manner in which the above recited embodiments of the invention are attained and can be understood in detail, a more particular description of the invention, briefly summarized above, may be obtained by reference to the embodiments thereof which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments.
FIG. 1 is a schematic diagram of a network of nodes interacting in a peer-to-peer manner;
FIG. 2 is a flow diagram illustrating one embodiment of a method for efficiently expanding a P2P network, such as the network illustrated in FIG. 1; and
FIG. 3 is a high level block diagram of the network expansion method that is implemented using a general purpose computing device.
- DETAILED DESCRIPTION
To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures.
In one embodiment, the present invention is a method and apparatus for efficiently expanding a P2P network. Embodiments of the present invention make it possible for a requesting node on a P2P network to receive data from nodes that would normally be outside of the requesting node's “range” by enabling intermediate nodes to respond “by proxy” for the out-of-range nodes.
FIG. 2 is a flow diagram illustrating one embodiment of a method 200 for efficiently expanding a P2P network, such as the network 100 illustrated in FIG. 1. The method 200 may be implemented at, for example, any node (e.g., 101, 103, 111 or 113) on the P2P network 100. The method 200 is initialized at step 202 and proceeds to step 204, where the method 200 receives a search request message, e.g., from a peer (connected) node.
The method 200 then proceeds to step 206, where the method 200 examines the search request message and determines whether the receiver (e.g., the node at which the search request message was received in step 204) has the requested data. If the receiver has the requested data, the method 200 proceeds to step 208 and sends a response message over the network 100 back to the requesting node, e.g., in accordance with conventional P2P protocols. The method then proceeds to step 212 and checks a local database for other data potentially matching the search request message, as described in further detail below.
Alternatively, if the method 200 determines in step 206 that the receiver does not have the requested data, the method 200 proceeds directly to step 212 and checks a local database residing at the receiver. The database that is checked in step 212 comprises at least one entry containing information about a previous data transfer executed on the network 100 (e.g., in which data was transferred from a responding node to a requesting node). In one embodiment, this information includes at least one of a transferred data name, a description of the contents of the transferred data, the size of the transferred data, the type of data (e.g., an image file, and audio file, etc.), the time of the data transfer, a source of the transferred data (e.g., the network ID, address, port number or other form of identification for the responding node for the transfer), a number of hops separating the receiver from the responding node, or other meta data related to the response message sent prior to the actual transfer of data.
In one embodiment, the receiver saves the information about the previous data transfers from incoming response messages sent prior to the actual transfers of data. In particular, the receiver saves as much information from the response messages as is necessary to reconstruct the response messages as proxy responses, as described in further detail below. In some embodiments, all data contained in the response messages is saved. In this embodiment, the information saved in the database for a particular previous data transfer could be the entire response message corresponding to the data transfer.
In particular, in step 212, the method 200 determines whether there is an entry (e.g., a response message) in the database that matches or corresponds to the data requested in the search request message. Specifically, the method 200 determines whether the database includes an entry that indicates at least one node in the network 100 that has the requested data (e.g., the node may have responded to a previous request for the same data that is presently being requested). If no such database entry exists, the method 200 proceeds to step 218 and either forwards the search request message to the next node (e.g., if the search request message's time to live field has not yet expired), or discards the search request message (e.g., if the time to live field expired upon transmission to the receiver in step 204).
Alternatively, if the method 200 determines in step 212 that the database does contain an entry that corresponds to the data requested in the search request message, the method 200 proceeds to step 214 and further determines whether the search request message will reach the source of the corresponding database entry (e.g., the node that presumably has the requested data). In one embodiment, the method 200 examines the search request message's time to live field (which specifies how many more hops the search request message can make) or hop count field (which specifies how many hops have been made so far) and determines how far into the network the search request message will travel (e.g., what is the furthest node that the search request message will reach?). Thus, if the search request message can make x more hops, and if the source of the corresponding database entry is at least x+1 more hops from the receiver, the method 200 assumes that the search request message will not reach the source of the corresponding database entry.
If the method 200 determines in step 214 that the search request message will not reach the source of the corresponding database entry, the method 200 proceeds to step 220 and responds on behalf of the source of the corresponding database entry, e.g., as a proxy. In one embodiment, the method 200 responds on behalf of the source of the corresponding database entry by sending a response message from the receiver to the requesting node. The response message indicates that the source of the corresponding database entry has the data for which the requesting node is searching.
Alternatively, if the method 200 determines in step 214 that the search request message will reach the source of the corresponding database entry, the method 200 may do one of two things. In one embodiment, the method 200 simply forwards the search request message to the next node, e.g., in accordance with conventional P2P protocols.
In another embodiment, the method 200 may, in step 216, respond to the search request message on behalf of the source of the corresponding database entry even though the search request message will likely still reach source of the corresponding database entry. In this case, the method 200 may also discard the search request message (i.e., not forward the search request message further through the network) once the method 200 has responded to the requesting node. Responding on behalf of the source of the corresponding database entry in this case may be desirable to achieve faster responses to search request messages (e.g., a response is generated at an earlier node in the transmission path) or to reduce network traffic (e.g., by preventing the search request message from traveling further in the network once the source of the corresponding database entry has been identified). These benefits may be especially desirable in cases where a single, finite response is all that is needed to respond to a request for data (e.g., such as a query for a stock price).
The method 200 terminates in step 222. Those skilled in the art will appreciate that in some embodiments, the method 200 may actually execute in its entirety at the requesting node. That is, if the requesting node maintains its own database of previous response messages, the requesting node may, in fact, be able to identify a node that has the requested data simply by searching its own database in accordance with steps 210-222.
The method 200 as described above enables efficient expansion of P2P networks while only minimally increasing network traffic. By enabling one or more nodes in a P2P network to respond “by proxy” for other nodes in the network, the search space for a data request is effectively increased without actually sending the data request to additional nodes. Thus, unlike conventional P2P expansion methods that tend to result in a sometimes exponential increase in network traffic (e.g., by increasing either a search request message's time to live or a node's number of peer connections), the method 200 actually conserves traffic while at the same time “expanding” the network.
Those skilled in the art will appreciate that a node's database for storing information related to previous data transfers may be built according to a variety of criteria. For example, in one embodiment, a node may automatically save information every time a response message is received. In other embodiment, parameters such as available memory or storage, network bandwidth speed, network bandwidth utilization or a length of time for which the responding node has been active in the network may dictate whether a corresponding entry will be saved in the database. In further embodiments, the node may compare the received response message to existing database entries and create an entry for the received response message only if an entry does not already exist for the data to which the response message relates. Alternatively, if a database entry already exists for the relevant data, the received response message may be used to update information for the data (e.g., by creating a list of nodes that have the data or file).
Moreover, a database may be maintained based on a variety of criteria. For example, a node may specify that database entries will be kept according to a sliding time window (e.g., where information relating to only a fixed number of the most recent search responses is saved), a fixed number of the most or least popular data searches, or a length of time in which a responding node has been active in the network (e.g., a node may keep a subset of search response information for a number of responding nodes that have been active for the longest period of time).
In order to ensure the continued validity of database entries, a node may periodically query other nodes whose response messages have been entered in the database, e.g., to ensure that the nodes still have the relevant data. Alternatively, a responding node can assist in the management of database entries by adding a field to the response message that indicates for how long the search results will be valid (e.g., “This section of the live video stream will only be available for one day.”), or that indicates for how long the responding node has been active in the network.
In some embodiments, a requesting node may specify that it does not wish to receive proxy responses on behalf of out-of-range nodes (e.g., by stating so in the search request message). For example, the requesting node may expect to have its search satisfied by a nearby node (e.g., within a certain range). Alternatively, a requesting node may specify a hop count past which proxy responses are allowed (e.g., “No proxy responses until the nth hop.”), so that the closest peer nodes do not send proxy responses. Furthermore, the requesting node may set an age limit for proxy responses (e.g., “No proxy responses referring to database entries that are older than n days.”), in order to ensure the validity of proxy responses.
Conversely, a responding node may specify that it does not wish to have information concerning its response message saved (e.g., by stating so in the response message). For example, the responding node may want to limit its communication to only nearby nodes. Alternatively, the responding node may specify given points along the response message path at which information concerning the response message can be saved (e.g., “No saving past the nth hop.”), so that the only nodes within a certain range can save information concerning the response message.
FIG. 3 is a high level block diagram of the network expansion method that is implemented using a general purpose computing device 300. In one embodiment, a general purpose computing device 300 comprises a processor 302, a memory 304, a data transfer module 305 and various input/output (I/O) devices 306 such as a display, a keyboard, a mouse, a modem, and the like. In one embodiment, at least one I/O device is a storage device (e.g., a disk drive, an optical disk drive, a floppy disk drive). It should be understood that the data transfer module 305 can be implemented as a physical device or subsystem that is coupled to a processor through a communication channel.
Alternatively, the data transfer module 305 can be represented by one or more software applications (or even a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC)), where the software is loaded from a storage medium (e.g., I/O devices 306) and operated by the processor 302 in the memory 304 of the general purpose computing device 300. Thus, in one embodiment, the data transfer module 305 for efficiently expanding a P2P network described herein with reference to the preceding Figures can be stored on a computer readable medium or carrier (e.g., RAM, magnetic or optical drive or diskette, and the like).
Thus, the present invention represents a significant advancement in the field of data transfer networks. A method and apparatus are provided that make it possible for a requesting node on a P2P network to receive data from nodes that would normally be outside of the requesting node's range by enabling intermediate nodes to respond by proxy for the out-of-range nodes. Moreover, unlike conventional methods for expanding P2P networks, the method and apparatus of the present invention actually conserve network traffic while effectively expanding the search space for data requests.
While foregoing is directed to the preferred embodiment of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.