[streaming] Implemented sliding window and batchReduce