The first approach can be used if the intermediate result that is to be computed has a fixed length and can easily be encoded in the binary string returned from the computeAggregate function.
In fact they are part of more than 30 glaciers I have observed advancing in the past decade in the highest "Mustag" part of the Karakoram in involve small to intermediate glaciers (10-40km) in length.