Fundamental of Computer Systems - Client-Server Architecture PDF

Document Details

SpellbindingSerpent360

Uploaded by SpellbindingSerpent360

National University of Science and Technology

2024

Gani Basheer Ahamed

Tags

client-server architecture computer systems networking internet protocols

Summary

This presentation covers fundamental concepts of client-server architecture. It explains the client-server programming model and the operations involved in client-server transactions. It also discusses client-server communications in networks including Ethernet and bridged LAN concepts.

Full Transcript

Fundamental of Computer Sysrems Client Server Architecture Prepared by: Gani Basheer Ahamed © Intel Lecture overview Client Server Programming Model Client-Server operations Client- Server communications in the network....

Fundamental of Computer Sysrems Client Server Architecture Prepared by: Gani Basheer Ahamed © Intel Lecture overview Client Server Programming Model Client-Server operations Client- Server communications in the network. 2 The Client-Server Programming Model Every network application is based on the client-server model. With this model, an application consists of a server process and one or more client processes. A server manages some resource, and it provides some service for its clients by manipulating that resource. For example, a Web server manages a set of disk files that it retrieves and executes on behalf of clients. An FTP server manages a set of disk files that it stores and retrieves for clients. Similarly, an email server manages a spool file that it reads and updates for clients 3 Operations A client-server transaction consists of four steps: 1. When a client needs service, it initiates a transaction by sending a request to the server. For example, when a Web browser needs a file, it sends a request to a Web server. 2. The server receives the request, interprets it, and manipulates its resources in the appropriate way. For example, when a Web server receives a request from a browser, it reads a disk file. 3. The server sends a response to the client and then waits for the next request. For example, a Web server sends the file back to a client. 4. The client receives the response and manipulates it. For example, after a Web browser receives a page from the server, it displays it on the screen. 4 Client-Server Model Figure 1 Client server model It is important to realize that clients and servers are processes and not machines, or hosts as they are often called in this context. A single host can run many different clients and servers concurrently, and a client and server transaction can be on the same or different hosts. The client-server model is the same, regardless of the mapping of clients and servers to 5 Network Clients and servers often run on separate hosts and communicate using the hardware and software resources of a computer network. 6 Figure2 Network hardware Ethernet  An Ethernet segment consists of some wires (usually twisted pairs of wires) and a small box called a hub, as shown in Figure 3. Ethernet segments typically span small areas, such as a room or a floor in a building.  Each wire has the same maximum bit bandwidth, typically 100 Mb/s or 1 Gb/s. One end is attached to an adapter on a host, and the other end is attached to a port on the hub. A hub slavishly copies every bit that it receives on each port to every other port. Thus, every host sees every bit.  Each Ethernet adapter has a globally unique 48-bit address that is stored in a non-volatile memory on the adapter. 7 Ethernet LAN Figur3 LAN Each Ethernet adapter has a globally unique 48-bit address that is stored in a non-volatile memory on the adapter. A host can send a chunk of bits called a frame to any other host on the segment. Each frame includes some fixed number of header bits that identify the source and destination of the frame and the frame length, followed by a payload of data bits. Every host adapter sees the frame, but only the destination host actually reads it. 8 Bridged LAN Figure 4 Bridged LAN 9 Internet Figure5 Internet 10 Client-Server communication Figure6 client Server communication 11 Client-Server communication Figure 6 shows an example of how hosts and routers use the internet protocol to transfer data across incompatible LANs. The example internet consists of two LANs connected by a router. A client running on host A, which is attached to LAN1, sends a sequence of data bytes to a server running on host B, which is attached to LAN2. There are eight basic steps: 1. The client on host A invokes a system call that copies the data from the client’s virtual address space into a kernel buffer. 2. The protocol software on host A creates a LAN1 frame by appending an internet header and a LAN1 frame header to the data. The internet header is addressed to internet host B. The LAN1 frame header is addressed to the router. It then passes the frame to the adapter. Notice that the payload of the LAN1 frame is an internet packet, whose payload is the actual user data. This kind of encapsulation is one of the fundamental insights of internetworking. 12 Client-Server 3. The LAN1 adapter copies the frame to the network. 4. When the frame reaches the router, the router’s LAN1 adapter reads it from the wire and passes it to the protocol software. 5. The router fetches the destination internet address from the internet packet header and uses this as an index into a routing table to determine where to forward the packet, which in this case is LAN2. The router then strips off the old LAN1 frame header, prepends a new LAN2 frame header addressed to host B, and passes the resulting frame to the adapter. 13 Client-Server 6. The router’s LAN2 adapter copies the frame to the network. 7. When the frame reaches host B, its adapter reads the frame from the wire and passes it to the protocol software. 8. Finally, the protocol software on host B strips off the packet header and frame header. The protocol software will eventually copy the resulting data into the server’s virtual address space when the server invokes a system call that reads the data. 14 Discussion Any Questions ? 15

Use Quizgecko on...
Browser
Browser