|View source on GitHub
value, zero, accumulate, merge, report
Used in the notebooks
|Used in the tutorials
This generalized aggregation function admits multi-layered architectures that involve one or more intermediate stages to handle scalable aggregation across a very large number of participants.
The multi-stage aggregation process is defined as follows:
Clients are organized into groups. Within each group, a set of all the member constituents of
valuecontributed by clients in the group are first reduced using reduction operator
zeroas the zero in the algebra. If members of
valueare of type
zero(the result of reducing an empty set) is of type
U, the reduction operator
accumulateused at this stage should be of type
(<U,T> -> U). The result of this stage is a set of items of type
U, one item for each group of clients.
U-typed items generated by the preceding stage are merged using the binary commutative associative operator
(<U,U> -> U). The result of this stage is a single top-level
Uthat emerges at the root of the hierarchy at the
tff.SERVER. Actual implementations may structure this step as a cascade of multiple layers.
U-typed result of the reduction performed in the preceding stage is projected into the result value using
reportas the mapping function (for example, if the structures being merged consist of counters, this final step might include computing their ratios).
A value of a TFF federated type placed at
tff.CLIENTS to aggregate.
The zero of type
U in the algebra of reduction operators, as
The reduction operator to use in the first stage of the process.
value is of type
zero is of type
operator should be of type
(<U,T> -> U).
The reduction operator to employ in the second stage of the process.
Must be of type
(<U,U> -> U), where
U is as defined above.
The projection operator to use at the final stage of the process to
compute the final result of aggregation. If the intended result to be
tff.federated_aggregate is of type
R@SERVER, this operator
must be of type
(U -> R).
A representation on the
tff.SERVER of the result of aggregating
using the multi-stage process described above.
|If the arguments are not of the types specified above.