Member-only story
🧷 Java JEP 461 Custom Stream Operators Reach Preview
The new proposal will enable custom stream operator creation for more fun with pipes
In the latest JEP 461 proposal, Victor Klang proposes a way to define custom stream operators.
Id you’re not familiar with streams, it’s a concept where you receive data from a data source over time.
On the frontend side for example, you can connect with a pressure sensor in a tank and read the value in real time with WebRTC protocol.
The app waits for new data reveived from the sensor and processes it. Because the data come not at once, but continuously, we call it a stream.
Various environments have various ways of handling such streams. There’s streams API in Javascript or libraries like RxJS.
Usually such solutions offer some kinds of ways to process data on the go.
The data are transferred conceptually though a pipe, and we put operators that handle these data as they come.
It’s similar to a car production line. One robot (operator) sits by the line and attaches door to the car, while another robot (operator) down the line paints the car.