Engineering collective intelligence at the edge with aggregate processes