Napster 💫

Tharunravuri
3 min readSep 3, 2020

--

Before learning about Napster I would like to get you familiar with the peer to peer systems(P2P).

Peer to Peer Systems: P2P systems are computers(peers) connected through the internet and shares the files between them. In P2P systems there is no central server and the peers itself can act as both client and server in the network.

One of the greatest example in the P2P system is Napster. Napster works on the principle of the P2P system. Napster is an online music service that uses a P2P architecture where the user can download songs from the other peer by establishing a connection through the internet.

Architecture of Napster

Architecture of Napster

The above figure describes the architecture of Napster.

The peers or client machines needed to run an application called Napster for communicating with peers in the network. The files that you store in your Napster client application will be stored in your local pc or local workstation and the files don’t store at the server.

The green circles in the above figure are the client machines or peers. The red circles indicate the servers. As I said earlier the server doesn’t store files instead it stores the directory information of files(filenames with peer pointers).

The directory information that included in the server is a Tuple — <file name, ip_address, port number>. Servers store tuples, not files.

Working of Napster:

Napster GUI

When a peer wants to fetch a file by using Napster:

  1. The user in the network enters a keyword and enter the find it option. The query will be sent to the connected server for finding relevant information.
  2. The servers in the network check for the relevant keyword and they communicate with each other and will send the list of relevant information to the connected peer as a response.

The servers stores the directory information in the ternary tree (a sorted dictionary data structure)structure.

3. The list will be sent to the querying peer with all attributes like file name, file size, frequency, length, user, connection and also ping.

4. As soon as the querying peer gets the list, the peer selects the best host out of the list, pings it and download the file from the host.

All the messages will be transferred under the TCP socket and use the TCP protocol.

The pictorial representation of the working of Napster application is given below:

Working of Napster

Even though Napster was a great example for P2P systems. There were some complications raised.

  1. Centralizes server a source of congestion — If the centralized server was overwhelmed with the queries then the server will be congested with the queries and the server will slows down the process of sharing.
  2. Centralized server single point of failure — As the server is a centralized part of network. If there is any failure with in the server in the network then the entire network goes down.
  3. No Security — The intial Napster application has no security measurements and the messages and passwords are in plain text.
  4. Copyright violation — Napster was responsible for users copyright violation.

But Gnutella 🍫some how resolved al the complications and emerged as the best P2P system. Will discuss about it in the next blog post.

See you in the next blog post 👈

--

--