this is still unclear to me.

So, from the above, it seems that we are using this number to be the max number of keys in a cache on the flatmappers, and then using the fact that Maps can be summed, and then emitted as a single batch.

Can you explain more the whole algorithm here?

I would prefer if we could just get the effect of batching here. For instance, the cache emits blocks of results, those could be written as a List, and sent over (perhaps with a max size and chunked).