A computer-implemented method comprising:
- (A) receiving a query that specifies a plurality of stage types in a first specified order, wherein each stage type S in the plurality of stage types specifies:
- a processing method, corresponding to stage S, for processing stage items;
- and
- a grouping method, corresponding to stage S, for grouping stage items;
- (B) executing a first take command, wherein the first take command specifies:
- a first from source to take from, wherein the first from source comprises a first stage item;
- a first until condition;
- wherein executing the first take command comprises, until the first until condition is satisfied:
- (B)(1) receiving, from a first resource iterator, a stage item associated with a corresponding resource;
- thereby receiving a first plurality of input stage items from the first resource iterator;
- (C) providing the first plurality of input stage items to a first stage having a root group ID, the first stage being first in the first specified order of the plurality of stage types;
- (D) processing, by the first stage, the first plurality of input stage items to produce a first plurality of output stage items, as part of a first propagate operation, wherein the first propagate operation is of a “process” type, using the processing method specified by the first stage type, the processing comprising:
- (D)(1) receiving the first plurality of input stage items;
- (D)(2) processing, by the first stage, the first plurality of input stage items to produce a first plurality of output stage items;
- and
- (D)(3) grouping, by the first stage, using the grouping method corresponding to the first stage, the first plurality of output stage items to produce a first plurality of groups, the first plurality of groups comprising a first group and a second group, the grouping comprising:
- (D)(3)(a) creating the first plurality of groups;
- (D)(3)(b) assigning, to each group in the first plurality of groups, a corresponding group ID;
- and
- (D)(3)(c) assigning, to each group in the first plurality of groups, corresponding output stage items from the first plurality of output stage items;
- (E) providing the first group to a first instance of a second stage, the second stage being second in the first specified order of the plurality of stage types;
- (F) providing the second group to a second instance of the second stage;
- (G) processing, by the first instance of the second stage, the first group, as part of a second propagate operation, wherein the second propagate operation is of the “process” type, using the processing method specified by the second stage type, the processing comprising:
- (G)(1) receiving the first group as a second plurality of input stage items;
- (G)(2) processing, by the first instance of the second stage, the second plurality of input stage items to produce a second plurality of output stage items;
- (G)(3) grouping, by the first instance of the second stage, using the grouping method corresponding to the second stage, the second plurality of output stage items to produce a second plurality of groups comprising a third group and a fourth group, the grouping comprising:
- (G)(3)(a) creating the second plurality of groups;
- (G)(3)(b) assigning, to each group in the second plurality of groups, a corresponding group ID;
- (G)(3)(c) assigning, to each group in the second plurality of groups, corresponding output stage items from the second plurality of output stage items;
- (H) processing, by the second instance of the second stage, the second group, as part of a third propagate operation, wherein the third propagate operation is of the “process” type, using the processing method specified by the second stage type, the processing comprising:
- (H)(1) receiving the second group as a third plurality of input stage items;
- (H)(2) processing, by the second instance of the second stage, the third plurality of input stage items to produce a third plurality of output stage items;
- and
- (H)(3) grouping, by the second instance of the second stage, using the grouping method corresponding to the second stage, the third plurality of output stage items to produce a third plurality of groups comprising a fifth group and a sixth group, the grouping comprising:
- (H)(3)(a) creating the third plurality of groups;
- (H)(3)(b) assigning, to each group in the third plurality of groups, a corresponding group ID;
- (H)(3)(c) assigning, to each group in the third plurality of groups, corresponding output stage items from the third plurality of output stage items.