Figure 61 The client server model The client and the server need not be on the

Figure 61 the client server model the client and the

This preview shows page 74 - 76 out of 102 pages.

Figure 6.1: The client server model. The client and the server need not be on the same machine when there is a network present. We have already encountered this kind of behaviour before in connection with system calls. The system kernel is a kind of server, which provides I/O services for all the processes on a system. Also daemons , in the UNIX terminology, are servers which answer requests or perform some house-keeping on behalf of other processes. The key idea is that there are always two elements: clients and servers. On a network, we would like to arrange things so that the server and the client might be anywhere - on the same machine or on different machines. We would like a flexible system for sending out requests for services into a network and getting an answer without having to know too much about where the services are coming from. To achieve these aims, we need: Interprocess communication which works across machine boundaries. Protocols - agreed systems of behaviour - for requesting services. Services need to have names or numbers which identify them uniquely. Network services need to be multi-threaded , since several clients might request services simultaneously. We don't want to keep clients waiting. 6.2 Communication and protocol There are two ways of making a client-server pair. One is to use Berkeley sockets directly and the other is to use RPC - or Remote procedure call software package. A `socket' is a communications link from one process to another. Sockets work over a network using the internet protocol set (see next chapter). Opening a `socket' to another machine is like opening a file to read from or write to. Data are transferred as streams or packets of raw, non-interpreted bytes. The interpretation of the data once they arrive at their detsination is a problem for the user to deal with. RPC, on the other hand, is a high level software package which works on top of sockets and allows programs to send typed data using a protocol known as XDR - external data representation . It also has high level tools called protocol compilers which help programmers to write the code to interpret data at both ends of a client-server connection.
Image of page 74
There are two main implementations of this software: Sun Microsystems' RPC Apollo's NCS system. Most of the software was developed for the UNIX-like operating systems, but has since been adapted to all the popular systems in use. All of the software runs on top of the TCP/IP network protocol which we shall discuss in the next chapter. 6.3 Services and Ports Services are a high level concept. When we ask for a service, we are not interested in how the message gets to the server over a network. We just want to be able to call some function DoService(myservice) and have the result performed by some invisible part of the system. To make this happen, a system of `handles' is used. It is rather like opening a file - but now we want to open a service. The terminology is also different.
Image of page 75
Image of page 76

You've reached the end of your free preview.

Want to read all 102 pages?

  • One '20

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors