Estimating Pi with Kafka streams
fredrikmeyer.net> : 4. * fractionAggregator.trues() / fractionAggregator.total();
Does that count again the number of trues each time or internaly it accumulates the number to recalculate it faster?
The FractionAggregator class has two fields (int trues, int total), and it is up to Kafka to keep track of the accumulated number. (perhaps someone who knows Kafka better could elaborate on how Kafka stores work "under the hood")