Skip to main content

Push vs Pull Reader/Writer

push pull

Reader

A reader is getting data from somewhere. The type of reader defines how data can be ingested.

Pull Reader

If you need the data flow to reach out and grab data (pull it from somewhere), then you use a Pull Reader. A Pull Reader is an active reader that goes out and opens some stream and pulls data from it. For instance, if we want to pull data out of a serial stream, we might create this,

pull writer

The pull reader gets data from the serial channel and will now make it available in the data flow as parameter data.

Push Reader

A Push Reader acts like a bucket; some data source can pour data into the bucket and we’ll read it if/when that happens. The Push Reader passively waits for data to be written to it. Instead of opening a stream, a Push Reader creates a stream that something else can write to. That ‘something’ else might be a data flow writer, a player, a BERT, or someone using a toolkit API.

push reader

The Stream UNC field has you define the path of the stream the Push Reader will create. In this example the data will be available as parameter data2.

Writer

Writers make data available by actively or passively writing to a stream.

Push Writer

The Push Writer will actively open the configured stream and push data into it. For instance, if we wanted to send data to serial channel 2, this writer will open the channel and send all data arriving at the Push Writer.

push writer

Pull Writer

The Pull Writer creates a stream and passively makes data available so something can read from it. Stream Displayer can read from a Pull Writer by opening the stream that gets created.

pull writer

In this example, you could use Stream Displayer to open dfe/3000/mydata, or perhaps record data from that stream.