Object-Oriented Programming · Disney · Hard
Design and implement a thread-safe BatchWriter that accepts records from multiple concurrent producers, holds them in an internal buffer, and writes them out only through a batch database operation. The database client provides: max_batch_size limits how many records may be included in a single batch_insert invocation. max_wait_seconds limits how long a record may remain buffered when submission traffic is light. Calling the database once per record is too slow, so the…
Checking your access…