Peer – to – Peer Communications
- Most early client/server applications were implemented using low-level, conversational, peer-to-peer protocols – such as sockets, TLI, CPIC/APPC, NetBIOS and Named Pipes.
- These low-level protocols are hard to code and maintain.
- Instead now, the programmers are using RPCs, MOMs, and ORBs, which provide high level abstraction.
- The term, “peer-to-peer” indicates that the two sides of a communication link use the same protocol interface to conduct a networked conversation.
- The protocol is symmetrical, and it is sometimes called “program-to-program”.
- The peer-to-peer interface not fully mask the underlying network from the programmer.
- Programmer have to handle the transmission timeouts, race conditions, and other network errors.
- The peer-to-peer protocols started as stack-specific APIs.
a) Sockets
- Sockets were introduced in 1981 as the UNIX BSD 4.2 generic interface that would provide Unix-to-Unix communications over network.
- In 1985, SUN OS introduced NFS and RPC over sockets.
- Sockets are supported on virtually every OS.
- The windows socket API, known as WinSock, is a multivendor specification that standardizes the use of TCP/IP under windows.
- In BSD Unix System, sockets are part of the Kernel and provide both a standalone and networked IPC service.
Socket = Net_ID . Host_ID . Port_ID = IP Address + Port Address.
- The three most popular socket types are
- Stream
- Datagram
- Raw
- Stream and datagram sockets interface to the TCP and UDP protocols, and raw sockets interface to the IP protocol.
- A port is an entry point to an application that resides on the host.
- It is represented by a 16-bit integer.
- Ports are commonly used to define the entry points for services provided by the server applications.
b) TLI
- In 1986, AT&T introduced the Transport Layer Interface that provides functionality similar to sockets but in a more network-independent fashion.
- Sockets and TLI are very similar from a programmer’s perspective.
- TLI is just cleaner version of the sockets.
- It should run on IPX/SPX (or) TCP/IP with very few modifications.
- The TLI API consists of 25 API calls.
- Later standardized as XTI, X/Open Transport Interface.
c) NetBIOS:
- It is the premier protocol for LAN-based, program-to-program communications.
- Introduced by IBM and Sytek in 1984 for the IBM PC network.
- It is used as an interface to a variety of stacks – including NetBEUI, TCP/IP, XNS, Vines, OSI and IPX/SPX.
- The NetBIOS services are provided through a set of commands, specified in a structure called the Network Control Block (NCB)
- It does not support the routing of messages to other networks.
d) Named Pipes:
- Provide highly reliable, two-way communications between clients and a server.
- They provide a file-like programming API that abstracts a session-based two-way exchange of data.
- Using named pipes, processes can exchange data as if they were writing to, or reading from, a sequential file.
- These are suitable for implementing server programs that require many-to-one pipelines.
- Important benefit of named pipes are part of the base interprocess communications service.
- Named pipes interface is identical, whether the processes are running on an individual machine or distributed across the network.
- Named pipes run on NetBIOS, IPX/SPX, and TCP/IP stacks.
- Named pipes are built-in networking features in Windows NT, Windows for Workgroups, Windows 95 and Warp Server.
- Unix support for Named Pipes is provided by LAN Manager/X.
e) CPI-C/APPC:
- Common Programming Interface for Communications (CPI-C) build on top of APPC and marks its complexities and irregularities.
- Writing to the CPI-C API allows you to port your programs to all SNA platforms.
- The CPI-C API consists of about 40 calls; APPC consists of over 60 calls.
- Most of these calls deals with configuration and services.
- Advanced program-to-program communication is a protocol which computer programs can use to communicate over a network.
- APPC was developed as a component of IBM’s Systems Network Architecture (SNA).
- APPC is linked with the term LU6.2.
- LU6.2. (Logic Unit Version 6.2) is a device independent SNA Protocol.
- It was developed to allow computers in IBM environments to setup their own communications sessions, rather than rely on a hos computer to do so.
- Contrary to TCP/IP, in which both communication partners always possess a clear role, the communication partners in APPC are equal, i.e., everyone can be both servers and clients equally.
- With the wide success of TCP/IP, APPC has declined.
RPC, Messaging and Peer to Peer
- Client/Server applications are split across address spaces, physical machines, networks and operating systems.
- All NOSs offer peer-to-peer interfaces that let applications communicate using close to the wire send/receive semantics.
- Most NOSs provide some form of RPC middleware that hides the wire.
- An alternative type of model – message queueing or simple MOM – incredibly helpful in situations when the tight synchronization is not needed between the clients and servers.
Communication Stacks
|
Application |
Messaging |
RPC |
Peer-to-Peer |
||||||||||
|
Named Pipes |
DCE |
SUN |
|||||||||||
|
Presentation |
|
NDR |
XDR |
|
|||||||||
|
Session |
Peer-to-peer service API |
||||||||||||
|
NetBIOS Sockets TLI CPI-C/APPC |
|||||||||||||
|
Transport |
Common Transport Semantics |
||||||||||||
|
NetBEUI |
TCP/IP |
SPX/IPX |
LU6.2 /APPN |
||||||||||
|
Network |
|||||||||||||
|
LLC |
IEEE802.2 |
||||||||||||
|
MAC |
NDIS (OR) ODI |
||||||||||||
|
IEEE 802.5 (Token Ring) |
IEEE 802.3 (Ethernet) |
SDLC |
ISDN |
||||||||||
|
Physical |
Fiber Optic |
Coax |
Twisted Pair |
||||||||||
- Each layer has a well-defined set of APIs and Protocols.
- With these mix-and-match can be done.
- Practically, an entire stack of from a single vendor.
- The lowest layer of the communication software belongs to the device drivers that provide an interface to several types of communication hardware adapters.
- Real products don’t have any notion of architectural boundaries or reference models – they just get a job done.
- At the lower layers, they interface to the hardware using MAC protocols defined by IEEE.
- The LLC provides a common interface to the MACs and a reliable link service for transmitting communication packets between two nodes.
- The transport layer provides end-to-end delivery service.
