API Node Buffering

API Node buffering refers to functionality in the PI-API that supports continuous collection of data on an API Node regardless of the status of the destination PI server or the network link to the PI server. This feature is available on all supported UNIX and Windows platforms.

There are two systems available for PI Node buffering. The PI-API bundles the Buffer Server (bufserv) and is available for UNIX and Windows platforms. The other is the PI Buffer Subsystem (pibufss) and is only available for Windows platforms. PI Buffer Subsystem (pibufss) is the recommended for solution for Windows systems because it has better performance, better support for collectives and it can also buffer PI-SDK events as well as the PI-API events.

This document refers to the Buffer Server (bufserv). Documentation for the PI Buffer Subsystem is available from the OSIsoft Technical Support website.


Enabling buffering ensures that data sent to a PI Server arrives at the PI Server, and arrives in order. This means that data write functions continue to succeed, even when the network or PI Server status change. However, in buffering case, the data is sent by the buffering process on behalf of the calling PI-API program. This may introduce a slight delay in forwarding data to the PI Server as compared to writing data without buffering enabled. Also, if data has been queued in buffers because of a disconnection, there will usually be a delay while that queue is forwarded to the PI Server before the most current data is sent to the PI Server. This ensures that PI Server compression is honored, which would not be the case if out of order data were sent to the server.

The PI-API may buffer data to any number of PI Servers from a given node. However, only one of those may be a PI Collective. For the PI Collective node, the data is distributed, or fanned to all the members of the collective that are configured to receive data. The list of buffered servers, and those members of a collective receiving distributed events, is configured in the piclient.ini file. Any PI server which receives distributed events must be a member of the buffered servers list as well.

The PI-API buffering consists of a parent buffering process and a child process for each PI Server to be buffered. Thus, the buffered data for individual PI Servers or PI Collective members is managed independently once it is inserted into the queue by the PI-API program.

Note, that the event that is distributed is not manipulated in any way. This means that the distributed event does not have the point ID or the timestamp altered. Therefore, the multiple destination PI servers must all have synchronized point databases (all target tags on all PI servers for the distributed events must be the same) and times; otherwise the distributed event may fail to be accepted by non-synchronized servers.

Buffering is enabled through the use of a configuration file, piclient.ini. Unless this file is modified to enable buffering, the PI-API will continue to send data directly to the home node. When enabled, the following calls will buffer all data sent to the designated PI server nodes.

Note: If buffering is enabled, bufserv must be started before an PI API-based applications are started.
Enabling Operational Intelligence