Communication in Client–Server Systems-Operating Systems-Unit-2-20A05402T
Estimated read time: 1:20
Learn to use AI like a Pro
Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.
Summary
In this operating systems class episode taught by D Sumathi, the focus is on the communication mechanisms within client-server architectures. The lecture explains the basic architecture wherein multiple clients are connected to a server via the internet, detailing the process where a client requests a service from the server, which then responds appropriately. The session delves into three main communication types used in these systems: socket communication, Remote Procedure Call (RPC), and pipe communication. Each method is explained in terms of how messages and data are exchanged between clients and servers, ensuring secure and efficient operations. Key concepts such as the roles of ports, sockets, and procedural calls are thoroughly discussed. The lesson ends with an interactive question about marshalling and unmarshalling in RPC, inviting students to reflect and engage further with the topic.
Highlights
Introduction to client-server systems - a simple yet effective architecture involving multiple clients connected to a central server. 🌟
Socket communication involves using IP addresses and port numbers as endpoints to facilitate client-server interactions. 🔌
Exploration of well-known port numbers reserved for specific internet protocols crucial for web servers, FTP, and Telnet. 🌐
Remote Procedure Call (RPC) enables executing functions on a server as if they were local, fostering powerful client-server communication. 📞
Pipes are used for inter-process communication, allowing data to flow between producer and consumer processes efficiently. 🔄
Interaction through piping can be unidirectional or bidirectional but requires a shared parent process for operation. ➡️⬅️
Key Takeaways
Client-server architecture is fundamental to network communication, connecting multiple clients to a single server via the internet. 🌐
Understanding socket communication is crucial as it involves endpoints defined by IP addresses and port numbers, ensuring effective data exchange. 🖧
RPC simplifies communication by allowing a program to execute procedures on a remote server, mimicking local function calls. 🤖
Pipe communication facilitates data exchange between processes, using unidirectional or bidirectional piping to manage data flow. 📡
Well-known port numbers (0-1023) are reserved for specific services, ensuring reliable and standardized communication practices. 💼
Overview
Welcome, tech enthusiasts, to the world of client-server communications! 🖥️🤝 Imagine a bustling hub where multiple clients eagerly connect to a single powerhouse server over the wide expanse of the internet. In this class, D Sumathi breaks down the magic behind these connections, starting with the ever-reliable socket communication. Points of contact are crucial, which in tech terms means IP addresses and port numbers working together to create harmonious digital interactions.
Next stop: remote joyrides across server landscapes with Remote Procedure Calls! 🚀 Picture calling someone in a different country and having the conversation flow as if they were right next to you. That’s the magic of RPC—an amazing way to make distant digital cooperation feel familiar. By simulating local procedure calls on remote systems, RPC enhances flexibility in how services are invoked across networks.
Lastly, dive into the world of pipes, the unsung heroes of process communication! 🛠️ Whether it’s the dedicated flow of data from a producer to a consumer or the complex dance of bidirectional communication, pipes manage the back-and-forth with finesse. However, a shared parent process is a must-have for such interactions, making these connections family affairs. Understanding these three communication strategies equips you with a deep knowledge of what makes client-server systems tick.
Chapters
00:00 - 01:00: Introduction to Client-Server Communication The chapter introduces the basic concept of client-server communication. It describes the architecture where multiple clients connect to a server via the internet. The server hosts various services, and the communication process starts when a client sends a request to the server for a specific service.
01:00 - 06:00: Circuit Communication The chapter provides an overview of circuit communication, focusing on how service communication is structured to respond to clients. It introduces the concept of circuit communication and explores Remote Procedure Call (RPC) communication and pipe RPC in detail. RPC is explained as a method for executing a procedure in a different address space, emphasizing its role in remote service interaction. The summary indicates that each of these concepts will be explained individually in the chapter.
06:00 - 10:00: Socket Communication Example The chapter titled 'Socket Communication Example' explains the fundamental concept of client-server communication using sockets. It introduces the idea of circuits, defined as endpoints for communication between a client and a server process. The chapter likely covers how sockets are identified using IP addresses combined with port numbers, setting the stage for exploring socket communication in more detail.
10:00 - 19:00: Remote Procedure Call (RPC) Chapter 1: Remote Procedure Call (RPC)
This chapter delves into the components and operations of RPC, with a focus on port numbers and their special purposes. It explains the relationship between IP addresses and port numbers within server systems, highlighting the range from 0 to 1024 as reserved for well-known port numbers. These numbers are crucial for specific functions and protocols in network communications.
19:00 - 29:00: Pipe Communication In the chapter titled 'Pipe Communication', the focus is on the concept of reserved port numbers. Specifically, the chapter explains that there are 1023 reserved port numbers. Among these, port 23 is reserved for Telnet, port 21 for FTP (File Transfer Protocol), and port 80 for web servers or HTTP. When using a browser, the web server utilizes port 80 to handle client requests.
29:00 - 31:00: Conclusion and Questions The chapter titled 'Conclusion and Questions' discusses the server system's process of receiving client requests through a specified port, commonly using port 80 for HTTP protocol. It explains that these requests are often initiated by clients using browsers. Once the server receives the request from the client, it proceeds to accept the request.
Communication in Client–Server Systems-Operating Systems-Unit-2-20A05402T Transcription
00:00 - 00:30 hello friends welcome to today's operating system class and in this class we will see the communication in client server system and this is the very simple architecture of client server system here we are having more number of clients all the clients will be connected to the server through internet and all the services will be there in the server system first the client will give request to the server for any particular service requested to the server and the server
00:30 - 01:00 will provide that particular service to the client in the form of response response okay so this is the very simple architecture how this communication will be taken place here we are going to see the circuit communication and rpc communication and pipe rpc is nothing but remote procedure call okay let us see all these things one by one
01:00 - 01:30 the first one is communication using circuits first let us see what is circuit circuit is nothing but the end point for communication between two processes one process is in client and another process is in server okay this is the simple client server architecture for the socket communication here the socket is defined by ip address concatenated with the port number see up to this is ip address
01:30 - 02:00 and this one is port number port number okay and when come to the server system this is ip address and this is port number when come to port number 1024 port numbers are defined for some special purpose and those are called as well known port numbers that is 0 to
02:00 - 02:30 1023 port numbers are reserved port numbers okay here 23 is reserved for telnet and 21 is reserved for ftp that is fine transfer protocol and 80 is reserved for web server or http okay so if we use any browser then we are using this id port number that is for web server okay here the server receives clients request
02:30 - 03:00 this is the server system the server should receive the request from the client by specified port by specified port so normally the client can use browser browser hence http protocol is being used and port 80 is reserved for this okay and once the request is received from the client then the server will accept that request
03:00 - 03:30 and the connection from the client circuit will be established okay next the server implement the specific services through the through this particular circuit okay which may be either through telnet or through file transfer protocol or through the http hypertext transport protocol okay and listen to this well-known ports okay so the server will receive the
03:30 - 04:00 request only through well-known ports only through well-known course that is normally the browser so client how to use the browser or ftp or telnet for establishing the connections and it will give this request to only through that connections okay that is the circuit connection let us see one example for this in this diagram we are having two
04:00 - 04:30 systems first one is hostiac host x um the ip address for host x is 146.86.5.20 and this host x wanted to connect with the web server which ip address is this one that is 161.25.19.8 okay and the port number for this host x is 16.25 and for web server this is reserved for 80 because this is the web
04:30 - 05:00 server this is the web server hence 80 is reserved for this web server okay now the connection will consist of pair of circuits which are the pair of circuits this is the socket one and this is circuit that is client circuit and this is server circuit and from these two circuits connection will be established and the packets will be traveled between this connection okay the packets are traveling between
05:00 - 05:30 host are delivered to appropriate process based on the destination port number okay so 1625 is assigned for host x the port number is assigned for host tx and 80 is assigned for the web server here all the connections must be unique must be unique that is we have to assign a different port number for all the connections suppose if the host y which is wanted to
05:30 - 06:00 connect with the server that is the web server then we have to assign different port number to this particular um host that is host y other than 0 to 1023 okay so and we have we should not assign this uh 1625 here again because all the port are unique
06:00 - 06:30 and this ensures all connections consist of unique pair of circuits this is important the second one is remote procedure call which is another important and very powerful technique for communicating client and server systems okay and this is also known as function call our subroutine curve okay why it is called as function color
06:30 - 07:00 subroutine curve for example this is our main program it may be void main okay in our main program we are having some function called student details student details that may be start here to here and some programs are also here see if we call this student detail in between this main program then this
07:00 - 07:30 is the local procedure called not the remote procedural because the student detail function is available within the program itself within the system itself okay but when come to remote procedure call this function is available in some other system okay and we have tried to call that particular function from the client system okay so this is the
07:30 - 08:00 function call that is the procedure call we we have to call this procedure p with the parameter xyz with the parameter xyz then the server system will receive this particular request and it will return the return value p to the client okay return to this procedure result that is the return value to this client okay here
08:00 - 08:30 when a program causes a procedure to execute in different address space different address space means the procedure is available in the server system not in the client system okay but we have to code to call the procedure as a local procedure call without the details of remote interaction we simply call this particular procedure here the programmer how to write the same code whether the subroutine is local to this particular
08:30 - 09:00 program to executing or the subroutine may be available in the remote program okay this is important okay so this form of client server interaction implemented via request and response message passing system okay here we are passing only the messages between the client and the server the server will receive the message in the form of procedure call and the
09:00 - 09:30 client will receive the message in the form of result of this procedure here through this remote procedure called the client and server systems will be connected between each other okay so our pc protocol is available in the both end here this is the client system client system and this is server server system in this architecture five components are involved to sending message from the client to server
09:30 - 10:00 client to server here we are having the first one is client this is the client okay client and clients tab claim staff is here and rpc protocol which is used to connect between the client and system and second next one is server step and the last one is server server is here okay so to sending the message from client to server to sending the message from client to server five components
10:00 - 10:30 are involved [Music] and now let us see how the communication will be taken between the client system on the server system client system one server system as per this remote procedure call first the client sends the message to the client step say this is the client client send the message to client step and the client stop packs the message that is message with the parameters
10:30 - 11:00 message with the parameter that is the function parameter or procedure parameters then this is called as marshalling and that will be sent to the remote procedure call so what is the duty of client step client stub will pack the message with the parameter okay and that packed message sends to the remote procedure called protocol rpc protocol and step 3 is the rpc protocol
11:00 - 11:30 sends the packed message to rpc protocol of server see rpc protocol will transfer this message to the protocol of server system okay here and that will be given to servers tab the server step unpacks the message that is message plus parameter
11:30 - 12:00 the server system the server step will unpack the message and parameter and that argument list will be given to the server program next the server processes the message via several functions are subroutines and sends back to the server step okay again the value will be written to the server step here the server step again packs the message that is the
12:00 - 12:30 return value with the message okay plus message so this is called as smart selling again okay and that message backed message will be given to rpc protocol next day the server rpc protocol sends the packed message to the client rpc protocol now the connection will comes like this right and then the message is received
12:30 - 13:00 by the clients tab client staff and the client stuff will deem or selling the message with the return value and this written value will be given to client system okay the third type of client server communication is by using pipes let us see first the ordinary pipes ordinary pipes allows two process can communicate
13:00 - 13:30 to each other the standard formatter is producer and consumer fashion okay producer will stay in one end this is producer and this is consumer okay here the producer writes to one end of the pipe okay this is called as right end right end and the consumer reads from
13:30 - 14:00 other end of this pipe so this end this is called as radiant radiant here the ordinary pipes are unidirectional okay only one way communication is possible in this ordinary pipes in unix operating system the pipe is a technique for passing information from one program's process to another process okay here the pipe is used to pass the
14:00 - 14:30 parameters such as the output of one process to be the input of another process okay so this is process one this is p1 the output of p1 this is the output will be given to input of another process for example p2 okay so the system temporarily holds this piped information that is the temporary result a result of p1
14:30 - 15:00 p1 result until it reads by the receiving process okay so the output will be weight until p2 is ready to read this particular output okay so for this we have to use this pipe to hold the temporary result or the output of p1 so any pipe can access by using the read
15:00 - 15:30 and write system calls here the pipe of int fd which is nothing but to create the pipe that accessed through this particular file descriptor okay fd is the file descriptor of type integer fd means file descriptor and fd of 0 that is file descriptor 0 ftf 0
15:30 - 16:00 is read end of the pipe okay so this is radiant read end of the pipe and f1 this is f1 that is in the right end okay suppose if we want to read anything we have to use only this radian that is all fd of 0
16:00 - 16:30 will access only in the read end and all fd of 1 will access only in the right end suppose if we want two-way communication the two-way communication required two pipes two different pipes okay so this is this pipe is for one direction this is right end and this is radiant
16:30 - 17:00 radial this is parent process and child process okay suppose if we want to use this as read and this as right then we have to use another pipe okay pipe 2 should be used here we cannot read that is we cannot write in this end and we cannot read in this end because this is now right end we can write only this end and reading will be taken place only this particular end hence this is called as
17:00 - 17:30 radiant so here it is right end and this is radiant when come to pipe two and this is right sorry radiant and this is right in okay so one pipe can use to form only one communication if you want two-way communication then we have to use two different pipes type one and pipe two and only one limitation in the pipe for this inter-processor's communication is that the process use pipes must have
17:30 - 18:00 common parent process this is the only limitation in this pipe communication after this we have seen the communication in client server systems and there are three types first one is socket communication and second one is rpc that is remote procedure call and third one is pipes so by using these three methods the client server system will be communicated to each other now this is the question time
18:00 - 18:30 and what is the marshalling and d marshaling in rpc okay students please write your answer in the comment box and the next class we will see another important topic from second unit thank you