The client-server model firmly distinguishes the roles of the client and server.Under this model,the client requests services that are provided by the server.The peer-to-peer model doesn’t have such strict roles.In fact,all nodes in the system are considered peers and thus may act as either clients or servers-or both.A node may request a service from another peer,or the node may in fact provide such a service to other peers in thes ystem.
For example,let’s consider a system of nodes that share cooking recipes.Under the client-server model,all recipes are stored with the server.If a client wishes to access a recipe,it must request the recipe from the specified server.Using the peer-to-peer model,a peer node could ask other peer nodes for the specified recipe.The node(or perhaps nodes)with the requested recipe could provide it to the requesting node.Notice how each peer may act as both a client(i.e.it may request recipes)and as a server(it may provide recipes.)