P2P system: Napster

Napster structure

client machines之所以叫peers是因为对于server来说这些machines是平等对待的

当你upload一首歌曲如PennyLane.mp3时,它不会上传到别的地方而是存在你的machine(运行了napster client的machine)里面

Servers是由Napster.com运行的,这些servers保存的是目录信息(file pointers和peer pointers)

当Napster client运行时,它先连接napster servers(如上张图片所示的server与client之间的直线),然后client upload a list files it wants shares.

然后server保存list of tuples(如上图所示),server不保存文件。

Napster的一些操作

client将它需要查找的keyword发送给所连接的server,然后a group of server talk with each other查找它们的目录信息list,找到所有符合的pairs,然后将这些pairs发送给那个client, client接收到list,ping each of the hosts in the list来查找这些host传输文件的带宽.当你点击其中的一个item时,client开始fetch the file from the peer.

Servers在这里面所起的作用不是传输文件,而是查找文件的location.

message使用的是TCP协议(一种可靠的传输协议)

Napster Search

Peers是如何加入P2P system的?它们怎么知道应该contact哪个server

Servers都有IP addresses,这些servers的IP地址可能会发生改变,所以你想要一个well-known URL(如对于napster来说是napster.com).当一个client start up,它给这个URL发送一个DNS(domain name system) 查询,返回一个IP地址(a Napster server),然后这个peer开始与这个特定的napster server对话。

在其它的一些P2P system中,DNS可能返回a well-known server(这个server维护着一些最近加入的peers的IP地址),或者返回已经在system中的一个peer的ip address

DNS是一种很好的introduced方式,告诉新加入的peer一些最近加入的peers的信息或者已经在system中的peers的信息,这样这个新加入的peer就可以使用它们来建立neighbor list

这个技术不仅仅用在Napster中用于新加入的peer来know about一个或多个servers;还用在后来的Gnutella system,用于新加入的peer来know about一些已经在系统中的peers.

一些问题

centralized of congestion:如果servers are overload with queries即使它们并不传输文件,但这些queries 却overwhelm它们,然后整个系统会变慢,查询也变慢

centralized of failure:如果一台或几台server挂掉的话,整个系统将受到牵连

No security:最初版本的Napster并没有security

以上的这些原因不是Napster bring down的原因,它真正bring down的原因是法院(版权问题),napster帮助users indirectly侵犯版权(indirectly infringement)。napster落没了,Gnutella发展起来,并且解决了一些上面的problems

原文地址:https://www.cnblogs.com/yan2015/p/4907135.html