Named pipes are used more often than anonymous pipes because they allow two unrelated programs to communicate. Messages are small packets of data that are placed in a queue. They are named, and therefore any process can open the message queue and receive the message. Messages can be classified by type, and receiving programs may read only a particular type of message. Two message queues are required to establish two-way communication.
Shared memory is the fastest inter-process communication mechanism.
Essentially, a memory area is mapped into each of two different programs. The programs can then move information into and out of that shared memory to communicate between the two programs. Sockets, sometimes referred to as BSD sockets, provide a two-way link between programs that can be on the same machine or on separate machines across the network. Sockets are typically used for client-server applications. Typical examples of socket usage are Telnet, ftp, and most other Internet services.