Chapter 22. DBMS_PIPE Built-in Package
A pipe is a named communication channel that allows different database sessions to communicate. The basic logic of pipe-based applications is fairly straightforward (it’s illustrated in Figure 22-1):
Program A creates a pipe and assigns it a name (it creates the data structure in the middle box in the figure).
Program B packs, or loads, a message into a private buffer, which it then sends out over the pipe (left side of the figure).
Program C, which is monitoring the pipe, sees the new message arrive and unpacks it into a private buffer; program C then processes the message it received from program B (right side of the figure).

Figure 22-1. Sending messages between sessions via DBMS_PIPE
The advantage of pipes is that they allow programs A, B, and C (as well as D, E, and F) to communicate independently across different sessions outside of their respective transactions. Without pipes (or the Advanced Queuing package, Oracle’s asynchronous messaging package), we might resort to message tables to achieve this sort of intersession communication. Program B would INSERT and then COMMIT—possibly interfering with the current transaction—a message into the table, and program C would SELECT the new message. The pipe eliminates the COMMIT and, since it resides in memory, is much faster than physically writing messages to (and reading messages from) a table. ...