|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.
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.
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.
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.
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.
This is a simple example of a process flow that makes use of the Spawn Task/Actor. The actors are Ruby applications.