P2/Vol.6/s&n6 Programming WinSock #30594-1 rob 11.14.94 CH01 LP #4
Chapter 1 ■ Networking and Network Programming
21
One server program can service several client requests at the same time. For this reason,
implementing servers tends to be more difficult than implementing clients. To provide
the capability of supporting several client requests simultaneously, servers are usually
built in two parts: a single master that accepts requests and one or more slaves that ac-
tually process and respond to the individual requests.
Client/server architecture contrasts with the classical centralized architecture popular-
ized by typical mainframe installations. In a centralized environment, the “clients” are
little more than dumb terminals that act as simple data entry/display devices. There’s a
minimum of work done at the terminal. The user typically fills in the fields of a form
before sending the field data to the central computer. All processing and screen format-
ting is done on the central computer, and the dumb terminal simply displays the
preformatted data. In a client/server environment, the client has much greater intelli-
gence and more freedom with the final visual presentation of the data to the user. In-
stead of the data being preformatted to match the way it will be viewed, it’s sent back in
its “raw” format, and the application running on the client computer “decides” how to
display that data. Thus the “front end” that the user sees can be customized while the
“back end” remains unchanged.
Distributed Computing
The distributed architecture can be thought of in two different ways: precollection and
parallel processing.
Precollection is the act by which background processes on networked computers con-
currently collect and propagate information before that information is requested. An
example would be a program that requests the status of every other computer on the
local network. In the client/server environment, the client program would have to send
a request to each computer on the network and wait for a response. This procedure is
potentially very time-consuming. In a distributed implementation, each computer on
the local network would have a process that runs continually in the background and
that reports status information to every other computer on a regular interval. When the
program is run to request the status information of every other computer on the local
network, the response comes back immediately because the information was precollected
in each local computer. Of course this solution wouldn’t work well if the information
being requested was time sensitive, because the delay in the updates would make the
response outdated. Shortening the time between the updates sent by the networked
computers wouldn’t work well either because of the possibility of saturating the network’s
data-handling capabilities.
When most people think of parallel processing, they think of a computer that has more
than one processing unit. Parallel computing in a distributed system environment means