Piper Push Cache Documentation Download Samples Contact  

Sample use cases are used to demonstrate the feature of the piper application. These samples are includes in the downloads. Each sample is in a separate directory and includes a README.txt file that describes the sample. Also included in the directory is a pages directory with the web pages for the sample. Additional files are included according to the needs of the sample.

Hello World

The Hello World sample is about as simple as it gets. A Hello World string is sent as a JSON entity which is cached and pushed to a web page over a WebSocket connect.

Hello SSE

The Hello SSE sample is about as simple as it gets using Server Send Events. A Hello World string is sent as a JSON entity which is cached and pushed to a web page over an SSE connect. Note this works with mobile phones and tablets.

Connection Counter

Piper Push Cache has built in JSON records that report on the number of connections. One is all the connections since Piper was started and the other is all the currently open connections. This sample displays those values along with the websocket connection status. It is a quick way to see how cached values are pushed to web pages using websockets.

The second part of this sample creates a new set of records and displays the raw JSON on the page. The cache modification port is used to modify the cache which is immediately reflected on the web page.

OpsLog

A full message based centralized logging package. More than a sample this as this includes source code for Ruby, C, and Go optional components. Log messages are generated by a mock application, written to logs files, and pushed to an operations console web page. More details at Building Realtime, Live-Updating Displays with JavaScript and Piper, a JSON Push Cache.

NATS Router

The NATS Content Based Router sample is a simple example of how to use Piper Push Cache as a content based router for the NATS messaging system. It makes use of the process flow feature of Piper as well as the NATS message support of Piper.

Process Flow

This is a simple example of a process flow that makes use of the Spawn Task/Actor. The actors are Ruby applications.