

Visualizing how BitTorrent works. - hiteshiitk
http://mg8.org/processing/bt.html

======
jasonkester
I get tired of making this same comment on every Canvas-based thing anybody
builds, but if they'd taken the 30 seconds it took to write that paragraph
about how it doesn't work in IE, and instead used it to paste in the following
snippet of HTML, it would _actually work_ in Internet Explorer:

<!--[if IE]><script type="text/javascript"
src="/excanvas.js"></script><![endif]-->

Like, IE5 even. Internet Explorer has had vector graphics since 1999, and it
overlaps 90% with Canvas (which came out several years later).

<http://excanvas.sourceforge.net/>

~~~
jessriedel
From the author's tone, it seemed clear to me that this was a case of him
having an axe to grind rather than being actually stymied by a serious
deficiency. Not particularly constructive.

~~~
ugh
_“Works in pretty much any modern browser except IE (because IE doesn't have
support for the <canvas> tag).”_

Please explain to me where “tone“ is hiding in that sentence. I don’t see it.
There is nothing at all judgmental about it. It’s matter of fact, I don’t even
see so much as a word or phrase that could in any way be construed as a snide
remark directed at IE. I can’t find any possible interpretation that would
hint at any kind of axe the author might have to grind. Context doesn’t help,
either.

The actual tone might help but the author sadly doesn’t provide an audiobook
version of the webpage.

(Snap judgments. This is why we can’t have nice things.)

~~~
jessriedel
First: yikes.

Second: It's context. There's no need to talk about deficiencies of browser on
a page trying to illustrate bittorent. He could have just said "does not work
with IE".

------
zokier
While beautiful, I don't think it illustrates BitTorrent very well. Data
doesn't just magically flow to clients, it needs to be coordinated and/or
negotiated somehow. Data integrity is also somewhat important aspect of
BitTorrent, every piece that client receives is verified against the .torrent
file.

~~~
vdm
Does this mean that the tracker isn't included at all? I think you're right.

How would you visualise verifying integrity? Is that really necessary to
visualise?

~~~
smackfu
I think you could only cover that by visualizing the path of a single chunk.
Showing that the client asks the tracker who has it, then asks the other peer
if they are willing to provide it, then receiving the separate blocks and
checking the integrity and blacklisting the peer if necessary. Then
advertising that you have that chunk to other peers.

To me, that is the more interesting side of BitTorrent, compared to what the
linked visualization is showing, which is just that "peers get stuff from
peers that already have it, then once they have it, provide it to other
peers."

~~~
wmf
The tracker doesn't know which peers have what data; "have" messages are used
for that.

------
jessriedel
This could use some concurrent data plots showing, say, the number of new bits
being received (by anyone). Would be especially useful when comparing the same
visualization for traditional file transfers, to show what's special about
BitTorrent.

------
seldo
So pleased to see this restored! It's one of the best process visualizations
I've ever seen. It's not "this is what the data means", it's "this is how an
algorithm works in practice". It looks organic and there are subtleties (like
the fact that the rainbow-coloured segments correspond to the data line
flowing to each peer, and that the sizes of blobs on the line represent
transfer speeds) that you can grasp later without distracting from the initial
"aha!" moment.

------
slashclee
I've updated the page so that it works properly in IE9, at least (all I had to
do was add the <!doctype html> header at the beginning, and that seems to be
good practice anyway, so I have no issue with it).

I have no way to test IE7 or IE8 at this point, and I don't like the idea of
adding code that I can't test. If someone wants to volunteer their time to
help me test those browsers with excanvas, I'm willing to give it a shot.

------
maushu
I think it's buggy. Some peers don't get data at all.

~~~
maukdaddy
Sounds like 50% of my experience with BT. Of course, that's probably Comcast's
fault.

------
moe
Beautiful!

~~~
corin_
Upvoted from 0 because I agree - beautiful as a mini demonstration, not as in
"look at the lovely image!"

~~~
Natsu
It's the sort of thing that would make a cool screen saver.

------
codex
From the visualization, it doesn't appear that BitTorrent uses a spanning tree
to reduce the bandwidth load on ISPs. When will we see true application level
multicast for P2P?

~~~
wmf
IETF ALTO is working (slowly) on P2P localization. It's tricky because what it
good for the ISPs is not necessarily good for users; I would rather download
from a FTTH peer in Sweden than from a cable modem next door. Ultimately, ISPs
can save much more from P2P caching than from localization.

------
donaq
This actually runs pretty smoothly on my Milestone's default browser. Colour
me impressed. It did not run well on Opera Mini though.

------
smackfu
That uses a full core on my laptop.

~~~
slashclee
It's definitely a CPU hog. I'm not really an expert at debugging javascript
performance issues, but if anybody has some suggestions on how to make it more
efficient, I'm all ears.

~~~
seanalltogether
Canvas drawing is still horribly slow, especially vector draws.

<http://www.craftymind.com/guimark2/>

