148
//2 P2P-arch: arbitrary end systems directly comunicate. Peer request service from other peers, provide service in return to other peers. self scalability: new peers bring new service capacity. Process: program running within a host. Client process: process that initiates communication. Server process: process that waits to be contacted. Sockets: process sends/receives messages to/from. Identifier: receive messages. Includes both IP and port. App-layer prot: types of messages exchanged, message syntax, message semantics, rules, open protocols. Transport service: data integrity, timing, throughput, security. TCP service: reliable transport, flow control, congestion control, does not provide timing minimum throughput. connection oriented. UDP service: unreliable data transfer. does not provide what TCP has. HTTP(TCP) client initiates TCP connection to server, server accpets TCP, HTTP message, TCP connection closed. HTTP is “stateless”-server maintains no information about past client requests. RTT: time for a small packet to travel from client to server and back. HTTP response time(non): One RTT to initate TCP connection. HTTP(P): requests 2 RTTs per object. Post method: web page often includes form input. Input is uploaded to server. URL method: uses GET, whole path can be bookmarked. Cookies(uses): authorization, shopping carts, recommendations. How to keep state: protocol endpoints:maintain state at sender,receiver over multiple transcactions. http messages carry state. Web caches: satisfy client request without involving origin server. Reduce response time to client. SMTP: uses persistent connections, requires message to be 7bit. Comparison to HTTP: HTTP – pull, SMTP-push, both have ASCII command.response, HTTP: each object encapsulated in its own response message. SMTP – multiple objects sent in multipart message. Domain name system: distributed database implemented in heirarchy of many name servers. Application layer protocol- hosts, name servers communicate to resolve names.
//1 Packet switching: hosts break app-layer messages into packets. Store and forward: entire packet ust arrive at router before it can be transmitted on next link. Queuing and loss: if arrive rate(bits) to link exceeds transmission rate of link for a period of time. Routing: determines source-destination route taken by packets. Forwarding: move packets from router’s input to appropriate router output. Packet loss: queue (buffer) preceding link in buffer has finite capacity. packet arriving at full queue dropped. Throughput: rate (bits/time unit) at which bits transferred between sender/receiver. Instantaneous: rate at given point in time. Why layering: explicit structure allows identification, relationship of complex system’s pieces. Modularation eases maintenance, updating of system. Internet prot. stack: application – supporting network applications, transport – process-process data transfer, network – routing of datagras from source to destination, link-data transfer between neighboring elements, physical- bits on wire. Presentaiton: allow applications to interpret meaning of data. Session: synchronizaiton, checkpointing, reocvery of data exchange. Communication: peers assume that they are communicating horizontally.