Multicast in P2P

Ideas for ADC may be presented here for others to review and point out flaws or further improve the idea.
Forum rules
If you have an account on the wiki, remember to update the ADC Proposals page for new ideas.

http://dcbase.org/wiki/ADC_Proposals_list
Pietry
Senior Member
Posts: 328
Joined: 04 Dec 2007, 07:25
Location: Bucharest
Contact:

Multicast in P2P

Post by Pietry » 27 Jul 2010, 08:00

Today I tried to do a little digging about the usage of IP multicast in p2p networks. Multicast is way to send IP packets towards more clients at a glance. The advantages are:
  • Less connections to peers
  • Send just one packet instead of n ( n clients )
  • Traffic congestion avoided
  • More stress for switches/routers not stations
In this thesis the idea is to create a special torrent protocol that implements multicast and allows multicast packets across the network.
My questions is : is it possible to do a similar multicast downloading in DC networks? And if so how this can be integrated the easiest way in our current framework ?
If this could be implemented ( for clients supporting it), it would be a great way of improving download speeds, flexibility, usability and so forth.
I am waiting for your feedback.

Best regards,
Pietry
Just someone

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Multicast in P2P

Post by cologic » 27 Jul 2010, 11:12

Main concerns:
  • How well multicast works on the Internet, rather than on their simulated network.
  • How to adapt DC to such usage without simply rendering it as a variant of BitTorrent (in BT all peers on a given torrent want approximately the same set of bits, so multicast works well; one would have to find similar sets of peers for DC). Maybe StrongDC++'s DHT functions like this; I'm not sure.

Toast

Re: Multicast in P2P

Post by Toast » 27 Jul 2010, 11:51

Small moderator comment: Moved this since its not really news more ideas to the proper forum :)

Pietry
Senior Member
Posts: 328
Joined: 04 Dec 2007, 07:25
Location: Bucharest
Contact:

Re: Multicast in P2P

Post by Pietry » 27 Jul 2010, 13:05

cologic wrote:Main concerns:
  • How well multicast works on the Internet, rather than on their simulated network.
Multicast is already implemented in video streamcast, it should work quite well in p2p I guess :)
cologic wrote: [*]How to adapt DC to such usage without simply rendering it as a variant of BitTorrent (in BT all peers on a given torrent want approximately the same set of bits, so multicast works well; one would have to find similar sets of peers for DC). Maybe StrongDC++'s DHT functions like this; I'm not sure.[/list]
StrongDC already has "give while take" eg while downloading also you upload to people who are downloading same file.
This could be extended to ip multicast packets.
Just someone

Big Muscle
Junior Member
Posts: 39
Joined: 01 Jul 2008, 19:27

Re: Multicast in P2P

Post by Big Muscle » 30 Jul 2010, 12:04

Just a question - what is the probability that 2 different nodes will require the same bytes in the same time? If I understand it correctly, then multicast can be used only in this specific situation.

Pietry
Senior Member
Posts: 328
Joined: 04 Dec 2007, 07:25
Location: Bucharest
Contact:

Re: Multicast in P2P

Post by Pietry » 30 Jul 2010, 13:20

Big Muscle wrote:Just a question - what is the probability that 2 different nodes will require the same bytes in the same time? If I understand it correctly, then multicast can be used only in this specific situation.
Lets say user X has file F.
5 users are downloading from X.
Users ask X for specific portion of file.
In the case when this portions overlaps, X will multicast the common parts first from F to all 5 users.

This is not quite a regular situation but perhaps some enhancements can be made to improve parallelism of uploading, perhaps using multicast.
Just someone

Quicksilver
Member
Posts: 56
Joined: 17 Aug 2009, 21:32

Re: Multicast in P2P

Post by Quicksilver » 01 Aug 2010, 13:44

No ISP should support Multicast!

I do know of no ISP yet that allows to use IP multicast.... like home ip ranges such packages should/are just discarded...

Ergo IP multicast only works in LAN -> Thesis is at most of theoretic intrest / has no practical application beyond the LAN...

Pietry
Senior Member
Posts: 328
Joined: 04 Dec 2007, 07:25
Location: Bucharest
Contact:

Re: Multicast in P2P

Post by Pietry » 02 Aug 2010, 09:48

Quicksilver wrote:No ISP should support Multicast!

I do know of no ISP yet that allows to use IP multicast.... like home ip ranges such packages should/are just discarded...

Ergo IP multicast only works in LAN -> Thesis is at most of theoretic intrest / has no practical application beyond the LAN...
How are video streamings done then ? Do they use some kind of VPN ?
IIRC live videos use multicast...
Just someone

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Multicast in P2P

Post by cologic » 02 Aug 2010, 17:13

Big Muscle wrote:Just a question - what is the probability that 2 different nodes will require the same bytes in the same time? If I understand it correctly, then multicast can be used only in this specific situation.
One can, in principle, use forward error correction in this situation. Bram Cohen has discussed this though in response to people asking him why BitTorrent doesn't use FEC and he points out that it' has its own unpleasant tradeoffs.

andyhhp
Junior Member
Posts: 30
Joined: 18 Feb 2010, 17:44
Location: England

Re: Multicast in P2P

Post by andyhhp » 05 Aug 2010, 09:41

Seeing as I have just studied this topic, I feel I should contribute a bit.

Multicast in general requires 2 steps. First is the negociation whereby one computer advertises itself as being a multicast source, and N other computers "subscribe" to the source. (see http://en.wikipedia.org/wiki/Internet_G ... t_Protocol). This does not have a trivial overhead cost in terms of setting up, and each time a sink computer joins or leaves, there is an overhead when the routing tree is re-evaluated. The second is actually sending the data which is easy when the routing tree has been established.

ISPs generally prevent multicast sources inside their network as it gets them into financial problems with other peer'd ISPs (think: i send a single multicast packet out of my ISP which gets multiplied 10 times in the next ISP. The next ISP charges my ISP for 10x traffic but it cant charge me for 10 times traffic as I only used 1 packet). Increasingly however, ISPs are allowing multicast sinks inside their network as it allows them to charge extra for the privelage.

Most multicast data is like UDP - its stateless with no flow/error control mechanisms. If a packet gets dropped at any point, the sink has no way of informing the source. This isnt a problem with video/audio streams where you are sure the next packet will be along soon, and it doesnt affect the end viewer too much if you miss a few miliseconds of the stream. They are going to ignore it and continue watching.

There is a protocol called Pragmatic General Multicast which adds TCP-like error control, but is not an official standard yet, and in unlikely to be supported in modern routers. The error control relys on routers 'playing nice' and adds a significant overhead to the source and sink computers in question (linear degredation in terms of packets lost).


Overal, it is my oppinion that multicast is not a viable option for DC, even if ISPs fully implemented and allowd it. It is unlikely that more than 2 or 3 clients are going to need exactly the same bytes off the source at exactly the same time. With conventional tcp based sharing, the connection can expand to saturate the connection. However, with multicast, the speed has to be bounded by the slowest link to any of the sink computers, limiting its effectiveness at transmitting (you really really dont want to be doing error control due to the overhead).

Locked