application architectures ppl Client-server Peer-to-peer( P2P) Hybrid of client-server and P2P uct by Weifeng Sun chapter 2-application layer 6/73
Introduct by Weifeng Sun chapter2- application layer 6/73 Application architectures • Client-server • Peer-to-peer (P2P) • Hybrid of client-server and P2P
Client-server architecture server. always-0 n host谷歌金永 在线主 permanent IP address server farms for scaling谷歌金山为扩大服务器群 clients communicate with server client/server may be intermittent!(间歇 地 connected may have dynamic IP addresses do not communicate directly with each other uct by Weifeng Sun chapter 2-application layer 7/73
Introduct by Weifeng Sun chapter2- application layer 7/73 Client-server architecture server: – always-on host(谷歌金山:永远 在线主机) – permanent IP address – server farms for scaling(谷歌金山:为扩大服务器群) clients: – communicate with server – may be intermittently(间歇 地)connected – may have dynamic IP addresses – do not communicate directly with each other client/server
Pure p2p architecture no always-on server Arbitrary任意的end systems directly peer-peer communicate peers are intermittently connected and change IP addresses Highly scalable(r扩展的but 2Dcult to manage uct by Weiteng Sun chapter 2-application layer 8/73
Introduct by Weifeng Sun chapter2- application layer 8/73 Pure P2P architecture • no always-on server • Arbitrary(任意的) end systems directly communicate` • peers are intermittently connected and change IP addresses Highly scalable(可扩展的) but difficult to manage peer-peer
Hybrid of client-server and P2P Skype voie-0Ver-IP(谷歌金山IP承载语)P2 P application centralized server finding address of remote party client-client connection: direct(not through server) Instant messaging chatting between two users is P2P centralized service: client presence detection/location user registers its IP address with central server when it comes online ser contacts central server to find IP addresses of buddies uct by Weifeng Sun chapter 2-application layer 9/73
Introduct by Weifeng Sun chapter2- application layer 9/73 Hybrid of client-server and P2P Skype – voice-over-IP(谷歌金山:IP承载语音) P2P application – centralized server: finding address of remote party: – client-client connection: direct (not through server) Instant messaging – chatting between two users is P2P – centralized service: client presence detection/location • user registers its IP address with central server when it comes online • user contacts central server to find IP addresses of buddies
Processes communicating Process: program running Client process: process within a host that initiates within same host. two communication processes communicate Server process:process using inter-process that waits to be communication(defined contacted by oS processes in different Note: applications with hosts communicate by P2P architectures have exchanging messages client processes server processes uct by Weiteng Sun chapter2-application layer 10/73
Introduct by Weifeng Sun chapter2- application layer 10/73 Processes communicating Process: program running within a host. • within same host, two processes communicate using inter-process communication (defined by OS). • processes in different hosts communicate by exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted • Note: applications with P2P architectures have client processes & server processes