STREAMS

Gcom provides protocol solutions to connect legacy systems to TCP/IP networks. Protocols: SNA, X.25, Bisync, Frame Relay, LAPB, LAPD, HDLC, SDLC, and more. Operating systems: Windows, Linux, Unix, Solaris, Solaris Intel, QNX, and more. Hosts: Any TCP/IP/Ethernet-capable host (IBM, Unisys, Tandem, HP mainframes...), PCs, Intel PCs, SPARC or Sun workstations, and more. End-user devices: ATMs, POS, radar terminals, and more.STREAMS modules provide the mainstay for Gcom's protocol software offerings. These modules work on multiple platforms, in multiple configurations, and with high reliability. Gcom's modules have made many communications projects worldwide into outstanding successes.

Beyond the STREAMS modules themselves, Gcom® also provides implementations of AT&T compatible STREAMS facility for operating systems that don't include STREAMS as part of the base system. Presently, this enhanced version of the basic STREAMS code is being offered for QNX and Linux.

Contents

STREAMS Modules
STREAMS Facilities
But Why STREAMS?
How It Works
Original Design
Historical Perspective, including a link to Dennis Ritchie's original STREAMS paper

STREAMS Modules

The STREAMS modules form the core of any STREAMS-based communications project. The modules implement the actual protocols that allow applications to communicate.

GCOM provides STREAMS modules for a wide variety of protocols; each has its own features. In general, however, Gcom's modules stand out from others in several ways:

  • Reliability: The code in Gcom's protocol modules represents the accumulated experience of more than 25 years of actual operation.
  • Configurability: When Gcom's designers had an implementation option, they brought it to the surface, allowing users to tune the module for maximum efficiency and versatility.
  • Maintainability: Gcom's modules ship with a full suite of analysis utilities, can perform tracing, provide configurable error reporting, and can generate custom signals. Additionally, most of these options can be switched, allowing a single executable to perform as both a production application and a troubleshooting tool.
  • Completeness: Gcom offers packages with complete implementations of common protocol suites, simplifying the process of acquiring the software.
  • Efficiency: Time and experience has helped Gcom produce some of the sleekest, most efficient modules on the market. When multiple Gcom modules work together, the speed increases are even more dramatic.

back to contents


STREAMS Facilities

Many modern operating systems ship with an implementation of the STREAMS facility already in place. Some, however, don't have this advantage. For two of the operating systems Gcom supports, Gcom has ported the STREAMS facility as a means of rectifying this problem.

To make STREAMS even more attractive, Gcom took the opportunity the port presented as a chance to add some extra functionality. These ports emerge with an outstanding feature list:

  • Full AT&T SVR4 STREAMS feature set: SVR4 compatibility helps keep modules clean and portable.
  • Single-threaded design: Retains the robustness and simplicity of single-threaded technology, avoiding the costly, error-prone overhead of supporting multiple processors.
  • Enhanced ease of use: Provides tracing of STREAMS messages by sender, receiver, and message type; selective reporting of STREAMS events; and tracking of memory allocation by address, size, and requester.
  • Test applications: Includes several performance tests and a lightweight regression test.
  • Remote debugger support: Under the Linux system, Gcom has added support for attaching a debugger to the kernel on a remote machine.

back to contents


But Why STREAMS?

The introduction of the sockets interface was a boon to network programming. A substantial number of the TCP/IP applications in service today were designed to exploit the simplicity and ease of that interface.

The STREAMS interface represents a major rethinking of this popular interface. While STREAMS retains the simplicity of sockets, it also adds significant functionality. For developers of communications applications, it provides two pronounced advantages:

  • Reusable software: The STREAMS interface allows a communications application to be completely protocol independent. An application can select the appropriate protocol at runtime, making porting an easier task
  • Flexible programmers: When a developer learns to use a STREAMS interface, (s)he knows how to use a data communications tool, not just a protocol-specific tool. Additionally, the simplicity of the STREAMS interface keeps the learning curve flat and short, giving developers maximum productivity with minimal effort.

The bottom line is enhanced productivity. By using STREAMS, development teams dramatically shorten development cycles, build products with more flexibility, and improve their ability to address different communications needs.

For much more information and a historical perspective, click here.

back to contents


How It Works

While most explanations of STREAMS tend to stay fairly quiet about the internals, some understanding of the underlying architecture can be useful. This brief overview should satisfy skeptics, help systems designers make educated purchasing decisions, and give developers some insight into what STREAMS-based applications actually have to work with.

One of the most powerful paradigms in data communications is the Open Systems Interconnection model, an ISO recommendation for designing data communications software. This model provides seven distinct layers of protocol, each charged with a certain set of tasks. The diagram identifies these layers.

The STREAMS facility locates the four lowest layers inside the operating system kernel, leaving the upper three layers for user applications to implement. The STREAMS equivalents of the OSI layers are also identified in the diagram.

The STREAMS layers are as follows:

  • CDI (Communication Device Interface), the interface to the physical hardware adapter
    • RS232
    • EIA530
    • X.21
    • V.35
    • DDS
    • T1
  • DLPI (Data Link Provider Interface), the interface to the link layer
  • NPI (Network Provider Interface), the interface to the network layer
  • TLI (Transport Layer Interface), the interface to the transport layer

A module will use two interfaces: one for upstream traffic and one for downstream traffic. For example, X.25 packet level uses NPI for upstream traffic and DLPI for downstream traffic. STREAMS handles the data flow through these interfaces, connecting the modules into a single data stream with a stream head nestled up against the file system and a physical device connecting the computer to a data line.

Typically, a STREAMS module will use a straightforward set of interfaces, communicating with a higher-layer module upstream and a lower-layer module downstream. However, the flexibility of the STREAMS layering system doesn't mandate this. For example, using SNA over an X.25 network is accomplished with a module (QLLC) that uses an NPI interface downstream and a DLPI interface upstream.

This layering system will impact development in two places: first, in selecting the appropriate modules to build a protocol stack, and second, in selecting the appropriate interfaces to interact with them. Otherwise, the operation is mostly transparent, due in no small part to the stream head.

The stream head is the first stop for all outgoing data and the last stop for incoming data. It nestles up next to the file system, translating the application's manipulations of the STREAMS device's file descriptor into messages for the various STREAMS modules.

back to contents


Original Design

The original design for what is now STREAMS appeared in a paper by Dennis Ritchie in the October 1984 issue of AT&T Bell Laboratories Technical Journal.

back to contents