Sync Orchestration Service
Component Detail
Service Layer
high complexity
backend
3
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Coordinates the dual sync strategy: event-driven webhook processing when the external portal supports it, falling back to scheduled polling. Determines which records are stale, batches sync operations, and dispatches results to the audit log.
sync-orchestration-service
Responsibilities
- Register and validate incoming webhook signatures from the external portal
- Schedule and execute periodic polling jobs when webhooks are unavailable
- Batch entity sync to avoid rate-limit violations on the external portal API
- Write structured sync outcomes to the audit log for compliance traceability
Interfaces
processWebhookEvent(payload: WebhookPayload, signature: string): Promise<void>
schedulePollJob(orgId: string, intervalMinutes: number): void
cancelPollJob(orgId: string): void
executePollCycle(orgId: string): Promise<SyncResult>
batchSyncEntities(entities: Entity[], orgId: string): Promise<SyncResult>
Relationships
Dependencies (3)
Components this component depends on
Related Data Entities (1)
Data entities managed by this component