UpGuard interview question

How would you implement a micro-batching library