liveBook · Manning

Pipeline

As explained in Data-Oriented Programming in Java

A pipeline is a sequence of processing stages in which data is passed from one stage to the next.

A pipeline is a sequence of processing stages in which each output becomes the next stage’s input. Designing the stages as data transformations makes requirements visible before implementation begins. section 5.3.2

A practical pipeline design proceeds by:

  • Matching representative inputs to outputs and refining the resulting flow until the major requirements form a readable narrative. section 5.3.2
  • Representing runtime alternatives as explicit data types, such as sealed decisions with separate record variants. section 5.3.2
  • Turning each transformation into a method only after the high-level stages and branches are clear. section 5.3.2

Late-fee pipeline

A late-fee process can flow from List<Invoice> to List<PastDue>, then LateFeeDraft, then one of BillableFee, NotBillable, or NeedsApproval. BillableFee produces BilledLateFee or RejectedLateFee; NeedsApproval produces ApprovalStarted; NotBillable produces RejectedLateFee. section 5.3.2

Listing 5.19 A narrative designed for human consumption
// step 1: collect the past due
List<Invoice> -> List<PastDue>   
 
// Step 2: use those to build the draft
List<PastDue> -> LateFeeDraft           
 
// Step 3: decide what to do with the draft
LateFeeDraft -> (BillableFee OR NotBillable OR NeedsApproval
 
// then depending on what we decided, either:
// Step 4.1: submit billable items 
BillableFee -> (BilledLateFee OR RejectedLateFee) 
 
// OR Step 4.2: Start the approval process for those that need it
NeedsApproval -> ApprovalStarted
 
// OR Step 4.3: keep the non billable data for posterity  
NotBillable -> RejectedLateFee 

This listing shows a pipeline as a human-readable sequence of transformations and branch outcomes before those steps become Java methods. section 5.3.2

How Data-Oriented Programming in Java covers it

How deep it goes
Explains inputs, outputs, branches, and method extraction, but defers external service and repository details.
Examples
Uses late-fee processing, explicit decision variants, and automatically generated business-rule documentation.
What it assumes
Assumes intermediate Java knowledge while teaching the pipeline from domain examples and data types rather than implementation details.
What you can do after
Build it from scratch by mapping domain inputs to outputs, modeling alternatives explicitly, and converting settled stages into methods.
How it connects
Connects pipelines with algebraic data types, sealed classes, records, pattern matching, and business rules.

Also explained in

Compare how 63 books explain pipeline →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data-Oriented Programming in Java. The section links point to the parts of the book it draws on.