The Application Layer - Architectures & Processes
Network Applications
These are programs that:
- Run on different end systems.
- Communicate over the network.
As this is a layered system there is no need to write software for the network-core devices.
Client-Server Architecture
The server is:
- Always on host.
- Permanent IP address.
- Can use data centres for scaling.
The clients:
- Communicate with the server.
- May be intermittently connected.
- May have a dynamic IP address.
- Don’t communicate directly with each other.
Peer-to-Peer (P2P) Architecture
This architectures includes:
- No always on server.
- Arbitrary end system directly communicating.
- Peers request service from other peers and provide service to other peers.
- Self scalability - New load also brings more service capacity.
- Peers are intermittently connected and change IP addresses.
- Complex to manage.
Processes Communicating
A process is a program running within a host:
- Within the same host, two process communicate using inter-process communication (defined by the OS).
- Processes in different hosts communicate by exchanging messages.
Sockets
Processes send and receive messages to and from its socket:
- Sending a message from a socket relies on a transport infrastructure behind the port.
- There should be two sockets involved (one to send and one to receive).
Addressing Processes
In order to identify a process you need the system’s IP address and the port number associated with the process and the host.
Examples are:
- HTTP server: port 80
- SMTP server: port 25
Application-Layer Protocols
The protocol for the application layer must define the following things:
- Types of messages exchanged.
- Message syntax.
- Message semantics
- Rules for when and how processes send & respond to messages.
You can use open protocols:
- Defined in RFC’s
- Everyone has access to the protocol definition.
- Allows for interoperability.
Or proprietary protocols:
- Are made in-house and are not open to the public.