Patent ID: 7076553

Claim:
A method of assembling a file in response to a request from a user sent to a first node in a network having a plurality of connected nodes, comprising: determining, based on the request, which content components are necessary to assemble the file; if all content components are not present at the first node, sending a search request to determine which other nodes have content components; receiving, from said other nodes, replies to said search request, each reply from a responding node indicating which content components are available from said responding node; determining a desired set of at least one node from which to download the content components; downloading the content components from the desired set, wherein the downloading further includes creating, at said first node, a process representing a request for a content component from at least one node having the content component, creating, at said first node, a plurality of processes, each process representing a request for a content component from one of said plurality of nodes, associating a flag with each content component to be downloaded, said flag indicating whether an associated content component has already been downloaded, had not been downloaded or is currently being downloaded, associating a unique sequence number with each flag, in response to one of said plurality of processes reading said flag to determine whether said associated content component has already been downloaded, incrementing said sequence number and passing said incremented sequence number to said reading process, in response to a request by said reading process to modify said flag to indicate that said associated content component is currently being downloaded, comparing said incremented sequence number passed to said reading process to said incremented sequence number associated with said flag, if said incremented sequence number passed to said reading process matches said incremented sequence number associated with said flag, accepting said modification to said flag, and if said incremented sequence number passed to said reading process does not match said incremented sequence number associated with said flag, rejecting said modification to said flag, wherein race conditions are avoided when more than one process attempts to download the same content component; and assembling the file from the downloaded content components.