|
|
The essence of network programming is to manage the communication between processes executing on different computers. The model that underlies network programming with XTI is called ``client-server.'' In this model, a process on one computer (the server) waits for other processes on other computers (the clients) to contact it. If the server accepts the connection from a given client, it can then perform some service or computation (or both) on behalf of the client.
For example, a file server is a process that offers a service to clients, namely, it transfers files from the server to the client machine. A time-of-day server, on the other hand, performs a computation, namely, it determines the current time of day and sends the result back to the client.
The above usage is more precise than the common practice of confusing a server or client process with the computer on which it is running. For example, the term ``file server'' is often used to refer to the computer on which the file server process is running. However, the same computer can run not only the file server process, but several other kinds of servers (such as a time-of-day server) as well.
Similarly, a computer on which one kind of client is running can also run many other clients. In fact, a server process on one computer can, in order to perform its task on behalf of the client that contacted it, enlist the assistance of yet another server on a different computer. It does this using the same mechanisms that the client on the first computer used. The result is that, while the first server is communicating with the second server, it is actually functioning as a client.
In this model, server processes can be running on many different computers that are attached to many different networks. Whenever a process needs some service or computation performed that it either cannot, should not, or need not do, it simply contacts the appropriate server (wherever it is on the network). Moreover, servers can connect to each other to request services or computations. The entire network then becomes an interconnected set of building blocks that can be called upon in an organized fashion to accomplish complex tasks.