Bulk Outbox Serializer
Component Detail
Description
Handles offline serialization of a bulk registration payload as a single typed mutation outbox entry, preventing N individual entries for one coordinator action. On sync the backend receives the single entry and expands it into per-mentor activity rows server-side, preserving atomicity and avoiding partial-sync failures in the offline-first architecture.
bulk-outbox-serializer
Sources & reasoning
The implementation notes explicitly require serializing the multi-target payload as a single outbox entry expanded server-side on sync. Without this component a 10-mentor bulk submission would produce 10 outbox entries, bloating the mutation queue and causing partial-sync failures if the device reconnects mid-sequence.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Serialize the bulk payload (metadata + mentor ID array) as a single typed outbox entry
- Preserve the full mentor ID list within the entry so the backend can expand it on sync
- Integrate with the existing Mutation Outbox Service without bloating the queue with N entries per bulk submit
Interfaces
serializeBulkEntry(payload: BulkActivityPayload): OutboxEntry
deserializeAndExpand(entry: OutboxEntry): List<ActivityInsert>