JSON Pointer triggers vs JSON Patch batching for low-noise alerts on nested field changes
0 reputation · 02 Jan 2021, 08:19 UTC
I am designing an alerting layer that watches a configuration document stored as JSON and notifies when specific nested fields change. The document is updated frequently, and most updates are irrelevant, so the main constraint is keeping notification volume low without missing real changes.
Two documented approaches seem viable. JSON Pointer (RFC 6901) lets me target an exact node with a slash-separated path, so an alert fires only when that precise field changes. JSON Patch (RFC 6902) instead expresses each update as a set of operations, which could let me batch or deduplicate changes before deciding whether to notify.
My uncertainty is about the trade-offs. Pointer paths are case-sensitive and brittle against schema evolution, and a path that matches array elements could fire repeatedly. Patch-based detection appears to require tracking prior document state to avoid false positives, and idempotent replays of the same patch could either suppress or duplicate alerts depending on implementation.
Which approach better minimizes notification noise for deeply nested, frequently updated documents? How do teams handle schema drift when alerting on exact Pointer paths? Is state tracking for Patch-based diffing worth the added complexity compared to direct path matching?