IntroductionWith distributed programming, you can build applications running
on several machines that work together through a network
to accomplish a task. The computation model described here
is parallel programming with distributed memory. Local and remote
programs communicate using a network protocol. The best-known
and most widely-used of these is IP (Internet protocol)
and its TCP and UDP layers. Beginning with
these low-level layers, many services are built on the
client-server model, where a server waits for requests
from different clients, processes those requests, and sends responses.
As an example, the HTTP protocol allows communication
between Web browsers and Web servers. The distribution
of tasks between clients and servers is suitable for many different
The Objective CAML language offers, through its Unix library,
various means of communication between programs.
Sockets allow communication through the TCP/IP and
UDP/IP protocols. This part of the Unix library
has been ported to Windows. Because you can create
``heavyweight'' processes with Unix.fork as well as
lightweight processes with Thread.create, you can create
servers that accept many requests at once. Finally,
an important point when creating a new service is the definition
of a protocol appropriate to the application.