Multicast Bittorrent Protocol

Document Sample
Multicast Bittorrent Protocol Powered By Docstoc
					                              Multicast Bit torrent Protocol

       We use SCRIBE to do our application.

        The user who first has the file creates new groups for every piece of the file. This
then becomes the sender initially. [Each group has a topic (group identifier) of filename
concatenated with the piece id].
        The users who want the file join the group filename concatenate with piece id 0
first. When ever a user joins a group it multicasts “Join <Node ID >”.
        If the group is 0 then the user will receive information about the file [number of
pieces and file size]. Depending on the number of pieces it will join each of the group.

Source Selection Algorithm
      For every tree we select a source by the following method:
          1) Initially the user who uploads the file is the source.
          2) There is a source selection timer for every multicast tree.
          3) When the timer goes to zero or the source is leaving the tree (This is
              known when the user presses the close button), the source appoints the
              new source by a voting mechanism described below
          4) The current source multicast “Vote Request”.
          5) The nodes in the tree which have the piece respond with the “The duration
              since the last upload”. Nodes that are sources on a different tree send a
              negative number to indicate that they are not willing to be the source in
              this tree [The current source waits for a time limit for the votes to arrive].
          6) The current source then decides the source that has the largest duration
              since the last upload and informs him to act as the source.

Worst Case Scenario:
               The current source quits forcibly (either by the user without pressing the
      close button or a system crash).
               A newly joined user waits a time limit and if it doesn’t receive the piece
      within the time interval, multicasts asking who is the current source.
               If the source is present it will reply with his id saying that the source is
      alive. If the user doesn’t receive a reply within a given time interval then the user
      initiates the source selection algorithm (only points 3, 4, and 5 of the algorithm)

Source Multicast Piece:
      The below method describe when and how the source multicasts the piece.
             There is another timer called send-timer maintained by the source.
      Whenever the timer goes off and there is at least one new member, (which can be
      determined by the “Join” multicast by the user) the source multicasts the piece.

Shared By: