Mapreduce patterns