19 Dec 2017
The introduction for JSON Patch from RFC [RFC4627] describes it this way:
JSON Patch is an efficient way to only get the details from an API regarding only what has changed, instead of sending everything over the pipes each time. It makes sense that Streamdata.io has used it in conjunction with Server-Sent Events (SSE) to efficiently cache and stream data from existing web APIs. I have to admit I never put this together with the PATCH method for API responses. Most of the APIs I’ve seen that use PATCH, do not actually implement JSON PATCH, so this was a learning moment for me. Something I’m always thankful for, constantly reminding me just how much I do not know in the space, even with my experience studying APIs.
Next, I’m going to invest more time understanding how to write code that navigates and applies JSON Patch in real-world situations. I’ve got my handful of Streamdata.io enabled APIs streaming me data, but I don’t have the experiencing applying the changes to a UI, or existing system integration as the data flows in. It all makes a lot more sense to me now, and provides me with a efficient model for managing changes that occur across APIs. It is also yet ANOTHER reminder for me of how important it is that I study up on RFCs, and be knowledgable regarding existing patterns like this that exist, so that I’m not reinventing the wheel when it comes to my API design.