Patent ID: 8520535

Claim:
A method, comprising: identifying available lenders and existing networks within a vicinity of a borrower; selecting an optimization technique for completing a task of the borrower; calculating, for a plurality of network options, a value for completing the borrower's task according to the optimization technique; and selecting an optimum network option to complete the borrower's task, wherein the plurality of network options includes forming a heterogeneous network composed of both a peer-to-peer network and a multiplexed network, wherein the borrower's task comprises one of an upload and a download of the at least one file, and further comprising dividing the at least one file into parts and distributing the parts among the lenders of the selected optimum network option for the one of uploading or downloading, and reassembling the parts of the at least one file after the one of the upload and the download; and identifying the borrower as a new borrower; wherein, when the new borrower selects minimizing time as the optimization technique, the method further comprises selecting a number of the available lenders for the calculating, which comprises calculating an amount of time for each network option to complete the borrower's task; and wherein, for the heterogeneous network, the method further comprises: ranking the number of available lenders according to their available bandwidth; based on the ranking, assigning lower bandwidth available lenders of the number of available lenders to a multiplexer in a multiplexed bandwidth sharing ad hoc network; and based on the ranking, assigning the remaining available lenders of the number of available lenders to form a peer-to-peer bandwidth sharing ad hoc network.