The Client/Server Model
Distributed System:
A distributed computer system contains software programs and data resources dispersed across independent computers connected through a communication network.
Advantages:
It allows users of individual, networked computers to share data and processing power, often over long distances.
Distribution can also enhance availability, reliability and performance.
Coordination Models:
A coordination model establishes logical roles and associated behaviours (for applications that assume such roles) for executing distributed interactions.
Client/Server Model
The client: requests an operation or service that some other application, the server, provides.
The server: receives a client request, performs the requested service and returns to the client any results.
Advantages:
It offers simplicity in closely matching the flow of data with the control flow.
It promotes modular, flexible, and extensive system designs.
Data resources and computing services can be organized, integrated and used as a service.
Widely used in distributed systems.
Communication:
Servers communicate over a network.
In Unix and Windows machines the network uses: TCP/IP & UDP.
Networking Basics
TCP and UDP protocols:
TCP
Definition:
TCP is a connection-based protocol that provides a reliable flow of data between two computers.
Examples: HTTP, ftp, Telnet
UDP
Definition:
UDP is a protocol that sends independent packets of data, called datagrams from one computer to another with no guarantees about arrival.
Examples: ping
Ports
Definition:
The TCP and UDP protocols use ports to map incoming data to a particular process running on a computer.
Port Numbers
Range: from 0 to 65535
Reserved: 0 - 1023 are restricted--they are reserved for use by services such as HTTP and ftp and other system services.
Sockets
Are the basic components of interprocess communication.
Provide access to the network transport protocols.
Are an endpoint of communication to which a name can be bound.
Stream Socket:
A stream socket provides bidirectional, reliable, sequential, and unduplicated flow of data with no record boundaries. It uses TCP/IP protocol.
Datagram Socket:
A datagram socket provides bidirectional flow of data, the data is divided in packages, the receiver can receive them in a different order from the sending sequence and may receive duplicated messages. It uses UDP protocol.