Upload
kaushikamit1991
View
236
Download
0
Embed Size (px)
Citation preview
8/3/2019 Peer 2 Peer Architecture
1/13
Peer 2 peer architecture
Peer-to-peer (P2P) computing or networking is a distributed application architecture that
partitions tasks or workloads among peers. Peers are equally privileged, equipotent participantsin the application. They are said to form a peer-to-peer network of nodes.
Peers make a portion of their resources, such as processing power, disk storage or networkbandwidth, directly available to other network participants, without the need for centralcoordination by servers or stable hosts.[1] Peers are both suppliers and consumers of resources, incontrast to the traditional clientservermodel where only servers supply (send), and clientsconsume (receive).
The peer-to-peer application structure was popularized by file sharing systems likeNapster. Theconcept has inspired new structures andphilosophies in many areas of human interaction. Peer-to-peer networking is not restricted to technology, but covers also socialprocesses with a peer-to-peer dynamic. In such context,social peer-to-peer processesare currently emerging
throughout society.
Architecture of P2P systemsPeer-to-peer systems often implement an abstract overlay network, built at Application Layer, ontop of the native or physical network topology. Such overlays are used for indexing and peerdiscovery and make the P2P system independent from the physical network topology. Content istypically exchanged directly over the underlying Internet Protocol (IP) network. Anonymouspeer-to-peersystems are an exception, and implement extra routing layers to obscure the identityof the source or destination of queries.
Instructuredpeer-to-peer networks, peers (and, sometimes, resources) are organized followingspecific criteria and algorithms, which lead to overlays with specific topologies and properties.They typically use distributed hash table-based (DHT) indexing, such as in the Chordsystem(MIT).[2]
Unstructured peer-to-peernetworks do not impose any structure on the overlay networks. Peersin these networks connect in an ad-hoc fashion[3]. Ideally, unstructured P2P systems would haveabsolutely no centralized system, but in practice there are several types of unstructured systemswith various degrees of centralization. Three categories can easily be seen.
Inpure peer-to-peersystems the entire network consists solely ofequipotent peers. Thereis only one routing layer, as there are no preferred nodes with any special infrastructurefunction.
Hybrid peer-to-peersystems allow such infrastructure nodes to exist, often called
supernodes.[4]
In centralized peer-to-peersystems, a central server is used for indexing functions and tobootstrap the entire system. Although this has similarities with a structured architecture,the connections between peers are not determined by any algorithm.
The first prominent and popularpeer-to-peer file sharingsystem, Napster, was an example of thecentralized model.[5]Freenet and early implementations of the gnutellaprotocol, on the other
http://en.wikipedia.org/wiki/Client%E2%80%93serverhttp://en.wikipedia.org/wiki/Client%E2%80%93serverhttp://en.wikipedia.org/wiki/Napsterhttp://en.wikipedia.org/wiki/Philosophyhttp://en.wikipedia.org/wiki/Interactionhttp://en.wikipedia.org/wiki/Interactionhttp://en.wikipedia.org/wiki/Socialhttp://en.wikipedia.org/wiki/Socialhttp://en.wikipedia.org/wiki/Social_peer-to-peer_processeshttp://en.wikipedia.org/wiki/Social_peer-to-peer_processeshttp://en.wikipedia.org/wiki/Social_peer-to-peer_processeshttp://en.wikipedia.org/wiki/Societyhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Internet_Protocolhttp://en.wikipedia.org/wiki/Anonymous_P2Phttp://en.wikipedia.org/wiki/Anonymous_P2Phttp://en.wikipedia.org/wiki/Distributed_hash_tablehttp://en.wikipedia.org/wiki/Chord_(peer-to-peer)http://en.wikipedia.org/wiki/Chord_(peer-to-peer)http://en.wikipedia.org/wiki/Massachusetts_Institute_of_Technologyhttp://en.wikipedia.org/wiki/Ad-hochttp://en.wiktionary.org/wiki/equipotenthttp://en.wikipedia.org/wiki/Peer-to-peer_file_sharinghttp://en.wikipedia.org/wiki/Peer-to-peer_file_sharinghttp://en.wikipedia.org/wiki/Freenethttp://en.wikipedia.org/wiki/Gnutellahttp://en.wikipedia.org/wiki/Gnutellahttp://en.wikipedia.org/wiki/Client%E2%80%93serverhttp://en.wikipedia.org/wiki/Napsterhttp://en.wikipedia.org/wiki/Philosophyhttp://en.wikipedia.org/wiki/Interactionhttp://en.wikipedia.org/wiki/Socialhttp://en.wikipedia.org/wiki/Social_peer-to-peer_processeshttp://en.wikipedia.org/wiki/Societyhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Internet_Protocolhttp://en.wikipedia.org/wiki/Anonymous_P2Phttp://en.wikipedia.org/wiki/Anonymous_P2Phttp://en.wikipedia.org/wiki/Distributed_hash_tablehttp://en.wikipedia.org/wiki/Chord_(peer-to-peer)http://en.wikipedia.org/wiki/Massachusetts_Institute_of_Technologyhttp://en.wikipedia.org/wiki/Ad-hochttp://en.wiktionary.org/wiki/equipotenthttp://en.wikipedia.org/wiki/Peer-to-peer_file_sharinghttp://en.wikipedia.org/wiki/Freenethttp://en.wikipedia.org/wiki/Gnutella8/3/2019 Peer 2 Peer Architecture
2/13
hand, are examples of the decentralized model. Modern gnutella implementations,Gnutella2, aswell as the now deprecated Kazaa network are examples of the hybrid model.
A pure P2P network does not have the notion ofclientsor servers but only equalpeernodes thatsimultaneously function as both "clients" and "servers" to the other nodes on the network. Thismodel of network arrangement differs from theclientservermodel where communication is
usually to and from a central server. A typical example of a file transfer that does not use the P2Pmodel is the File Transfer Protocol (FTP) service in which the client and server programs aredistinct: the clients initiate the transfer, and the servers satisfy these requests.
The P2P overlay networkconsists of all the participating peers as network nodes. There are linksbetween any two nodes that know each other: i.e. if a participating peer knows the location ofanother peer in the P2P network, then there is a directed edge from the former node to the latterin the overlay network. Based on how the nodes in the overlay network are linked to each other,we can classify the P2P networks as unstructured or structured.
Unstructured systems
An unstructured P2P network is formed when the overlay links are established arbitrarily. Such
networks can be easily constructed as a new peer that wants to join the network can copyexisting links of another node and then form its own links over time. In an unstructured P2Pnetwork, if a peer wants to find a desired piece of data in the network, the query has to beflooded through the network to find as many peers as possible that share the data. The maindisadvantage with such networks is that the queries may not always be resolved. Popular contentis likely to be available at several peers and any peer searching for it is likely to find the samething. But if a peer is looking for rare data shared by only a few other peers, then it is highlyunlikely that search will be successful. Since there is no correlation between a peer and thecontent managed by it, there is no guarantee that flooding will find a peer that has the desireddata. Flooding also causes a high amount of signaling traffic in the network and hence suchnetworks typically have very poor search efficiency. Many of the popular P2P networks areunstructured.
Inpure P2P networks: Peers act as equals, merging the roles of clients and server. In suchnetworks, there is no central server managing the network, neither is there a central router. Someexamples of pure P2P Application Layernetworks designed forpeer-to-peer file sharingaregnutella (pre v0.4) and Freenet.
There also exist hybridP2P systems, which distribute their clients into two groups: client nodesand overlay nodes. Typically, each client is able to act according to the momentary need of thenetwork and can become part of the respectiveoverlay networkused to coordinate the P2Pstructure. This division between normal and 'better' nodes is done in order to address the scalingproblems on early pure P2P networks. As examples for such networks can be named modernimplementations of gnutella (after v0.4) and Gnutella2.
Another type of hybrid P2P network are networks using on the one hand central server(s) orbootstrapping mechanisms, on the other hand P2P for their data transfers. These networks are ingeneral called 'centralized networks' because of their lack of ability to work without their centralserver(s). An example for such a network is theeDonkey network(often also called eD2k).
Advantages and weaknessesIn P2P networks, clients provide resources, which may includebandwidth, storage space, andcomputing power. This property is one of the major advantages of using P2P networks because it
http://en.wikipedia.org/wiki/Gnutellahttp://en.wikipedia.org/wiki/Gnutella2http://en.wikipedia.org/wiki/Gnutella2http://en.wikipedia.org/wiki/Kazaahttp://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Peer_group_(computer_networking)http://en.wikipedia.org/wiki/Peer_group_(computer_networking)http://en.wikipedia.org/wiki/Client%E2%80%93serverhttp://en.wikipedia.org/wiki/Client%E2%80%93serverhttp://en.wikipedia.org/wiki/File_Transfer_Protocolhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Floodhttp://en.wikipedia.org/wiki/Correlationhttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Peer-to-peer_file_sharinghttp://en.wikipedia.org/wiki/Peer-to-peer_file_sharinghttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Gnutella2http://en.wikipedia.org/wiki/Gnutella2http://en.wikipedia.org/wiki/EDonkey_networkhttp://en.wikipedia.org/wiki/EDonkey_networkhttp://en.wikipedia.org/wiki/EDonkey_networkhttp://en.wikipedia.org/wiki/Bandwidth_(computing)http://en.wikipedia.org/wiki/Gnutellahttp://en.wikipedia.org/wiki/Gnutella2http://en.wikipedia.org/wiki/Kazaahttp://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Peer_group_(computer_networking)http://en.wikipedia.org/wiki/Client%E2%80%93serverhttp://en.wikipedia.org/wiki/File_Transfer_Protocolhttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Floodhttp://en.wikipedia.org/wiki/Correlationhttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Peer-to-peer_file_sharinghttp://en.wikipedia.org/wiki/Overlay_networkhttp://en.wikipedia.org/wiki/Gnutella2http://en.wikipedia.org/wiki/EDonkey_networkhttp://en.wikipedia.org/wiki/Bandwidth_(computing)8/3/2019 Peer 2 Peer Architecture
3/13
makes the setup and running costs very small for the original content distributor. As nodes arriveand demand on the system increases, the total capacity of the system also increases, and thelikelihood of failure decreases. If one peer on the network fails to function properly, the wholenetwork is not compromised or damaged. In contrast, in a typical clientserver architecture,clients share only their demands with the system, but not their resources. In this case, as moreclients join the system, fewer resources are available to serve each client, and if the central serverfails, the entire network is taken down. The decentralized nature of P2P networks increasesrobustness because it removes thesingle point of failurethat can be inherent in a client-serverbased system.[11]
Another important property of peer-to-peer systems is the lack of a system administrator. Thisleads to a network that is easier and faster to setup and keep running because a full staff is notrequired to ensure efficiency and stability. Decentralized networks introduce new security issuesbecause they are designed so that each user is responsible for controlling their data andresources. Peer-to-peer networks, along with almost all network systems, are vulnerable tounsecure and unsigned codes that may allow remote access to files on a victim's computer oreven compromise the entire network. A user may encounter harmful data by downloading a filethat was originally uploaded as a virus disguised in an .exe, .mp3, .avi, or any other filetype. Thistype of security issue is due to the lack of an administrator that maintains the list of files beingdistributed.
Harmful data can also be distributed on P2P networks by modifying files that are already beingdistributed on the network. This type of security breach is created by the fact that users areconnecting to untrusted sources, as opposed to a maintained server. In the past this has happenedto the FastTracknetwork when the RIAA managed to introduce faked chunks into downloadsand downloaded files (mostly MP3 files). Files infected with the RIAA virus were unusableafterwards or even contained malicious code. The RIAA is also known to have uploaded fakemusic and movies to P2P networks in order to deter illegal file sharing.[12]Consequently, the P2Pnetworks of today have seen an enormous increase of their security and file verificationmechanisms. Modern hashing, chunk verificationand different encryption methods have made
most networks resistant to almost any type of attack, even when major parts of the respectivenetwork have been replaced by faked or nonfunctional hosts.
There are both advantages and disadvantages in P2P networks related to the topic of data backup,recovery, and availability. In a centralized network, the system administrators are the only forcescontrolling the availability of files being shared. If the administrators decide to no longerdistribute a file, they simply have to remove it from their servers, and it will no longer beavailable to users. Along with leaving the users powerless in deciding what is distributedthroughout the community, this makes the entire system vulnerable to threats and requests fromthe government and other large forces. For example, YouTube has been pressured by the RIAA,MPAA, and entertainment industry to filter out copyrighted content. Although server-clientnetworks are able to monitor and manage content availability, they can have more stability in the
availability of the content they choose to host. A client should not have trouble accessing obscurecontent that is being shared on a stable centralized network. P2P networks, however, are moreunreliable in sharing unpopular files because sharing files in a P2P network requires that at leastone node in the network has the requested data, and that node must be able to connect to the noderequesting the data. This requirement is occasionally hard to meet because users may delete orstop sharing data at any point.
In this sense, the community of users in a P2P network is completely responsible for decidingwhat content is available. Unpopular files will eventually disappear and become unavailable as
http://en.wikipedia.org/wiki/Reliability_engineeringhttp://en.wikipedia.org/wiki/Reliability_engineeringhttp://en.wikipedia.org/wiki/Reliability_engineeringhttp://en.wikipedia.org/wiki/FastTrackhttp://en.wikipedia.org/wiki/RIAAhttp://en.wikipedia.org/wiki/MP3http://en.wikipedia.org/wiki/Hash_chainhttp://en.wikipedia.org/wiki/File_verificationhttp://en.wikipedia.org/wiki/File_verificationhttp://en.wikipedia.org/wiki/Reliability_engineeringhttp://en.wikipedia.org/wiki/FastTrackhttp://en.wikipedia.org/wiki/RIAAhttp://en.wikipedia.org/wiki/MP3http://en.wikipedia.org/wiki/Hash_chainhttp://en.wikipedia.org/wiki/File_verification8/3/2019 Peer 2 Peer Architecture
4/13
more people stop sharing them. Popular files, however, will be highly and easily distributed.Popular files on a P2P network actually have more stability and availability than files on centralnetworks. In a centralized network, only the loss of connection between the clients and server issimple enough to cause a failure, but in P2P networks, the connections between every node mustbe lost in order to fail to share data. In a centralized system, the administrators are responsiblefor all data recovery and backups, while in P2P systems, each node requires its own backupsystem. Because of the lack of central authority in P2P networks, forces such as the recordingindustry, RIAA, MPAA, and the government are unable to delete or stop the sharing of contenton P2P systems.
CLIENT-SERVER COMPUTING
client-server application is one in which a complex application is decomposed
into a part that runs on a server and one which runs on personal computers
(the clients). Besides doing part of the computing for the application, the PC
client provides a natural point and click graphical interface to the application.
ADVANTAGES OF CLIENT-SERVER
Advantages often cited include:
Centralization - access, resources, and data security are controlled
through the server
Scalability - any element can be upgraded when needed
Flexibility - new technology can be easily integrated into the system
Interoperability - all components (clients, network, servers) work
together
Accessibility - server can be accessed remotely and across multiple
platforms
Ease of application development
Lower total costs than mainframe legacy systems.
8/3/2019 Peer 2 Peer Architecture
5/13
User friendly - familiar point and click interface
DISADVANTAGES OF CLIENT-SERVER
Disadvantages often cited include:
Dependability - when the server goes
down, operations cease
Lack of mature tools - it is a relatively new
technology and needed tools are lacking
e.g.. Automated client software
distribution
Lack of scalability - network operating
systems (e.g.. Novell Netware, Windows NT
Server) are not very scalable.
Higher than anticipated costs
Can cause network congestion
CLIENT-SERVER ARCHITECTURES
There are basically two types of client-server
architectures
Two tier architectures
Three tier architectures
The choice between the two should be made
based on combination of:
8/3/2019 Peer 2 Peer Architecture
6/13
Schedule for project implementation
Expected system changes and
enhancements
TWO-TIER ARCHITECTURES
Application components are distributed
between the server and client software In addition to part of the application software,
the server also stores the data, and all data
accesses are through the server.
The presentation (to the user) is handled
strictly by the client software.
8/3/2019 Peer 2 Peer Architecture
7/13
The PC clients assume the bulk of the
responsibility for the application logic.
The server assumes the bulk of the
responsibility for data integrity checks, query
capabilities, data extraction and most of the
data intensive tasks, including sending the
appropriate data to the appropriate clients.
SQL is a standard used on the clients to
request appropriate subsets of data from the
server.
Data returned from the server to the clients is
manipulated by the client software for
reporting, business analysis, and what ifanalysis.
TWO-TIER ARCHITECTURES, ADVANTAGES
The commonly cited advantages of two-tier
systems include:
Fast application development time
Available tools are robust and lend
themselves to fast prototyping to insure
8/3/2019 Peer 2 Peer Architecture
8/13
user needs a met accurately and
completely.
Conducive to environments with
homogeneous clients, homogeneous
applications, and static business rules.
TWO-TIER ARCHITECTURES, DISADVANTAGES
The commonly cited disadvantages of two-tier
systems include:
Not suitable for dispersed, heterogeneous
environments with rapidly changing
business rules.
Because the bulk of the application logic is
on the client, there is the problem of client
software version control and new version
redistribution.
Security can be complicated because auser may require separate passwords for
each SQL server accessed.
8/3/2019 Peer 2 Peer Architecture
9/13
Client tools and SQL middleware in two-tier
environments tend to be proprietary.
The volatility of the client /server tool
market raises questions about the long-term viability of any proprietary tool.
Organizations should be wary about
committing to proprietary tools
THREE-TIER ARCHITECTURES
3-tier architectures attempt to overcome some
of the limitations of the 2-tier architecture by
8/3/2019 Peer 2 Peer Architecture
10/13
separating presentation, processing, and data
into 3 separate and distinct entities.
The software in the client handles the
presentation (to the user) using similar tools as
in the 2-tier architecture.
When data or processing are required by thepresentation client, a call is made to the
middle-tier functionality server.
8/3/2019 Peer 2 Peer Architecture
11/13
This tier performs calculations, does reports,
and makes any needed client calls to other
servers (e.g.. a data base server).
Middle tier servers are usually coded in a
highly portable, non-proprietary language such
as C or C++.
Middle tier servers may be multithreaded and
can be accessed by multiple clients.
The calling mechanism from client to server andfrom server to server is by means of RPCs
Because the bulk of 3-tier implementations use
RPCs and 2-tier implementations use SQL
messaging, a careful examination of the merits
of these respective request/response
mechanisms is warranted.
THREE-TIER ARCHITECTURES, ADVANTAGES
Commonly cited advantages include:
8/3/2019 Peer 2 Peer Architecture
12/13
RPC calls from the presentation client to
the middle tier provide greater generality
(i.e. flexibility) than the SQL calls usually
used in the 2-tier architecture.
The 3-tier clients do not have to understand SQL.
This allows the organization, names, or even the
overall structure of back end data to changes
without requiring changes in the PC-based
presentation clients. This allows clients to access
even non-relational databases and greatlysimplifies introduction of new database
technologies
Having separate functionality servers
allows for the parallel development of
individual tiers by application specialists.
Provides for more flexible resource
allocation. Can reduce network traffic by
having the functionality servers strip data
to the precise structure needed before
sending it to the clients.
Can use reusable program modules fordifferent applications, thus reducing
development and migration costs.
8/3/2019 Peer 2 Peer Architecture
13/13
3-tier standards such as OSF/DCE (Open
Software Foundation Distributed
Computing Environment) offers a variety of
features to support distributed applicationdevelopment.
THREE-TIER ARCHITECTURES, DISADVANTAGES
Often cited disadvantages of 3-tier
architectures include:
Creates an increased need for network
traffic management, server load balancing,
and fault tolerance.
Current tools are relatively immature andare more complex.
Maintenance tools are currently inadequate
for maintaining server libraries. This is a
potential obstacle for simplifying
maintenance and promoting code reuse
throughout the organization.