Application architectures possible structure of applications: ■client-server peer-to-peer (P2P) Application Layer2-6
Application Layer2-6 Application architectures possible structure of applications: ▪ client-server ▪ peer-to-peer (P2P)
Client-server architecture server: ■always-on host permanent IP address data centers for scaling clients: communicate with server client/server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other Application Layer2-7
Application Layer2-7 Client-server architecture server: ▪ always-on host ▪ permanent IP address ▪ data centers for scaling clients: ▪ communicate with server ▪ may be intermittently connected ▪ may have dynamic IP addresses ▪ do not communicate directly with each other client/server
P2P architecture no always-on server peer-peer arbitrary end systems directly communicate peers request service from other peers,provide service in return to other peers self scalability-new peers bring new service capacity,as well as new service demands peers are intermittently connected and change IP addresses ·complex management Application Layer2-8
Application Layer 2 - 8 P2P architecture ▪ no always-on server ▪ arbitrary end systems directly communicate ▪ peers request service from other peers, provide service in return to other peers • self scalability – new peers bring new service capacity, as well as new service demands ▪ peers are intermittently connected and change IP addresses • complex management peer -peer
Processes communicating process:program running clients,servers within a host client process:process that within same host,two initiates communication processes communicate server process:process that using inter-process waits to be contacted communication(defined by OS) processes in different hosts communicate by exchanging aside:applications with P2P messages architectures have client processes server processes Application Layer2-9
Application Layer2-9 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 ▪ aside: applications with P2P architectures have client processes & server processes clients, servers
Sockets process sends/receives messages to/from its socket socket analogous to door sending process shoves message out door sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process application socket application controlled by process process app developer transport transport network network controlled link by OS Internet link physical physical Application Layer2-10
Application Layer2-10 Sockets ▪ process sends/receives messages to/from its socket ▪ socket analogous to door • sending process shoves message out door • sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process Internet controlled by OS controlled by app developer transport application physical link network process transport application physical link network process socket